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 ?