Go Down

### Topic: How to measure voltage with Arduino Due? (Read 794 times)previous topic - next topic

#### F1_

##### Oct 12, 2017, 08:59 pm
Morning,

How do I do to measure the voltage on a certain pin?

Can I use Analog 0 for this purpose?

(the voltage is between 3.3 and 1.9V)

"I don't think a success factor of a novel is determined by the tools used by the writer, it can be notepad, ms word, or just pencil and paper, but CREATIVITY IS." ~DuckfaceNinja, Construct2 Forum user

#### aarg

#1
##### Oct 12, 2017, 09:47 pmLast Edit: Oct 12, 2017, 09:48 pm by aarg
What does the documentation say? Do you know about the analogRead() function?
... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

#### F1_

#2
##### Oct 12, 2017, 09:53 pm
huh, you mean this? "The Due's analog inputs pins measure from ground to a maximum value of 3.3V."
So I guess the Due do read voltage in that pin, I've como to the documentation page so many times and this was just under my nose,
well,
thank you for helping out aarg!
"I don't think a success factor of a novel is determined by the tools used by the writer, it can be notepad, ms word, or just pencil and paper, but CREATIVITY IS." ~DuckfaceNinja, Construct2 Forum user

#### GolamMostafa

#3
##### Oct 18, 2017, 04:23 amLast Edit: Oct 19, 2017, 06:49 am by GolamMostafa
Quote
How do I do to measure the voltage on a certain pin?
Newbie is the welcome title for the person who has just joined with the Arduino Community. A Newbie could be a novice learner or a Learned One. It could be judged to some extent by looking at the content and presentation style of the post.

I assume that the OP has wanted to measure and display the Pin Logic of a specific digital pin - that means converting the DUE into a DVM. The following steps may be exercised:

1.  Assume DPin-8 and configure it as output.
2.  Connect DPin-8 with A0-pin with jumper.
3.  Initialize analog channel-0 as needed.

4.  Write LL at DPin-8.
5.  Use a hand-held DVM (as a secondary calibrator) and measure logic level of DPin-8.
6.  Acquire and record ADC value of Ch-0.
7.  Record Step-5 and Step-6 as: A(ADCL, 0) or A (VDC1, 0).

8.  Write LH at DPin-8.
9.  Use a hand-held DVM (as a secondary calibrator) and measure logic level of DPin-8.
10.  Acquire and record ADC value of Ch-0.
11.  Record Step-9 and Step-10 as: B(ADCH, 3.3) or B(VDC2, 3.3).

12.  Derive equation for unknown point C(ADC, V) from the known points: A and B.
13.  Show the decimal value of V onto LCD Monitor or Serial Monitor or 7-segment Monitor.

The DUE-based DVM is here!

Go Up