cancel
Showing results for 
Search instead for 
Did you mean: 

Is this correct?

SOLVED
Rocky1989
Member

Re: Is this correct?

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

Nathan_B.
Active Participant

Re: Is this correct?

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.

Rocky1989
Member

Re: Is this correct?

I am using Arduino UNO.

Rocky1989
Member

Re: Is this correct?

Message contains an image

https://decibel.ni.com/content/servlet/JiveServlet/downloadImage/2-37941-30638/450-248/QQ%E6%88%AA%E5%9B%BE20120617220254.jpg

this is whole scheme, Any wrong with that?

Highlighted
Rocky1989
Member

Re: Is this correct?

Hi, Nathan,

Since UNO has only 10 bit ADC, so I guess, I could not measure the most precise output voltage using Analog Pin.

dale60
Member

Re: Is this correct?

Message contains a hyperlink

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

While often overlooked, the most common source of ADC inaccuracy is from an impedance mismatch.  Sim...

Best of luck with this now.

Regards,

Dale

www.GorillaBuilderz.com

Rocky1989
Member

Re: Is this correct?

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

Nathan_B.
Active Participant

Re: Is this correct?

Other than being really messy, your code looks fine.