Post topics, source code that relate to the Arduino Platform

User avatar
By danbicks
#56522
schufti wrote:Hi,
the analog pin would read ~1/3rd (per voltage divider R2/R3, resulting from the fact that range of analog pin is only 0..1V) of the voltage that results from the voltage divider R6/Rx (R7 or R8 or R9) whichever pushed (sideffects from R1, R1+R2 beeing parallel to Rx) and internal resistance of analog pin neglected).

so expect to read something like (3300*Rx/(1+Rx))*100/320 mV


You should expect if you do the maths and calculations in detail, regardless of high input impedance of the A>D converter the following results are obtained:

Sw1 Pressed: 820 mV A>D input @ 682 uA
Sw2 Pressed: 793 mV A>D input @ 777 uA
Sw3 Pressed: 756 mV A>D input @ 905 uA

Therefore this is a pretty awesome design in that the worst case less than 1 mA of total circuit current is drawn from my circuit provided on a button press.

@schufti please feel free to provide a better circuit solution that meets my specification as iterated above, must have 3 buttons and also control CH_PD at the same time.

Good luck

Dans
User avatar
By shoelessone
#56902 Just wanted to follow up here and say that I managed to get everything breadboard up and working properly.

I did have one question: I ended up using a 1k resistor, 2k resistor, and 3.3k resistor for the "button" resistors - I did this MAINLY because I didn't have the other resistor values at home to use. I'm guessing though that Dans used the values he did for a good reason, and I'm wondering if there might be something I'm missing?

Again, thanks for taking the time to help with this, I really appreciate it. Also, for what it's worth, I now understand the voltage divider setup and feel generally much more comfortable with the circuit. Again, thank you!