Friday, August 28, 2015

Electric generator excercise bike project

It was first just a test and as it worked as intended we decided at work to continue with it and make it more interesting. The intended target groups are  mainly schools (in City of Turku) and also various sustainability events.

It has gone forward nicely, all basic functionality has been now implemented. The device has 3 main functions:
  1. 12V, 5W incandescent light bulb
  2.  12V, 1.5W LED light bar
  3. Generic 12V plug for anything else you can think of
For option 3 we provide a 5V USB charger and a 12V travel kettle for boiling water. The kettle is 100W, it should take 20 minutes to get it to boil, I'm a fat-ass so almost died after pedalling for a couple of minutes... :)

That was the basics, there are some parts that are still work in progress. Installed are already a current sensor and an LCD screen but they are currently unused. The bike itself also provides a RPM sensor (aka "a switch") that we can also use.

The idea is to show the load in Amps, the Voltage and from there the Watts produced and of course RPM. One ideas was to also add a temperature sensor that could be put in the kettle to see if the water gets any warmer.

It currently still needs manual activation to magnetize the alternator, but that could be made automatic.

Check out the video below for a quick look:


Wednesday, August 26, 2015

Need a large box for your project ? Go to Ikea

I needed a box to put all the wires, switches, connectors, fuses and stuff. First I checked a local electronics shop, they had some nice ones but expensive.

Then we went to Ikea on the way home. And I found a nice 5l plastic container, cost a couple of € only.



Just Perfect!

Thursday, August 20, 2015

Fours years ago N950 arrived in the mail #TBT

Four years and two days to be exact. A N950 arrived. The absolutely best phone design ever made by Nokia, (IMO of course).

Nokia N950 dev kit


Full size touch screen with a full QWERTY keyboard that you could hide/show, running a proper Linux. A hackers dream device this. Just lovely.

Very unfortunate that the "N9 with keyboard" never go to market, it would have been an awesome device.

sigh...

Tuesday, August 18, 2015

Custom Raspberry Pi Compute module carrier board

Yet another project I'm involved in using a custom Compute Module carrier. Not by me, I just do the software part.


The board features 4 LEDs in various colors with light pipes and a connector for character LCD. HDMI and audio has been removed. Hand soldered.

The maker of this board, Hasseb, has a ready made carrier board available for 139€. A quick look video of this board+enclosure below:


Proximity sensing, TCRT5000 to digital using a Schmitt

I'm working on a project where I need to sense where a modell train goes at 3-4 points on a model train track. I have a bunch of TCRT5000 infrared sensor collecting dust so using them was the obvious choice.

I will get a nice analog signal from them, but I'm not interested in distance data, just that something is over them or not. And definitely don't want to poll them!

A schmitt trigger to the rescue! A quick test video below:


Thursday, July 30, 2015

Qml item state undefined

I'm working on a info screen application done in Qml that will be run on a Raspberry Pi. I'm doing the main coding on the desktop and everything runs well.

On the Pi I'm using a self build of Qt 5.4.2 and it worked very well, until yesterday that is. Suddenly I got no display of my info slides. Strange thing, it worked perfeclt fine before.

After a good bit of cursing I found that my Image didn't show, because for some odd reason the binding of

visible: root.state=='rotating'

was evaluated as false. Well, how the hell is that possible was the next question. And debug output of the state randomly said "undefined", eh ?? WTF!?

What I don't understand is how it suddenly crept up as I've used states before too in my app. Anyway, it turns out that it is a known bug (QTBUG-41649) in gcc-4.6 on arm that miss compiles a specific file in the Qml library.

 Fix applied and all seems well. I hope.

Thursday, July 02, 2015

More progress with wireless sauna temperature thingy

My original plan was to use a MSP430 based launchpad (cheap!) instead of an Arduino for the sensor part. I had major troubles getting any data to go trough so decided to first try with identical platforms and libraries. That worked so at least I knew that my NRF modules where ok.

I started to look into using the MSP430 based launchpad now, first I had some weird trouble that a simple test worked, then suddenly it didn't and sometimes just a part of the data got trough to the receiver. Digging into the enrf24 and RF24 libraries a bit more I found the reason (enrf24 uses dynamic payload (only!) by default, RF24 doesn't) and connecting my MAX6675 thermocouple amp also made the sending not work if I used a particular pin (I think it was 2.3?) on the launchpad, moving that to 1.4 fixed that issue.

Now it works!


I'm now powering the sensor with a USB power bank and that just wastes energy so next is to make everything as power efficient as I can and power it using a 3V coin-cell.

