Author Topic: Arduino Uno pinouts only 0.5 volts?  (Read 11056 times)

0 Members and 1 Guest are viewing this topic.

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Arduino Uno pinouts only 0.5 volts?
« on: August 02, 2015, 04:03:30 am »
Hi - I used an oscilloscope to measure the voltage coming out of the Ardunio pins, using digital write HIGH, etc.

And it seems the Vpp is only around 500 or 600 mV.

Is this right?

I thought it should be closer to 5V as the usually defined HIGH and LOW range for computer stuff?

(I powered the Uno using a 5V phone recharger backup battery).
 

Offline asgard20032

  • Regular Contributor
  • *
  • Posts: 184
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #1 on: August 02, 2015, 04:07:37 am »
Your probe or your scope is probably not configured correctly. If your probe is in X10 mod, then you need to put your scope in X10 mod for that probe's channel.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #2 on: August 02, 2015, 05:52:59 am »
I concur. Just measured my Uno to make sure. 5 V is the digitalWrite HIGH value. But you really should power your Uno with 7-12V to the Vin pin or the main power jack. The "5V" pin is usually intended as an _output_ pin which bypasses the internal regulator and is not recommended by Arduino for powering the board.
« Last Edit: August 02, 2015, 05:55:15 am by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #3 on: August 02, 2015, 08:33:07 am »
Thanks guys - that makes sense, as it does seem to measure 1/10th the expected voltage.

However I am fooling around with my Rigol DS2102 and cannot find where to do the probe adjustment. Emailed Rigol for support already. (Their instruction guides are horrible unfortunately!).

BTW I supplied the 5V power via a USB cable (plugged into a battery pack) into the USB port, not into the 5V pins. I just don't want any possible problems with grounding and shorting my scope.
 

Offline Fat

  • Regular Contributor
  • *
  • Posts: 113
  • Country: us
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #4 on: August 02, 2015, 09:31:00 am »
This will occasionally happen to me too. In my case the probe is set for 10 X and the scope for 1X.  Took a minute to figure it out.
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28368
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #5 on: August 02, 2015, 09:39:38 am »
This will occasionally happen to me too. In my case the probe is set for 10 X and the scope for 1X.  Took a minute to figure it out.
Yep, best advice for newbies is to set scope and probe to 10x and leave it there.
The times that you NEED 1x are very few, reset, use then return to 10x.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline nugglix

  • Regular Contributor
  • *
  • Posts: 209
  • Country: de
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #6 on: August 02, 2015, 10:10:41 am »
However I am fooling around with my Rigol DS2102 and cannot find where to do the probe adjustment. Emailed Rigol for support already. (Their instruction guides are horrible unfortunately!).

Hard to believe, it's in the PDF and has it's own entry in the TOC.
Look for "Probe Ratio".
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 951
  • Country: pt
    • My AVR tutorials
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #7 on: August 02, 2015, 01:30:21 pm »
Hi - I used an oscilloscope to measure the voltage coming out of the Ardunio pins, using digital write HIGH, etc.

And it seems the Vpp is only around 500 or 600 mV.

Is this right?

I thought it should be closer to 5V as the usually defined HIGH and LOW range for computer stuff?

(I powered the Uno using a 5V phone recharger backup battery).

Did you set the pin as output?
If you don't do that, the pin stays as an input and when you do a digitalWrite you are just enabling or disabling the weal internal pull-up, that would explain those voltages.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #8 on: August 02, 2015, 01:39:51 pm »
If you don't do that, the pin stays as an input and when you do a digitalWrite you are just enabling or disabling the weal internal pull-up, that would explain those voltages.

No it wouldn't, the "weak" pull-up has an impedance of some tens of kiloohms, whereas the scope probe has an impedance of 10 megaohm. So, the voltage would read almost exactly the same regardless of whether it was a strong output or just a pull-up.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #9 on: August 02, 2015, 05:30:42 pm »
However I am fooling around with my Rigol DS2102 and cannot find where to do the probe adjustment. Emailed Rigol for support already. (Their instruction guides are horrible unfortunately!).

