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.

rm7blc.jpg



I just hope you will understand my poor schematics :slight_smile:

It’s because of shared pull-down

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.

 

and also because according

and also because according to the schematic all 4 inputs are connected together

I was thinking that too.

I was thinking that too. Diode separation perhaps?

Would different resistances help?

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.

never tried diode, but is

never tried diode, but is there really a problem with getting 3 more resistors?

as far as i understand, that

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

The suggestion of nuumio

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

An aside

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

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.

Just a thought

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

**I dont think this will**<br><p>I dont 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.

That is why …

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

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