That should be possible as I can sleep most of the time as the temperature does not change that fast and often anyway.

Perhaps something like:
  • Average temperature, say for 3 samples, does not change much: Sleep 30 seconds
  • If temperature starts to change, sleep less, say 10 seconds
  • If temperature changes rapidly, sleep 5 seconds
  • Send temperature only when temperature changes
Comments ?

Thursday, June 25, 2015

How to get Cadense and speed information using gattool

Last post was a quick "Yay it worked" post. This explains the procedure in more detail.

First use hcitool to scan for your device (activate it in some way so that it powers on first)

Now you know the address, start gattool and connect


$ gatttool -b 00:18:31:E4:D7:89 -I
[   ][00:18:31:E4:D7:89][LE]> connect

Ask for the primary services:

[CON][00:18:31:E4:D7:89][LE]> primary
[CON][00:18:31:E4:D7:89][LE]> 
attr handle: 0x0001, end grp handle: 0x000b uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x000c, end grp handle: 0x000f uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x0010, end grp handle: 0x001a uuid: 00001816-0000-1000-8000-00805f9b34fb
attr handle: 0x001b, end grp handle: 0x0029 uuid: 0000180a-0000-1000-8000-00805f9b34fb
attr handle: 0x002a, end grp handle: 0xffff uuid: 0000180f-0000-1000-8000-00805f9b34fb

Ask for the characteristics of the handler for the CSCP service (uuid 1816)

[CON][00:18:31:E4:D7:89][LE]> characteristics 0x0010 0x001a
[CON][00:18:31:E4:D7:89][LE]> 
handle: 0x0011, char properties: 0x10, char value handle: 0x0012, uuid: 00002a5b-0000-1000-8000-00805f9b34fb
handle: 0x0014, char properties: 0x02, char value handle: 0x0015, uuid: 00002a5c-0000-1000-8000-00805f9b34fb
handle: 0x0016, char properties: 0x02, char value handle: 0x0017, uuid: 00002a5d-0000-1000-8000-00805f9b34fb
handle: 0x0018, char properties: 0x08, char value handle: 0x0019, uuid: 00002a55-0000-1000-8000-00805f9b34fb

Ask for the character descriptor for the cadence information (uuid 2a5b)

[CON][00:18:31:E4:D7:89][LE]> char-desc 0x0011 0x0013
[CON][00:18:31:E4:D7:89][LE]> 
handle: 0x0011, uuid: 2803
handle: 0x0012, uuid: 2a5b
handle: 0x0013, uuid: 2902

Enable notification by writing 0100 to handle 0x0013.

[CON][00:18:31:E4:D7:89][LE]> char-write-req 0x0013 0100
[CON][00:18:31:E4:D7:89][LE]> Characteristic value was written successfully

You should now start to get notifications from the device
...
Notification handle = 0x0012 value: 03 ce 00 00 00 82 20 ea 00 be d8 
[CON][00:18:31:E4:D7:89][LE]> 
Notification handle = 0x0012 value: 03 cf 00 00 00 aa dd ea 00 be d8 
...

See the previous post for an explanation of the data.

Playing with CSCP Cycling Speed and Cadence using gattool

Inspired by a BB demo app I got myself a PanoBike CSCP BLE dongle a while back. Never had the time to do more than test it with the BB demo application and then I more or less forgot about it (and had no proper bike to use it on).

Today, inspiration hit me and I started to look at it a bit, for now first with gattool only.

Took a while to figure it out, BLE is a bit of a mystery with UUIDs and handles and so on.

Result:

Notification handle = 0x0012 value: 03 c8 00 00 00 06 99 e1 00 45 99

Byte 1: What data is available, crank=1 and wheel=2
Bytes: 2,3,4,5: Wheel revolutions
Bytes: 6,7: Wheel event timestamp

Bytes: 8,9: Crank revolutions
Bytes: 10,11: Crank event timestamp


Wednesday, June 24, 2015

Arduino based wireless sauna temperature sensor and display

I've been working on this on-and-off (more off than on..) for a couple of years now. The plan is to create a summercottage "automation" system, simply just a bunch of variouse sensors sending information to a base station with a display and perhaps some logging.

I first started with a MSP430 as the sensor board and a Raspberry Pi as the base station, but I never to get NRF24L01 TX/RX to work and forgot all about if again for a while.

Started thinking about it some weeks ago again and decided to try using the exact same NRF24L01 library and exactly the same platform and if that didn't work then either or both of my NRF24L01 boards must be broken.