Hard to believe, it's in the PDF and has it's own entry in the TOC.
Look for "Probe Ratio".

Yes thanks I saw that before but the problem is, this is what it says and it is ALL it says:

You can set the probe attenuation ratio manually. The probe ratio values available are as shown in the table below.

(And there is a table.)

There is NO further instructions HOW to set the ratio!!! LOL like I said, really lousy documentation.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #10 on: August 02, 2015, 05:33:45 pm »
Hi - I used an oscilloscope to measure the voltage coming out of the Ardunio pins, using digital write HIGH, etc.

And it seems the Vpp is only around 500 or 600 mV.

Is this right?

I thought it should be closer to 5V as the usually defined HIGH and LOW range for computer stuff?

(I powered the Uno using a 5V phone recharger backup battery).

Did you set the pin as output?
If you don't do that, the pin stays as an input and when you do a digitalWrite you are just enabling or disabling the weal internal pull-up, that would explain those voltages.

Yes I was simply just using the BLINK demo program and just edited the time delay, etc.

I even switched from Pin 13 (with LED) to pin 12, same results.

Anyway I think it has to be the probe setting, as others suggested. I went and measured a 1.5v AA cell and it didn't read correctly either. I would not have thought to do that before as I assumed it would be super calibrated etc from factory and the probe does not show any 10x or 100x labeling on it.
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #11 on: August 02, 2015, 09:29:34 pm »
If you STILL didn't find out how to switch the probe setting, check from 10:25 here:

 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #12 on: August 02, 2015, 10:42:40 pm »
Many thanks!!!

I would not have known to press that button for CH1 to get at the settings. I looked through all the menus EXCEPT the ones that pop up when pressing the CH1 button...

Yes I sound like those noobs who don't RTFM but honestly it is truly confusing from my perspective!

Now the other thing I am not sure if I screwed up the scope by doing the self-calibration.

I did the calibration when trying to find the probe ratio, thinking maybe it was not properly calibrated.

The scope said to be sure there was NO SIGNAL at all, so I removed all probes and told it to start the calibration.

THEN I later find out in the manual it says you need to connect the TRIGGER OUT in the back to both the CH1 and CH2 and the EXT TRIGGER jacks, before doing the self-calibration!

Did I screw the scope up?!

(I am starting to regret buying the Rigol to be honest; it might have been easier to get a properly documented Tek even if you are getting less machine for the money... *sigh*).
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11248
  • Country: us
    • Personal site
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #13 on: August 02, 2015, 11:01:30 pm »
Calibration is a thing you need to perform on any scope, it is not that hard.

But if you are just messing with Arduino, don't worry about the calibration. You won't see much difference, there is no way to bring the scope so out of cal that it will be noticeable on Arduino projects.
Alex
 

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #14 on: August 02, 2015, 11:55:46 pm »
I would not have known to press that button for CH1 to get at the settings. I looked through all the menus EXCEPT the ones that pop up when pressing the CH1 button...

(I am starting to regret buying the Rigol to be honest; it might have been easier to get a properly documented Tek even if you are getting less machine for the money... *sigh*).
Rigol makes a good scope for the money. You should take the money you saved on the Rigol and spend it on a basic electronics class, because if you don't know that you use the CH1 button to set CH1 settings (including probe ratio), I think you've got bigger problems. The Rigol manual is going to teach you how to use a Rigol scope, not how to use oscilloscopes in general.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #15 on: August 03, 2015, 12:35:00 am »
Quote
I did the calibration when trying to find the probe ratio, thinking maybe it was not properly calibrated.

The scope said to be sure there was NO SIGNAL at all, so I removed all probes and told it to start the calibration.

THEN I later find out in the manual it says you need to connect the TRIGGER OUT in the back to both the CH1 and CH2 and the EXT TRIGGER jacks, before doing the self-calibration!

Whaaat? I was having trouble comprehending this, so I went looking. Sure enough on page 13-11 of the  manual (p.237 of 266 in the .pdf) it says to do this.... while displaying the screen image of the message that says just the opposite. (Says not to connect any signal to the input channels.)

On the Rigol site, in the FAQs for the DS2000 series, I found the following:

