Recently I saw beagleboard.org came up with a new device called the beaglebone.
I thought this platform would make for an awesome little data acquisition project that would be browser based. I’ve used the USB-2408 from Measurement Computing extensively before to make temperature (using thermocouples) and voltage measurements. Since it’s USB based, I thought I could use it with the beaglebone to provide a standalone web interface. Since you normally use a full blown PC for data acquisition I thought this beaglebone could provide a browser based interface to accommodate some data acquisition and control needs.
To communicate with the USB-2408, it’s possible to use libusb-1.0 directly with it. When I received the beaglebone I noticed it came preinstalled with node.js, and uses the Cloud9 IDE for development. I realized I could use node.js to develop my application, and communicate with my USB-2408 through a web interface.
I found this node-usb project that exposes libusb-1.0 to node.js, which is really awesome. When using it I found that the author had yet to implement receiving data from USB control transfers so I had to fork the project and implement this small change. My fork is here:
https://github.com/jbrache/node-usb
I’m currently trying to develop a couple different web interfaces for controling the USB-2408:
1. A text based interface where you can send or receive commands.
2. An interface that provides graphs of voltages or temperature read back.
3. Digital IO control and counter readback on the USB-2408.
As far as the graphs go, I like the highcharts javascript library and have some really cool examples using them to provide graphs of the voltages and temperature read back from the USB-2408, see Figure 1. The google charts API might be worth checking out; there are some really neat javascript based graphing implementations out there.
Figure 1: Highcharts Graph Example
So far I’m really pleased with the beaglebone. It’s a great little package and has a lot of features I haven’t even touched. I’m sure I’ve just scratched the surface.
Current Issues:
1. Sometimes when booting up the beaglebone I get these weird errors when accessing the beaglebone through the COM port:
hub 1-0:1.0: unable to enumerate USB device on port 1
ti81xx_interrupt 869: CAUTION: musb1: Babble Interrupt Occured
ti81xx_interrupt 870: Please issue long reset to make usb functional !!
musb_h_ep0_irq 1150: no URB for end 0
hub 1-0:1.0: unable to enumerate USB device on port 1
When this happens, my USB device does takes a little bit of time after the system has booted up to enumerate; after that I don’t see the errors anymore. For some reason whenever I unplug/plug back in my device I have to reboot the beaglebone. It’s a weird behavior and I haven’t quite determined the root cause; I am actually providing external 5V power to the beaglebone.
If I attach a USB hub to the USB port on the beaglebone, my device can be unplugged/plugged back in with no problem. I’ll try to come back to this problem at some point, for now I’ll stick with the USB hub.