One of the essential hardware interfaces needed for any good IoT platform is an analog input. Many sensors output a low level voltage proportional to the measured signal. For example, a temperature sensor may output a voltage of 0 to 3 volts for temperature values from 0 to 80 degrees Celsius. A nice feature of the AM335x processor used on the BeagleBone is that it already incorporates an 8 channel 12bit Analog to Digital Converter (ADC) on chip. The ADC is mainly used for the touch screen interface for LCD displays but the extra channels can also be used as general purpose analog inputs. The open source Windows Embedded Compact BSP is available on Codeplex at Beaglebone BSP.
The standard driver used the ADC exclusively for touch screen so I had to make several modifications to allow for general purpose use. This involved pulling out all the ADC setup and scanning to a dedicated ADC driver. The touch samples were then shared with the touch driver, which runs on a different thread, through a message queue. There are 8 ADC channels available on the BeagleBone, AN7 is hardwired on the PCB to measure the 3.3V supply. AN0-AN6 are brought out to expansion connector. AN0-AN3 are reserved for LCD touch screen (4-wire resistive) which are typically implemented on a LCD cape, but can be used as general purpose if the LCD is not used. I also use AN6 to measure battery voltage (see Power managment on BBB) which leaves AN4 and AN5 available for other analog inputs.
I also wrote a managed C# test program which I can use exercise each channel.
Remember when interfacing sensors the input to the ADC must be scaled properly. The ADC input can only take 0-1.8VDC so a resistor divider may be necessary. To output the actual units, for example degrees Celsius, use the input scaling factor, the ADC reading and work backwards.
While the ADC implementation has a lot of nice features, like sample averaging. I would not try to use it for fast moving signals, like audio input or something like that. It is really meant for measuring fairly static signals …like battery voltage or transducers etc.
Re: Windows Embedded Compact 2013 on Beaglebone gets IoT sample
Please contact me regarding a full installation of this BSP for WINCE2013, and what is necessary for...
-- Aaron Peterson
Re: BeagleBone BSP code clean up
Hi David, Interest in the fully version of the image. Please let me know the commercials. I need clarification...
-- CB
Re: BeagleBone BSP gets several improvements
Hi David, How can I get a full version (without reboot) of your image available for demonstration?
-- Marco Aurélio Braun
Re: Low power operation on the community IoT Beaglebone BSP (Part 1)
Hello , dvescovi . Because of Job , I use your Beaglebone black BSP which is helpful for me . I want...
-- KevinHsu
Re: Yet Another Gotcha: Compact 7 Update
Hi David, Would you please contact me regarding the wince7 BSP for the BBB? I have a few LCD Capes...
-- trialsrideraz
Seems MS may have posed a new updated ISO on MSDN. For those without a subscription, you are still out...
-- dvescovi
Re: Power management on the Beaglebone part 2–Battery
Hi David, First of all thanks for this, blog it's been very useful. Before I go ahead and solder anything...
-- Juanes1220
Re: More improvements for Beaglebone BSP
Thank you for the fixes. The latest version builds under WEC7! Yay! Next .. have to try deploying it...
-- OzFlipper
Of course, I meant the WEC2013 SDK ... see what happens when you work with too many bits at the same...
Hi David. First, thank you for what must have been a huge amount of work. I have been trying to install...