The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #16 on: August 03, 2015, 12:40:49 am »
@hurricanehenry:

I suggest that you be very careful with your Channel settings. Assure that you have the Probe attenuation settings correct for your probes (10x is the usual default, you will very rarely use 1x in general work) and be careful about the channel Input Impedance: leave it set to 1 Megohm, unless and until you know specifically that you need to use 50 ohm input impedance for some special purpose.
The easiest person to fool is yourself. -- Richard Feynman
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #17 on: August 03, 2015, 01:36:01 am »
(I am starting to regret buying the Rigol to be honest; it might have been easier to get a properly documented Tek even if you are getting less machine for the money... *sigh*).
:palm: OK, yes, the Probe ratio section of the manual neglects to mention pressing the CH1/2 button. But you're in the "setting the vertical system" chapter, where every single other setting has those instructions (channel coupling, bandwidth limit, waveform invert) explicitly laid out. Yes, for some reason they neglected to repeat the exact same stuff for this one setting. The weird part is where you (instead of just looking at the next and previous page and using a modicum of inference) just leapt to recalibrating the scope even though the calibration of brand new scope has never been off by a suspiciously precise factor of exactly 10, and then go into an undoubtedly unfounded blind panic about the calibration of the scope being done incorrectly.

Just chill out and think for half a second -- there's a 1kHz square wave test post on the front of the scope, 5V IIRC. Set your probe ratio to 10x, connect it to that, compensate your probe, and observe that everything is fine. Who reads the manual anyway?
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #18 on: August 03, 2015, 06:24:58 am »
Quote
I did the calibration when trying to find the probe ratio, thinking maybe it was not properly calibrated.

The scope said to be sure there was NO SIGNAL at all, so I removed all probes and told it to start the calibration.

THEN I later find out in the manual it says you need to connect the TRIGGER OUT in the back to both the CH1 and CH2 and the EXT TRIGGER jacks, before doing the self-calibration!

Whaaat? I was having trouble comprehending this, so I went looking. Sure enough on page 13-11 of the  manual (p.237 of 266 in the .pdf) it says to do this.... while displaying the screen image of the message that says just the opposite. (Says not to connect any signal to the input channels.)

On the Rigol site, in the FAQs for the DS2000 series, I found the following:

OK thanks; that is reassuring. And also confirms I was not hallucinating! I need to go find a revised version of the manual then.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #19 on: August 03, 2015, 06:26:24 am »
I'm glad I have always been nice to noobs online about all the subjects I have helped them with over the years.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #20 on: August 03, 2015, 07:07:07 am »
Thanks to all who helped.

For anyone searching this thread and reading it later, I found an updated manual here:

http://www.batronix.com/pdf/Rigol/UserGuide/DS2000_UserGuide_EN.pdf

And after setting the probe ratios, the Ardunio voltage reads fine. Vbase = around 200mV and Vtop = 5.20v which cancels out to a 5V range. Frequency is 50 Hz for this square wave (for the particular HIGH/LOW infinite loop I wrote).
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #21 on: August 03, 2015, 07:56:21 am »
And after setting the probe ratios, the Ardunio voltage reads fine. Vbase = around 200mV and Vtop = 5.20v which cancels out to a 5V range. Frequency is 50 Hz for this square wave (for the particular HIGH/LOW infinite loop I wrote).

Did you connect the ground lead of your probe? Looks like you're picking up 200mV of voltage drop on the ground return wire in the USB cable there.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #22 on: August 03, 2015, 10:14:18 am »
Yes I tried both the GND right next to Pin 13 and also the GNDs on the POWER side.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #23 on: August 03, 2015, 10:22:25 am »
Actually thinking more about this, wouldn't the 200mV be more of the voltage for a digital LOW condition, compared to the 5.2V for the HIGH condition, from the PIN instead of from GND? That is, digital LOW does not seem to be exactly zero volts.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #24 on: August 03, 2015, 10:47:53 am »
Actually thinking more about this, wouldn't the 200mV be more of the voltage for a digital LOW condition, compared to the 5.2V for the HIGH condition, from the PIN instead of from GND? That is, digital LOW does not seem to be exactly zero volts.

