Post topics, source code that relate to the Arduino Platform

User avatar
By schufti
#56501 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
User avatar
By danbicks
#56518
shoelessone wrote:
danbicks wrote:Simple circuit attached, allows 3 buttons, value are specific. Hope this helps.
Remember to add 10k resistor from spare GPIO to CH_PD to keep active while functions are performed.

AD Buttons CH_PD.PNG


Regards Dans


So I'm going to ask a stupid question, because I'm finally getting back to looking at this and breadboarding this up... but wouldn't the analog pin read basically "nothing" because there is a 220k resister sitting in front of it?


Hi @shoelessone I think a basic electronics course would serve you well. You will then realize how I designed the circuit I gave you. It is a complete solution to your problem.

Hope this helps

Dans
User avatar
By shoelessone
#56520
danbicks wrote:
Hi @shoelessone I think a basic electronics course would serve you well. You will then realize how I designed the circuit I gave you. It is a complete solution to your problem.

Hope this helps

Dans



I tend to agree ;) - or at least I need to spend a bit more time stepping through the circuit. I actually breadboarded the entire thing last night, plus some additional components, and the readings I'm getting from the ADC pin are not as I'd have expected (i.e. not working). That was really the impetus for my question here, but at the end of the day you're right, I have a very entry-level understanding of some of these concepts (i.e. a "voltage divider").

Thanks again for your help, I very much appreciate it!
User avatar
By danbicks
#56521
shoelessone wrote:
danbicks wrote:
Hi @shoelessone I think a basic electronics course would serve you well. You will then realize how I designed the circuit I gave you. It is a complete solution to your problem.

Hope this helps

Dans



I tend to agree ;) - or at least I need to spend a bit more time stepping through the circuit. I actually breadboarded the entire thing last night, plus some additional components, and the readings I'm getting from the ADC pin are not as I'd have expected (i.e. not working). That was really the impetus for my question here, but at the end of the day you're right, I have a very entry-level understanding of some of these concepts (i.e. a "voltage divider").

Thanks again for your help, I very much appreciate it!



Check out this site for learning electronics, I make sure all my students have this link, It is an awesome repository of knowledge.

http://www.electronics-tutorials.ws/

Hope this helps you.

PS: Do not expect large readings on the A>D input, make sure you meter is on VDC low setting if not an auto-range meter.