S0 meter reading and minimum amperage

I've built a power meter reader prototype using an Arduino Mega, that reads the S0 pulses of five separate utility meters, with a 10K resistor inbetween each Mega pin and the S0 line.

There are two auxiliary boards connected to the Mega: an SD card reader for backing up data, and a W5500 board for Ethernet communication. Not sure how much mA those two consume, but everything works great, so the Mega seems to provide enough "juice" for the two boards AND five S0 connections. However, I want to shrink the whole solution down in size, preferably using something with the form factor of the nano boards (I think one of them can provide 5V output?). My concern is that weaker boards wont supply enough amps for the two aux boards and five S0 connections. Each cable connected to the S0 output on the meter is 2 metres long, and is AWG18.

My question is, how many mA per pin do I need to maintain a 5V current over a 2 meters AWG 18 cable? I guess I could just provide 5V with enough amps from a separate power supply, but it would make everything a lot easier if I could just power everything from the Arduino.

5V is not a current...
Do not worry about your S0 connections if they have 10k resistors. The current will be very limited and not cause any trouble.
The wifi and sd card will take more current. I guess you will operate them sequentially (one after another). You would need to look up the max currents of your boards. And compare that with the max current available from your nano. Best would be to feed 5V directly into the 5V pin. That way the max current of nano is not important, only the max current of your power supply. Wall mart 5V usb supplies are cheap and usually give you 1 or 2 amps. You might also have several old phone chargers in your drawer that you could use...
If you put 5V on one side of your cable, you should have 5V on the other side. If you have less (than 4.8V or so) you should reduce power consumption or get a cable with more copper.

5V is not a current...

Hehe, well, that shows how much I master the terminology here. VOLTAGE... not current.

I'm leaning towards a separate power supply, but just to check if I can avoid it...

According to this: https://store.arduino.cc/products/arduino-nano
each pin's current is defined as 40 mA (if I'm reading the specs correctly), but that is a maximum, right? I think that is fine for maintaining power through a 2 metre AWG 18 cable... however, I can't see what the max combined amp output for the whole board is... let say that the max total output current for the Nano is something like 100 mA (just an example, I have no idea), and I have 5 pins each reading a S0, that would then amount to 20 mA per pin, correct? (for now, let's just forget the aux boards). Will 20 mA per pin still be enough to read the S0 pulses over the beforementioned cable? Is there a way to calculate the minimally required amperage?

Edit: the cable type can't be thicker, because we can barely fit them in cable glands as it is now.

40 mA per I/O pin is not recommended. 20mA is seen as safe.
As you have a 10kohm resistor, the pins will never reach 20 mA, but only 0.5mA, so no problem at all.
You should not feed things through your I/O pins (LED's excepted). You should feed things via 5V pin (or separate power supply) and control things through I/O pins.
A scheme would really help us helping you...
If you do not feed things (motors, SD card readers) you will not need a bigger cable.

AWG18 cable will happily carry 8 AMPS even in bundles. So

why not go down to 24AWG?

A 2m run will still only have a resistance of 0.2 ohm

You havent said how the S0 interface will be connected - see the link - source mode or sink mode.

If connected in sink mode with a 1k resistor to +5V you will get a current a bit less than 5mA flowing for the duration of each pulse. or 25mA in all.

That current does not flow into the logic pins defined as inputs. And its a safe current anyway.

I'd not use 10k resistors - it could make the system subject to interference. Go for 1k.
You could also decouple the digital inputs to ground via small capacitors - say 0.1uF.

why not go down to 24AWG?

Honestly, I'm not sure. I'll try to make a case for 24 AWG and see if there is agreement.

It took me a while (never used the Fritzing software before) but this is essentially our prototype setup. I've only drawn three S0 outputs in, but we want to support 8. Just didn't want to draw all of them in at once.

The meter units we are testing on are DZT 6002
Spec sheet for DZT-6002

Its not realistic to use an arduino board as a power supply for a finished unit.
You will need a regulated 5V psu ("USB wall wart") that will supply all your current needs and also power the nano.
The nano seems a good choice as you have enough digital pins to read 8 inputs and also provide a visual indication of its operation with some leds.

The fritzy shows the inputs connected with pull-down resitors; it would be better to work in "sink mode" with pull-ups. Also as I said earlier you could usefully decouple the inputs to ground via small caps.

With 8 inputs and 1k resistors your max current for the switches (in the VERY unlikely event all are closed at the same time) would be 8 * 5ma = 40mA.
I'd separate the power to the pulse input board via a small resistor (say 22 ohm) in the 5V rail, and a decoupling capacior - say 10,000uF.

I'm working on a new setup with a smaller Raspberry Pico and will post the fritzing drawing soon, if all goes well. I will also try an incorporate the decoupling capacitors.

In the mean time, a question:
Since the s0 inputs will now have to be powered by the external 5V power supply, could I just run the 5v signal through a 3.3v-5v logic level converter like this (Image of txs0108 logic level converter) and continue the signal to the Pico GPIO? Or is that kind of converter only for stuff like I2C and similar?

Edit: Could I use an octocoupler? Would that not guarantee that since there is no direct connection between the S0 connection and the Pico, the Pico will always be safe? Also, would it now allow me to use more than 5V with the S0 connection without having to change my setup?

In relation to my above post, I just stumbled upon this GitHub post, where the poster converts 5v to 3.3v using two resistors. Seems the most simple solution to me, so I tried to adopt it to my usecase, but with just a Raspberry Pico (powered via USB, very likely the same external 5v power supply as the breadboard uses):

Am I completely in the woods here, or would this work?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.