If you think you’ll be measuring currents over 10A you must remove the plastic connector on the ACS712 module and directly solder the wires to the board. Note for ACS712 30A version: please do read the article about 30A version. Plus, I compared readings from ACS712 to the one of the energy meter and I added some range-based adjustments, you’ll find an IF-chain in the code. I suppose noise and reading fluctuations don’t impact readings how it happened for DC current. If you want to do some console printing on ATTiny you can uncomment all the lines with DigiKeyboard but you will have to also comment out the Virtual Wire code (all of it), otherwise 6KB wont be enough anymore.Īlpha filtering algorithm is here implemented as a single line of code, opposed to DC version where I applied it on a 1000 consecutive current readings. The most difficult job was to get everything working in the 6KB memory of the ATTiny. Piece descriptionĬode is very simple, it uses Virtual Wire library to manage the 433MHz transmission this was the only library I managed to get working on both Arduino UNO R3 and Digispark ATTiny85. These are the components needed, choose between a Digispark or an Arduino UNO R3 board (I always buy Arduino boards with the old big USB port, like the one on printers it’s much more solid that micro/mini USB ports).
I suggest to have a look at the original detailed article, this is a simple porting of that code. It has a very small memory usage and runs on both Arduino UNO and Digispark ATTiny (or compatible boards). This is the AC version of the program I published last year with that nifty alpha filter algorithm. Read AC current and transmit reading via 433MHz