After fiddling with the various settings I finally got them to talk, everything needs to match exactly or nothing will work.

At midsummer I got to try it out with a proper temperature sensor attached (and inside the sauna) the result can be seen in the video below:


Wednesday, June 17, 2015

Y-Radio for BlackBerry 10 passed review

Now that was quick. The application review is done and Y-Radio is now available for download in BlackBerry World.

Download Y-Radio, YLE Radio application for BlackBerry 10!

Tuesday, June 16, 2015

Y-Radio BB10 version review issues

Don't know what the tester is doing but I've got it back now twice with a nice one-liner saying basically "No sound". Work for me so I wonder if the tester is doing something stupid like not having network connection ?

Anyway, submitted one now that complains loudly (in RED) if device is off-line, lets see if that helps.

YLE Radio application for BlackBerry 10

Onki for BlackBerry 10 is out (and an update is pending review)

A version of Onki, an Onkyo remote app, is now available for BlackBerry 10 devices in the application store.

Playing from a Network service

Tuner presets list

Actually it has been available for a couple of weeks already and I just sent a small update for review. The update adds an application cover that displays zone status, some minor UI updates and integration with the Now Playing interface.

Now playing integration


You can download Onki from BlackBerry World

Wednesday, June 10, 2015

Y-Radio coming to BlackBerry 10

An itch needed some scratching that resulted in me finally making and YLE Radio application for BlackBerry 10 devices. Goes by the name Y-Radio as the Jolla version.

This version is pretty basic, just a list of channels, play/stop button and quick access to channel web site(s).

Here is a quick intro video to the app:


Should be available in BlackBerry World as soon as review is done.

Wednesday, April 29, 2015

A bit of hardware tinkering

and not the usual computer hardware, that is.

I was asked to create muscle power to electricity demonstration device, basically pedal to light a light bulb. Easy enough, take a old exercise bike, strap an car alternator on it, some wires and a light. Right ?

The first prototype works as can be seen on this short video:



Next up is to make it more robust and figure out some foolproof way to handle the power pulse the alternator requires to get magnetized.

I'm thinking about using an Arduino (well, surprise!) to sense when the wheels are turning and if there is no power generated then give a short pulse to magnetize the alternator. Also voltage, current and watt display might be a nice addition.

Monday, April 20, 2015

Prestashop front-end stuck in maintenance mode ?

Back-end says shop is enabled but front-end is stubbornly stuck in maintenance mode ? Going crazy ? Don't panic!

Look into your Prestashop database, specifically the ps_configuration table.

select * from ps_configuration where ps_configuration.name = 'PS_SHOP_ENABLE';

You might get something like this:
 
+------------------+---------------+---------+----------------+-------+---------------------+---------------------+
| id_configuration | id_shop_group | id_shop | name           | value | date_add            | date_upd            |
+------------------+---------------+---------+----------------+-------+---------------------+---------------------+
|               30 |          NULL |    NULL | PS_SHOP_ENABLE | 1     | 0000-00-00 00:00:00 | 2015-04-17 13:24:22 | 
|              476 |          NULL |       1 | PS_SHOP_ENABLE | 0     | 2015-04-12 22:46:19 | 2015-04-12 22:46:19 | 
|              477 |          NULL |       6 | PS_SHOP_ENABLE | 0     | 2015-04-12 22:46:19 | 2015-04-12 22:46:19 | 
|              478 |          NULL |       7 | PS_SHOP_ENABLE | 0     | 2015-04-12 22:46:19 | 2015-04-12 22:46:19 | 
+------------------+---------------+---------+----------------+-------+---------------------+---------------------+

As you can see only one is enabled, other shops are not. The quick fix,  

update ps_configuration set value=1 where name='PS_SHOP_ENABLE';

should do the trick.

Monday, February 23, 2015

Jolla tracker music support package now available!

Sorry for the massive delay, just over a year or so... Anyway, now you can listen to your favorite tracker music files on your Jolla and feel all nostalgic!



Because of harbour limitations, mod-support is only available from openrepos.

Thursday, February 19, 2015

MSP430 Serial FATAL: cannot open /dev/ttyACM0: Input/output error

Getting this when trying to open the serial port to your MSP430 on a launchpad ?

FATAL: cannot open /dev/ttyACM0: Input/output error

