Arduino Uno pinouts only 0.5 volts? - Page 1
Forum section: electronics / general

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 02, 2015, 04:03:30 am
content: 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).

author: asgard20032
author_rank: Regular Contributor
timestamp: August 02, 2015, 04:07:37 am
content: 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.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: August 02, 2015, 05:52:59 am
content: 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.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 02, 2015, 08:33:07 am
content: 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.

author: Fat
author_rank: Regular Contributor
timestamp: August 02, 2015, 09:31:00 am
content: 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.

author: tautech
author_rank: Super Contributor
timestamp: August 02, 2015, 09:39:38 am
content: Quote from: Fat on August 02, 2015, 09:31:00 amYep, best advice for newbies is to set scope and probe to 10xand leave it there.The times that you NEED 1x are very few, reset, use then return to 10x.

author: nugglix
author_rank: Regular Contributor
timestamp: August 02, 2015, 10:10:41 am
content: Quote from: hurricanehenry on August 02, 2015, 08:33:07 amHard to believe, it's in the PDF and has it's own entry in the TOC.Look for "Probe Ratio".

author: senso
author_rank: Frequent Contributor
timestamp: August 02, 2015, 01:30:21 pm
content: Quote from: hurricanehenry on August 02, 2015, 04:03:30 amDid 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.

author: rs20
author_rank: Super Contributor
timestamp: August 02, 2015, 01:39:51 pm
content: Quote from: senso on August 02, 2015, 01:30:21 pmNo 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.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 02, 2015, 05:30:42 pm
content: Quote from: nugglix on August 02, 2015, 10:10:41 amYes 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.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 02, 2015, 05:33:45 pm
content: Quote from: senso on August 02, 2015, 01:30:21 pmYes 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.

author: neslekkim
author_rank: Super Contributor
timestamp: August 02, 2015, 09:29:34 pm
content: If you STILL didn't find out how to switch the probe setting, check from 10:25 here:

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 02, 2015, 10:42:40 pm
content: 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*).

author: ataradov
author_rank: Super Contributor
timestamp: August 02, 2015, 11:01:30 pm
content: 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.

author: funkathustra
author_rank: Regular Contributor
timestamp: August 02, 2015, 11:55:46 pm
content: Quote from: hurricanehenry on August 02, 2015, 10:42:40 pmRigol 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.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: August 03, 2015, 12:35:00 am
content: QuoteWhaaat? 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:

author: alsetalokin4017
author_rank: Super Contributor
timestamp: August 03, 2015, 12:40:49 am
content: @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.

author: rs20
author_rank: Super Contributor
timestamp: August 03, 2015, 01:36:01 am
content: Quote from: hurricanehenry on August 02, 2015, 10:42:40 pmOK, 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 thateverything is fine. Who reads the manual anyway?

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 03, 2015, 06:24:58 am
content: Quote from: alsetalokin4017 on August 03, 2015, 12:35:00 amOK thanks; that is reassuring. And also confirms I was not hallucinating! I need to go find a revised version of the manual then.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 03, 2015, 06:26:24 am
content: I'm glad I have always been nice to noobs online about all the subjects I have helped them with over the years.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 03, 2015, 07:07:07 am
content: 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.pdfAnd 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).

author: rs20
author_rank: Super Contributor
timestamp: August 03, 2015, 07:56:21 am
content: Quote from: hurricanehenry on August 03, 2015, 07:07:07 amDid 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.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 03, 2015, 10:14:18 am
content: Yes I tried both the GND right next to Pin 13 and also the GNDs on the POWER side.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 03, 2015, 10:22:25 am
content: 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.

author: rs20
author_rank: Super Contributor
timestamp: August 03, 2015, 10:47:53 am
content: Quote from: hurricanehenry on August 03, 2015, 10:22:25 amThe 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.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 03, 2015, 11:29:34 am
content: 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.

author: rs20
author_rank: Super Contributor
timestamp: August 03, 2015, 11:31:56 am
content: Quote from: hurricanehenry on August 03, 2015, 11:29:34 amFor 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.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 03, 2015, 11:34:04 am
content: 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.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 03, 2015, 11:36:01 am
content: Quote from: rs20 on August 03, 2015, 11:31:56 amyes 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.

author: rs20
author_rank: Super Contributor
timestamp: August 03, 2015, 12:02:24 pm
content: Quote from: hurricanehenry on August 03, 2015, 11:36:01 amYou'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.

author: hurricanehenry
author_rank: Regular Contributor
timestamp: August 04, 2015, 01:09:55 am
content: Quote from: rs20 on August 03, 2015, 12:02:24 pmAh yes, you're right. My bad.