Thursday 6 November 2014

Temperature Control, here we come.

I finished up the wiring for the temperature probes, they are ds18b20 one-wire probes as I've mentioned earlier, and they are great since they can share a bus with up to 10 devices with no extra effort, just join up the wires, use the pull-up resitor between data and the 3.3V from the BBB and setup your GPIO input pin for the one-wire driver that's provided in the Ubuntu image and you'll be able to read multiple temp probes!

here's some output.


ubuntu@arm:/sys/devices/w1_bus_master1/28-00000449da30$ cat w1_slave
e4 00 4b 46 7f ff 0c 10 ae : crc=ae YES
e4 00 4b 46 7f ff 0c 10 ae t=14250
And the second probe
ubuntu@arm:/sys/devices/w1_bus_master1/28-000004f1d675$ cat w1_slave
ff ff ff ff ff ff ff ff ff : crc=c9 NO
e5 00 4b 46 7f ff 0b 10 83 t=-62
Hey, wait a minute, looks like that was a bad read, notice the crc=c9 NO, that means the crc check on the data read failed. That's a bad temp value and I better make sure to validate the crc before I trust a temp read. Here's a subsequent read that shows a good value.
ubuntu@arm:/sys/devices/w1_bus_master1/28-000004f1d675$cat w1_slave
e4 00 4b 46 7f ff 0c 10 ae : crc=ae YES
e4 00 4b 46 7f ff 0c 10 ae t=14250


Now I'm working on the temp_driver which will read the temp from the one-wire interface and send it to the UI using greio, which is the IPC library that comes with Storyboard. I ran into an issue with the Storyboard Engine though, when I switched to Ubuntu on my beaglebone I switched to a Hard-Float based kernel, and the Storyboard Engines I have aren't Hard-Float compatible, so I can't run Storyboard right now. I'm waiting for my friends at Crank to get me a hard-float compiled Engine and libs so I can finish my driver and get the interface up and running. I'm very close to have a working chamber for the first time in over a year!

No comments:

Post a Comment