Let's Make Robots!

Multiple analog outputs

I need to connect 4 bend sensors to picaxe 28x1 four analog inputs. 

I would like to save some wire connecting by using the same V+ and GND for all four sensors and only use different Analog Output to PCU.

I tried connecting everything like this, but I get all the same resistance for all of the four sensors in the debug window.



I just hope you will understand my poor schematics :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I would suggest one used vastly different resistors.  I was just thinking the resistors would need to be in series with and not set up as voltage dividers. Once you have vastly different resistances in series you can figure out which bend sensor would have been touch and by how much. The page that made me think of this is here:

http://mientki.ruhosting.nl/data_www/pic/projects/pic_switch.html

Unfortunately that only works with digital sensors not analogue like a bend sensor. Good find on the link though.

If one was trying to save ADC pins and didn't need the full 8/10/12 bit range for each sensor could the bend sensors be set up as voltage dividers of varying degrees and share one or more pins?

I imagine how one pin could be shared by two bend sensors:  one should have it's pull-down resistor on the GND side, other one should have the same one on the V+ side. Then, for example, one would give variables from 100 to 200 and the other one from 100 to 0. At least that's how I imagine this, haven't tried this method.

I don`t think this will work. You will get a single value that is dependant on 2 different resistances but you won`t be able to tell whether the high side sensor got more resistant or the low side sensor got less resistant.

Also resistances in a voltage divider only tell you the resistance ratio. 100k and 100k is 1:1.. If both sensors change to 50k each the ratio is still 1:1.

I don't know if/how it would work, and if it would work could your system deal with the decreased precision.

The suggestion of nuumio actually worked just fine. Thanks for all of your help, mates ;)

It's because of shared pull-down resistor. Each sensor much have its own pull-down. Think it like this: When analog output #1 changes there's only a small piece of wire between it and other outputs. This means that other outputs see exactly the same as #1.

 

I have seen diagrams to allow a single pin to read input from multiple sources and one concept was to use different resistors in series with each input. Therefore, the uCs ADC could calculate which input was being affected. Given the examples I saw were for switches as opposed to variable resistors.

as far as i understand, that only works with buttons: it works much like an analog keypad, where each button has 2 different resistances, so it gives different readings