The reason seems to be that a buffer on the serial converter gets full and the chip gets upset and fails.
But you can easily workaround it. Disconnect the serial pins from the "emulator" (why do they call it an emulator in first place, I don't get it, it does not emulate anything) part on the board by removing the jumpers.



Connect the USB cable to your computer and now open the serial device in for example picocom or some other serial app. It should open ok now.

Now put the jumpers back in, you should get your serial output now.




Wireless sauna monitoring system using MSP430

I've been planning, for a long time now, to create a monitoring system to our summer cottage. Features would include monitoring of temperature of air and lake water (the cottage is by a small lake) and why not air moisture and barometric presure just for fun.

Also monitoring the sauna temperature in some inteligent way, for example for informing to add more wood and "Sauna is ready!" signal.

All of this would of course be logged on a SD and some way to view everything, maybe just a 16x2 LCD screen or perhaps something a bit more cool.

Anyway, finally some progress, a wirebundle of a wireless sauna sensor. Basically just a MSP430 launchpad, MAX6675+thermocouple wire and a NRF24 radio.

I'm using energia, sketch will be up soonish on my github.

It seems to be sending, I haven't tried the RX part yet :)




Tuesday, February 17, 2015

Interactive piste map on Sailfish OS

Found libosmscout a while back and that gave me an idea, but never had time to look into it properly. But last summer I tried making piste specific styles and it did what I wanted. Then I forgot all about it more or less.

But now I've been playing with creating ski specific stylesheets for a while now and it is starting to look like a nice piste map.

Today I got inspired to get the libraries and example QtQuick component up and running on Jolla. First test app was up and running quite fast.

Example map  data from Åre.



Test Mobile Åre piste map

Monday, February 09, 2015

A used and cheap Playstation 3, overheating and blinking Red Led, my solution

It seems I'm always 10 years behind with game consoles. Found a couple a weeks a go from a local ecorecycling store a used Playstation 3, a old big fat model one. And got it under 40€ thanks to eject button not working (that was an easy fix)

Of course, no controller and no games so that was another 70€... (I got GTA 5, the only reason to get a PS3 ;)

Anyway, it worked fine for a week or so, then started crashing to a blinking red led. Seems to be a typical error condition after a quick google on the issue.

I didn't yet get the dreaded yellow led so all was not lost. Opening it up my first impression: Whoever designed the case and cooling should be publicly humiliated, flogged and anything else that makes him/her feel the pain that they have caused to thousands of Playstation 3 owners.

Yes, there is a big heatpipe system and a enormous fan, but the there is absolutely no source for fresh and cool air. Espcially the holes on the right side are just for show, as they are more-or-less blocked on the inside. What the fuck where they thinking ? And the holes at the front, not much better, the circuit board blocks most of them.

Still, I did open everything up and the thermal pasting was also a crap job.
Thermal paste, a crap job by Sony

First I fixed that with fresh and properly applied paste. The next was to get some fresh air into the case. That easy enough, just needed to find my drill first.

Drilled holes just under the fan to get some air flow

The same with the side, drilled some hole in air blockers


This seems to have helped, no crashes after many hours of playing. Before it was around 2 minutes from game load to a crash.

Sunday, February 08, 2015

Onki 0.0.4 is out!

Onki, my Onkyo remote app for Jolla, got a new release today. Available now in OpenRepos and in Jolla store as soon as QA is done with it.

Getting this one out took a bit more than expected, buying a house and other little projects can do wonders to development time...

Anyway, this version comes now with some nice new features. You can control network and USB playback sources, also track information with artwork is displayed. There are now more cover actions, some are input specific and for inputs with no controls the cover actions handle volume up/down.

One nice feature is muting on incoming call, so feel free to crank up that volume, you won't miss any calls (but no warranty on that one...)

It is still rough in places, Zone handling for example is still very basic and controlling other devices connected to HDMI inputs are experimental, none of my devices seem to respond properly. For example my TV handles Volume Up/Down and Power-off, but nothing else seem to work.

And in case you don't own a suitable receiver, then get one from Amazon now!


Let me know what you think, have any ideas, just post comments below or on twitter.

Track information and album art is now displayed, if available.

Cover displays the current Zone and Input

Tuned preset is now highlighted

Friday, January 16, 2015

New Y-Radio release, version 1.0.7

A quick look at what's new in Y-Radio 1.0.7, the Ylesradio radio application for Jolla devices.


2nd Difference

Found this when moving.

2nd Difference cover


A old class mate of mine was active in the demo scene making tracker music, with the Amiga and later on the PC. This music disk, 2nd Difference, is from 1995.



It came on to 1.44MB floppies, they even work still and I was able to copy it over. The music playback application is pure DOS based stuff but luckily dosbox is able to run it and playback using emulated Gravis Ultrasound.

Here it is on youtube, so you all can enjoy it!