Arduino AC Meter Design LM358

MrChips

Joined Oct 2, 2009
34,628
Two problems.

1) You are missing power supply decoupling capacitors between pins 4 and 8.

2) Your circuit is not safe if it is to be connected to AC line voltage.
 

Thread Starter

eversite

Joined Feb 24, 2025
3
Two problems.

1) You are missing power supply decoupling capacitors between pins 4 and 8.

2) Your circuit is not safe if it is to be connected to AC line voltage.
Thanks.
but do you have any suggestions for the batter schematic diagram
I'm try making the Amp Meter using arduino
 

schmitt trigger

Joined Jul 12, 2010
2,027
Two words: track clearance.
Additionally, the circuit will clip the negative waveform and you may actually damage the LM358 with the negative voltage at its inputs.
 

crutschow

Joined Mar 14, 2008
38,316
Need a schematic of the analog portion of the circuit, not just a PCB layout wiring diagram, which is not a schematic.

Have you simulated or breadboarded the analog part of the circuit to see if it does what you want?
 

Thread Starter

eversite

Joined Feb 24, 2025
3
Need a schematic of the analog portion of the circuit, not just a PCB layout wiring diagram, which is not a schematic.

Have you simulated or breadboarded the analog part of the circuit to see if it does what you want?

i dont have the schematic, the diagram i get from download
and i just layout the pcb to etching

im not expert electronic engineer
 

crutschow

Joined Mar 14, 2008
38,316
im not expert electronic engineer
You don't have to be an engineer to draw a circuit schematic.
I can't really understand your circuit without converting your wiring diagram to a schematic with schematic symbols for the parts, and the one that wants free help is the one to do that conversion. :rolleyes:
 

AnalogKid

Joined Aug 1, 2013
12,043
Third problem: No power source connection in the "schematic".

Also, the circuit is not galvanically isolated from the AC mains. This means that anything else powered by the 5 V source is potentially (!) lethal.

Please post a link to the source of the circuit so we can see what it is intended for and evaluate it.

ak
 

AnalogKid

Joined Aug 1, 2013
12,043
CT2 is a GND connection. Move it all the way to the left below the GND pad.

Move CT1 as far right as possible.

Move the 47 ohm resistor (REFERENCE DESIGNATORS!) to the left, between CT1 and CT2. This eliminates the jumper and its pads.

What is the outside diameter of the pads for the IC? What is drill size? What program are you using to create the layout?

You *really* need to add reference designators to each component both on the schematic and on the layout.

ak
 
Last edited:

sghioto

Joined Dec 31, 2017
8,633
There is nothing on the "schematic" to indicate if that pin is an input or an output. If an output, what powers it?

ak
It's an output pin powered from the USB connector mounted on the left end of the Arduino.
Or powered via the Vin pin on the Arduino (7 to 12 volts).
 
Last edited:

meth

Joined May 21, 2016
298
Two problems.

1) You are missing power supply decoupling capacitors between pins 4 and 8.

2) Your circuit is not safe if it is to be connected to AC line voltage.
I 100% agree with these remarks, but if I can say, it is 10000 times more important to stress to the TS, how much this is NOT SAFE to be connected to 220V AC.
So the list of issues would be:

1. NOT SAFE FOR LINE VOLTAGE.
2...
3...
4...
...
..
xx. You are missing decoupling caps.

:D
To address this issue, in my opinion you have 2 options, to design 5VDC power supply with transformers, rectifier and other components (you can find various schematics online). This would have to be a second PCB in your project. Or you can buy a separate power supply for 5VDC, which are cheap, this project doesnt require much current at all so you can probably find a supply for less than 10 dollars.
 

dendad

Joined Feb 20, 2016
4,634
Use a transformer for the power supply.
1740472689572.png
It will save the mains from killing you or someone else.
The extra diode after the bridge rectifier isolated the mains voltage sample from the smoothed DC supply.
The pot is used to set the voltage sample level.
 

AnalogKid

Joined Aug 1, 2013
12,043
Mains-direct projects are especially dangerous for the inexperienced, and the board layout definitely needs work.

BUT

The peak mains current is 120 uA and it takes *five* component failures for this to increase to a level that still is too low to trip a GFI circuit. To me this means that the circuit is not automatically disastrously dangerous. The problem is with whatever the USB cable is connected to. If it is a wall wart, then things just need adjusting. If it is a computer, that is a *big* problem.

And . . .

This is for any up-to-date safety agency gurus out there:

It's been a while since I've done this for real and the rules probably are tighter, but - for a mains-connected, low energy device such as this, aren't two resistors in series with the line sufficient for safety agency approval (assuming a better board layout, a fully insulated case, etc.)?

ak
 
Top