poida
 Guru
 Joined: 02/02/2017 Location: AustraliaPosts: 1432 |
Posted: 07:29am 05 Nov 2018 |
|
|
|
Software side is most flexible in my view.
I would get a signal from current (maybe dedicated current sense amp IC), low pass it to remove noise and then you can sample it at any part of the 50Hz waveform as you like.
A very low frequency filter would be equivalent to DC and give you the "average load" measure you might need.
I would put the over current test in the 100Hz code that is executed in loop(). One ADC, and a few integer operations to scale, compare and set the run/stop flag to stop. There is time available to utilse the serial comms port, maybe connect a 20 x 4 LCD to it? The serial port comms code I would put outside the 100Hz part of loop().
It's just as possible to do it in hardware, op-amps are very flexible in these sorts of applications.
I only ever run the IR2184 at near minimum dead time anyway so go for it. wronger than a phone book full of wrong phone numbers |