Converting Analog ammeter to Digital Meter Using Arduino

TomGeorge:
Hi,

What do you want to do with it?

What is your electronics, programming, arduino, hardware experience?

Tom.... :slight_smile:

I just wanted to change the meter.

I replied on post #3, my experience on coding is good, but newbie for electronics.

Grumpy_Mike:
No.

Have you understood nothing of what I have told you?

Sorry Mike, I don't hav any electronic background. Would you mind explaining in a much simple way? Much obliged.

OK this diagram is a highly simplified view of your setup for one meter. There is a power supply and the meter is measuring the current by measuring the voltage across a shunt resistor. All well and good, so you connect an Arduino to the positive end of the meter (maybe through a potential divider but that matters not here ). The negative end of the meter is connected to the ground of your Arduino. Now this is fine as long as the Arduino is battery powered but say it is powered by a computer and the ground is connected to earth, and the power supply is connected to earth as well. That means that both ends of the power supply are connected to the same place, hence it is shorted out.

Suppose you have three meters each monitoring different parts of the circuit, connecting the positive end to three analogue inputs is fine, however you have to connect the ground of the Arduino to the negative side of each meter. Therefore you are connecting together all the negative sides of every meter. Do you think the power supply will still work?

Thanks Mike for this sophisticated yet concise reply.

Grumpy_Mike:
OK this diagram is a highly simplified view of your setup for one meter. There is a power supply and the meter is measuring the current by measuring the voltage across a shunt resistor.

Just to confirm, the shunt resistor is built-in the meter itself? I do not have to add additional shunt into circuit right?

Grumpy_Mike:
Now this is fine as long as the Arduino is battery powered but say it is powered by a computer and the ground is connected to earth, and the power supply is connected to earth as well. That means that both ends of the power supply are connected to the same place, hence it is shorted out.

I'll power my Arduino using my laptop or a DV 9V adapter. So how should I do?
Thank you.

If a meter has only one linear scale, labeled as 'A' or 'V', the resistor is built into the meter.

You can power each Arduino by its own DC adapter. But never connect an Arduino to a meter and to a PC at the same time.

Just to confirm, the shunt resistor is built-in the meter itself? I do not have to add additional shunt into circuit right?

The shunt resistor is most likely included in the circuit already, you don't have to add it. This is just an illustration of the current measuring side of your power supply.

Incidentally I would call what you have a transmitter rather than a power supply. Depending what the load is you might need a licence to operate it.

The other meters are for RF power and SWR and have a very different sort of circuit so the Arduino reading those need to be totally isolated. You can not feed all three Arduinos into the same computer without adding isolation circuits to each. The simples iway is to use an isolated USB lead but these are not cheap and you need three of them.

If you can stand sampling the readings at say something like one a second then a flying capacitor circuit is far better. Then you only need one Arduino and you can connect it direct to your computer with a normal lead.

Hi,
What voltage does the powersupply/transmitter operate at?

The shunt will be at this potential and it may be dangerously high.

Can you post pictures of the inside of the unit please and the back of the meters?

I am asking these questions for your own safety.....

Tom... :slight_smile:

Grumpy_Mike:
The other meters are for RF power and SWR and have a very different sort of circuit so the Arduino reading those need to be totally isolated. You can not feed all three Arduinos into the same computer without adding isolation circuits to each. The simples iway is to use an isolated USB lead but these are not cheap and you need three of them.

If you can stand sampling the readings at say something like one a second then a flying capacitor circuit is far better. Then you only need one Arduino and you can connect it direct to your computer with a normal lead.

I checked the circuit of the meters. I noticed RF-W and VSWR share the same GND, so i tap both meters + to the analogs and - to the GND. It turns out working fine.

Besides, I try to measure the Voltage of the meter itself and I found out the output can goes up to 6.5V.
Could I add a resistor to bring down the voltage to the maximum of 5V?
How much ohm of resistor should I include in the circuit?
Thank you =)

TomGeorge:
Hi,
What voltage does the powersupply/transmitter operate at?

The shunt will be at this potential and it may be dangerously high.

Can you post pictures of the inside of the unit please and the back of the meters?

I am asking these questions for your own safety.....

Tom... :slight_smile:

The power supply is operating at 100V.
At post #11 I included the back of the meter.
Here's a more detail picture.


Thank you =)

Could I add a resistor to bring down the voltage to the maximum of 5V?

No not one resistor, that does not reduce voltage.
What you want is a potential divider, that is two resistors.
Use this:-

Make the bottom resistor 47K.

Grumpy_Mike:
No not one resistor, that does not reduce voltage.
What you want is a potential divider, that is two resistors.
Use this:-
Electronics 2000 | Potential Divider Calculator
Make the bottom resistor 47K.

Ok thks!
Any measure should I take to make sure my resistors won't catch fire again?
I'm currently using 1/4W rating resistor.

You need to drop as little volts as possible across your current sensing resistor so
as not to dissipate loads of power and limit the output current.

There's a very old trick from national semi to do this - see attached.

I think LT make specialist chips to do this - but otherwise you need an opamp which will handle input volts at up to its Vcc, and a high enough working supply voltage .

regards

Allan.

ps if anyone wants me to flog thru the sums, post me!

edit - well ok.

basically the trick is to see that the current thru R1 and R2 must be in their ratio for equal voltage drop - in the case 1/10000. So 1 amp in R1 requires 1/10000 amp in R2. The same current flows thru
R3 - 10,000 ohms , so would generate 1volt.

Have just notiiced this is a 100v supply, so you would have to arrange a much smaller voltage
across the opamp supply, Q1 would have to be a high voltage device, and you may need a level
translator from the opamp to drive Q1.

regards

Allan.
If interested I'll figure it out.

HiI.pdf (17.5 KB)