AC current detection

Good day

Hope someone can help me. I need a sketch for detecting AC current and then activating a 30a relay.

This system will detect use of power tools and then activate additional equipment. the tools that will be used are all 220v and vary between 300w and 1500w. a 2sec start and 10sec stop time will also be required.

I will use a 30a acs712, Arduino UNO or Micro and 30a relay and of course a apropriate power supply.

Any help or nuge to the correct forum will be apreciated as i am very new to coding,

samhiepner: Hope someone can help me. I need a sketch for detecting AC current and then activating a 30a relay.

The usual way to start is by making an honest effort on your own to get something going. When you're stumped or things don't work the way you think they should then post here. Important info:

https://forum.arduino.cc/index.php?topic=148996.0;

https://forum.arduino.cc/index.php?topic=223286.0

and:

Check out the first five examples in IDE-> file/examples/digital. There are others but these are some of the most often needed.

I will use a 30a acs712

This is neither safe nor a good idea.

For safe AC current detection using a current transformer, see this tutorial.

Yes, the ACS71x chips "reinforced isolation" voltage rating isn't as high as you might expect given the pulse voltage figures. "Reinforced isolation" is the protection level a single barrier needs to be deemed equivalent to double-insulated protection.

Most Current transformers are inherently double-insulated, and many are clamp-on so no disturbance of the mains circuitry is needed so long as the line and neutral wires are separate at the point of measurement.