06-17-2012 09:14 PM
I tested the APin In, still doesn't work: flip between 66V and 2V(or other values.) It looks like the Analog System doesn't work when Digital Pin is working. It is ridiculous
06-17-2012 09:58 PM
That is strange. There is no reason why they both can't work. What board are you using? I've used the Arduino Mega 2560 for my project and I've never had issues.
06-17-2012 09:59 PM
I am using Arduino UNO.
06-17-2012 10:06 PM
this is whole scheme, Any wrong with that?
06-18-2012 10:43 AM
Hi, Nathan,
Since UNO has only 10 bit ADC, so I guess, I could not measure the most precise output voltage using Analog Pin.
06-18-2012 04:02 PM
You need to ensure that your UNO ADC reference voltage is selected so that you can maximise the ADCs' resolution.
The UNO has 3 possible sources for VREF see here. Depending on which one you use, this will determine the maximum input voltage to your analogue pin.
You are however limited to the maximum operational voltage of the Atmega328, i.e. 5VDC. Therefore if your measured voltage can go higher than this limitation, you will need to use a potential divider, but be aware that the input impedance to the ADC should also be considered...
"Impedance Matching & Power Consumption
Best of luck with this now.
Regards,
Dale
www.GorillaBuilderz.com
06-18-2012 04:08 PM
Hi, Dale,
Could you look at the VI scheme I just posted? I can get an ouput voltage. But when I want to read that through Ananlog Input Pin. It doesn't work
06-18-2012 05:45 PM
Other than being really messy, your code looks fine.