Wednesday, May 16, 2007

Reading 2 pots from 1 pair i/o

So, today i was sitting there and made a quick example of how to read 2 pots using one digital output and one analog input of a picaxe 08M. The idea is to use a relay and the on / off state of the digital output to change which pot's wiper is connected to the analog input. Yep.

The larger IC in between the 08M (at the back) and the relay (towards the front behind the pots) is a 8 x darlington transistor pair (ULN2803A).

I know that this seems too complex for such a thing, but it simply saves using an analog input on a chip such as the 08M (with limited i/o).

As a side-note, here are the colours and pins i am using to program the picaxes - i always seem to forget which is which and it is a waste of time. So i am writing this stuff down...

tip = 3 = ground = orange
ring = 2 = serin = red
sleeve = 1 = serout = brown