how to sense small current on DC line

Thread Starter

thor21

Joined Sep 29, 2024
435
i think software etc i can handle...

all i need it to somehow get signal and open/close relay (based on the power) maybe i am wrong.
Ideally yes some esp32 that can find out state of the relay.
 

Irving

Joined Jan 30, 2016
5,144
ESP32 could be used, but is arguably overkill, Nano is OK, plenty of others, eg Seeed.- depends what you can get that's cheap really.

Here's my thinking...

1762452443399.png
 

Irving

Joined Jan 30, 2016
5,144
@Irving yeah, thanks
question would be logic between HZ/HZ, interface and Nano. Remaining should be easy.
No logic, just some analog buffering to present high-impedance to HZ input, and low impedance output to differential ADC input with a bit of low-pass filtering on the way to remove any noise and impulse transients on the bell push wires.
 

MisterBill2

Joined Jan 23, 2018
27,672
At one point, a ways back, the TS explained tat they needed to know if a power failure was just in their Flat, or was it the whole building lost power. The importance of THAT knowledge was not explained that I could see.
Of course, it might also work to just have a device listen for the ambient mains frequency hum. THAT level would drop if the whole area lost power. At least I think the level would drop quite a bit.
 

Thread Starter

thor21

Joined Sep 29, 2024
435
What device can do that? And i assume it has to be placed close to building main electricity cables etc.

So assuming to design what Irving desctibed is not 5min excercise.
 

MisterBill2

Joined Jan 23, 2018
27,672
What device can do that? And i assume it has to be placed close to building main electricity cables etc.

So assuming to design what Irving desctibed is not 5min excercise.
Not really! The ambient electrostatic field at the mains frequency is present at very low levels all around us. That is the hum picked up on inadequately shielded audio cables. The only real technical challenge will be boosting that signal enough to operate a relay providing the verification that mains power is present locally. The classic circuit will be two stages of gain in a dual opamp IC, rectified and used to trigger a 555 timer IC set for some short delay to avoid false triggering. The 555 will bias an NPN transistor to operate a relay. The complete circuit is shown in great detail as a "VOX" package in most versions of the ARRL publication "Radio Amateurs Handbook" for the past 20 years. Hopefully somebody can post a copy for the TS.
 

Irving

Joined Jan 30, 2016
5,144
Not really! The ambient electrostatic field at the mains frequency is present at very low levels all around us. That is the hum picked up on inadequately shielded audio cables. The only real technical challenge will be boosting that signal enough to operate a relay providing the verification that mains power is present locally. The classic circuit will be two stages of gain in a dual opamp IC, rectified and used to trigger a 555 timer IC set for some short delay to avoid false triggering. The 555 will bias an NPN transistor to operate a relay. The complete circuit is shown in great detail as a "VOX" package in most versions of the ARRL publication "Radio Amateurs Handbook" for the past 20 years. Hopefully somebody can post a copy for the TS.
But how will that distinguish between local failure in the apartment and 'global' failure in the whole building, which is the whole purpose of the exercise? The building field will be swamped by the local field, and may be too weak to be detected at the apartment level anyway.

The VOX circuits you allude to assume an audio feed from the mic circuit, albeit low-level, to switch the transceiver to transmit mode; I've not seen anything that relates to ambient fields, which in any case will be several 10's of dBm below that level.
 

MisterBill2

Joined Jan 23, 2018
27,672
The plan would be to use an unshielded connection to the circuit's microphone input to sense the ambient mains frequency presence AND to use a local mains powered relay to sense the nearby mains power presence. I did not realize that it was not obvious to others. My apology for not explaining the whole scheme initially.
 

Irving

Joined Jan 30, 2016
5,144
The plan would be to use an unshielded connection to the circuit's microphone input to sense the ambient mains frequency presence
No, I understood that. My point was that the 'ambient field' is likely to be difficult to detect and may not be 100% deterministic as to what you're detecting.
 

MisterBill2

Joined Jan 23, 2018
27,672
In my part of the world it would work very well. Given that the TS resides in a multi-unit multi story residence, I anticipate that it is not some off-grid rural location, but rather in an area with electrical service to all, fairly nearby. So unless every bit of everybody's electrical service is enclosed in well grounded metal conduit, the mains electrostatic field will be simple to sense.
 

Irving

Joined Jan 30, 2016
5,144
Here's my first pass solution. Powered from a USB wall-wart via an off-the-shelf battery manager board and a single Ii-ion cell, this monitors the HZ connections (doesn't matter which way round) and the input from the wall-wart, and raises the appropriate output to shown either remote (HZ) or local (USB) power outage to the MCU/GSM boards (not shown).

1762686675921.png

The interface can easily be fitted onto a 70mm x 40mm piece of stripboard:

1762692329268.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,672
Certainly the door bell monitor will provide data about the local mains power. For power to the building and surroundings, sensing the ambient field is one scheme that should work. Two completely different variables to be sensed.
 

Thread Starter

thor21

Joined Sep 29, 2024
435
Certainly the door bell monitor will provide data about the local mains power. For power to the building and surroundings, sensing the ambient field is one scheme that should work. Two completely different variables to be sensed.
i dont get it ... can u elaborate what do u mean?
 

Thread Starter

thor21

Joined Sep 29, 2024
435
hello @Irving
sorry was trying to complete another 2 project that i have opened in different threads - almost done and time to that one.

May i ask what exactly are :

Local_out
Remote_out

What battery cell is used ie how many volts/capacity mah?

also what exactly is meant by battery manager? and usb-c?


Other components i am going to order in meanwhile.

Thanks!


1763341850084.png
 
Top