I need to determine whether a pump motor is running, and use that to trigger an ESP32. As luck would have it, the next day a colleague at work mentioned needing something similar for his home automation system. So, I created a video to describe the operation of the initial circuit that I created.

Measure instantaneous current from 0 to 10 Amps, with 0.5 Amp accuracy

Detect low current and overcurrent conditions

Stretch goal: identify surges during load switching

Constraints…

Size, I have some flexibility but an initial goal is to have the power and logic boards fit into a 4” x 8” space.

Standard U.S. single phase AC power

will be installed outdoors in an IP-67 enclosure

I have some aversion to messing with AC line voltage, and generally I work with little more than TTL levels. So, I opted for an isolated approach, that is: the AC line voltages are completely separated from the microcontroller and other logic.

This will allow me to have the AC sensing circuitry on a separate board allowing me to poke and prod the microcontroller without concern of any shock hazard.

Here’s a typical setup for the hall-effect sensor, and here’s a breakout board mounted in an enclosure to make using it on the bench with AC line voltage a bit safer.

{insert picture of ACS756 breakout}

I initially tested it out using a heavy DC power supply and load… it worked fine, was moderately accurate, and simple.

Results:

usable, but not great…

Test Results:

{ put in table here }

For AC current tests the system configuration is

Test Results:

… the results were a mess… random numbers all over the place!

Why?

When no current is flowing through the ACS756, the output is about 2.5V.

When we run positive current (the + output of the line is connected to the + on the ACS756), the output of the sensor goes up.

If we run negative current (the – output of the line is connected to the + on the ACS756), the output of the sensor goes down.

In this test we ran alternating current through the device, causing the ACS756 to provide a sine wave like output.

The readings were somewhat random, as it depended on where in the wave the Arduino took the sample.

{ put in table here }

I did try using a peak detector circuit. That helped, but the results were non-linear and it was really going to complicate things.

New Mantis Compact inspection scope arrived, with articulated boom arm. The Mantis on the left with the standard binocular AmScope on the right.

This scope provides a great 3D view, without peering through little eye pieces. The Mantis provides a much sharper image than the Amscope’s optics. And you can shift sligtly while looking through the Mantis and change your perspective of the board, this is very handy for getting a better perspective when working on small devices.

The AmScope is still handy for high magnification (up to 200x), but most inspection work is in the 4x – 8x range, and the Mantis is great for that.

The optional articulating arm provides good reach across the workbench, and was a worthwhile option.

Here’s the main controller, on the breadboard, and the readings from the Vref and SPI ADC.

Uses a PIC18F26K22 as the main controller, reads settings from BCD switches and controls SSD relays via a pair of MCP23S08 SPI chips, beacon and marker lamp currents are measured using 50 Amp ACD756 hall-effect sensors, their output is digitized using an MCP3004 ADC set to take differential readings.