Measuring Four Input Voltages

Hello,

I've read multiple articles and posts regarding reading voltages with Arduino. I have no experience with this feature.

I have 5 leads coming from a particular external device: L1, L2, L3, L4, GND (Common)

L1 through L4 will have voltages less than 5v. The common GND provides the return path for leads L1 through L4.

It is my understanding that if I want to read the voltages on leads L1 through L4 I can attach them to inputs A0 through A3 and connect the common GND lead to the GND pin on the Arduino, the one next to the 5V power pin. I would then write and run the appropriate code on the Arduino to read the voltages.

Is this correct? The reason I ask is that I'm concerned that the Arduino will introduce voltage/current into this external circuit. I just want to make sure.

Thanks.

Connecting the four inputs is comparable to connecting to four 1 Megohm resistors to Gnd. Not much impact to your circuit. Analog inputs go thru an analog mux to a sample & hold capacitor, if your source has less than 10K ohm source impedance, it can take 'longer' to charge the cap up, usually taking two readings and just using the 2nd reading is sufficient.
If your circuit is sensitive to that minimal loading, then you need to look at having op-amp buffers between your signal and the ADC.

the one next to the 5V power pin.

No connections to the 5V power pin are needed.

CrossRoads and jremington, thank you very much for your help. I was worried about the impact to the external device when the Arduino GND pin was included in the circuit.

I'm a programmer that's not experienced with electronics but am I learning. I'm sorry if I was over-cautious and asked a dumb question but I'd rather take some ridicule as opposed to damaging my equipment.

I'm sorry if I was over-cautious and asked a dumb question but I'd rather take some ridicule as opposed to damaging my equipment.

Don't be sorry for asking!

Beware of tutorials on the web (e.g. motor control) -- many give extremely bad advice and if you follow them without question, you are very likely to damage your equipment. "Instructables" is one of the worst of those.

Hi,
What is the application, what devices are supplying the 0 to 5V signals.

Thanks.. Tom.. :slight_smile:

Hi TomGeorge,

The device supplying the signals is a special SCSI channel terminator with diagnostic LEDs. It has a 5-pin pinout that can extend the LED signals to a remote annunciator:

SCSI Terminator: http://www.granitedigital.com/50pincentronicsm.aspx

Remote annunciator: http://www.granitedigital.com/optionalremoteledpak.aspx

Instead of connecting and using the remote annunciator I want to send the signals to a Ruggeduino SE so I can drive a different set of LEDs based on the information I'm receiving from the terminator and from a Linux host. This is for a retro computer modding project involving two old Qualstar 1260S reel-to-reel tape drives.

Thanks for asking.

Be conscious that the Arduino has only one ADC which is used for all of the analog inputs. When you switch from one analog pin to the other it is a good idea to discard the first reading as it may represent a residue of the value from the previous pin.

...R

Hi,
So are the voltages 0 and 5V, or 0 varying up to 5V?
Are you looking at a digital signal or an analog one?

Tom... :slight_smile:

That doesn't sound like analog inputs are needed. Are the LEDs only On or Off? That only needs a digital input, with maybe a buffer chip depending on the voltage levels of the LEDs.

Tom and CrossRoads,

That's a good question. They rapidly flicker and also PULSE (i.e., increase and decrease in brightness). I don't know if this is due a varying voltage or a varying rate of on/off.

Wouldn't an analog input pin work for EITHER scenario - either an on/off (digital) or a varying voltage (analog)?

All I need to know is if there is ANY voltage being received on a lead.

Robin2,

How do you "discard" the voltage reading? Do I just set the variable I am using to zero?

Thanks

MossyRock:
How do you "discard" the voltage reading? Do I just set the variable I am using to zero?

Something like

myVal = analogRead(pin);
myVal = analogRead(pin);

the first reading just gets over-written.

...R

How do you "discard" the voltage reading? Do I just set the variable I am using to zero?

Maybe a better word is "ignore".

I don't know if this is due a varying voltage or a varying rate of on/off.

SCSI is digital (on/off). It's going to be switching faster than the Arduino can read, but that's OK... The LEDs are also flashing much faster than your eye can see.

Wouldn't an analog input pin work for EITHER scenario - either an on/off (digital) or a varying voltage (analog)?[/quote]Correct.

analogRead() is slow tho.
Reading them as digital inputs, maybe using PCINT, will be way quicker.

Thanks, everyone.

Yes, obviously the signals on the SCSI bus are digital, but the signals I will be reading are not those ACTUAL signals - the signals I will be reading are facsimilies/representations of certain bus signals, made by monitoring circuits in the special SCSI terminator. They may well turn out to be digital as well, or not...

I'll try both approaches - using analog input pins and then digital input pins - and see which works best.

A question - are all of the Arduino GND pins connected to the SAME ground bus, even if they are on opposites sides of the board? I.E., there is a GND pin on the analog pin side, and several GND pins on the digital pin side.

Thank you.

Never mind on the question - I found the answer. They're all the same ground.