The datasheet (page 338) shows that there'll only be 200mV for digital low if there's about 5mA flowing through that pin; if the pin isn't connected to anything other than the oscilloscope, that certainly won't be the case. Also, if with high condition is genuinely 5.2V, that could only be true if the 5V supply rail to the chip is at least 5.2V, which is almost (but not quite) outside of spec.
-- Try measuring the ground pin on the Arduino with the oscilloscope (yes, the same one you have the ground clip connected to; this obviously should just read 0.00V, but let's check that)
-- Try measuring the 5V on the Arduino with a DMM, and also the I/O pin in the high and low states and see if it also reads 0.2V and 5.2V.

You know, only if you're curious of course. If you find the oscilloscope doesn't agree with the DMM, don't panic, it's most likely just be a improperly attached ground lead or something simple like that.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #25 on: August 03, 2015, 11:29:34 am »
OK I made some adjustments to the code.

What is different now is that I made sure Pin 13 is LOW.

Before, the Pin 13 LED was turned on (default?)

NOW with the Pin 13 LED turned off, Vbase reads from -10mV to +50mV which is much less than +200mV before, and Vtop reads almost 5.0v exactly (5.02, 5.05).

So it might have been coupling (inductive coupling?) from Pin 13 right next to Pin 12, giving the non-Zero voltage?

Here's the code just FYI. Very simple test code.

void setup() {
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
}
 
void loop() {
  digitalWrite(12, HIGH);
  digitalWrite(12, LOW);
}


FYI the frequency of this square wave (which is not super super stable) is around 94 kHz.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #26 on: August 03, 2015, 11:31:56 am »
So it might have been coupling (inductive coupling?) from Pin 13 right next to Pin 12, giving the non-Zero voltage?
For the record, DC cannot be inductively coupled (unless there's literally an inductor connecting them, often what inductors are used for is to set a DC bias this way), nor can it be capacitatively coupled.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #27 on: August 03, 2015, 11:34:04 am »
OK so it's weird. I added a 1/1000th second delay. (f = 500 Hz now)

void loop() {
  digitalWrite(12, HIGH);
  delay(1);
  digitalWrite(12, LOW);
  delay(1);
}


And now the 200mV LOW voltage is back, same with the Vtop, now back to 5.2v.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #28 on: August 03, 2015, 11:36:01 am »
So it might have been coupling (inductive coupling?) from Pin 13 right next to Pin 12, giving the non-Zero voltage?
For the record, DC cannot be inductively coupled (unless there's literally an inductor connecting them, often what inductors are used for is to set a DC bias this way), nor can it be capacitatively coupled.

yes but this has become AC hasn't it? The voltage rises and falls still happen, and electromagnetic effects still occur due to this changing voltage over time, no?

Anyway the added delay seems to point to another factor.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #29 on: August 03, 2015, 12:02:24 pm »
For the record, DC cannot be inductively coupled (unless there's literally an inductor connecting them, often what inductors are used for is to set a DC bias this way), nor can it be capacitatively coupled.
yes but this has become AC hasn't it? The voltage rises and falls still happen, and electromagnetic effects still occur due to this changing voltage over time, no?
You're claiming that the DC voltage from pin 13 is being coupled into pin 12 -- which is what I'm saying doesn't make sense, irrespective of whether pin 12 has AC on it.
 

Offline hurricanehenryTopic starter

  • Regular Contributor
  • *
  • Posts: 69
Re: Arduino Uno pinouts only 0.5 volts?
« Reply #30 on: August 04, 2015, 01:09:55 am »
For the record, DC cannot be inductively coupled (unless there's literally an inductor connecting them, often what inductors are used for is to set a DC bias this way), nor can it be capacitatively coupled.
yes but this has become AC hasn't it? The voltage rises and falls still happen, and electromagnetic effects still occur due to this changing voltage over time, no?
You're claiming that the DC voltage from pin 13 is being coupled into pin 12 -- which is what I'm saying doesn't make sense, irrespective of whether pin 12 has AC on it.

Ah yes, you're right. My bad.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf