Test an ACS712 current sensor module with display on a 5110 LCD
This is a quick test of a current sensor module I picked up recently. It is rated for 5A (but other modules are available for different current scales).
The circuit simply measures a variable current (manually controlled wiper on a pot) and displays the result on a 5110 LCD. Minimum resistance of the load circuit is 10Ω, so +/-50V maximum input voltage to keep within the +/-5A tolerance of the module.
For test purposes with a 5V source and 0.25W resistors, I have R2 is set at 100Ω to prevent an overload. That means my test source only ranges from 0-50mA, so not a real power test.
In an alternative configuration, I have a 9V source pumping ~700mA through the current sensor.
At first my resultswere terrible, like+/-0.7A measuring as +/-0.2A. These readings are coincidentally quite consistent with a +/-20A scale. When I change to +/-20A sensitivity then suddenly my readings are very close to what my multimeter says.
Although the chip on my module is clearly marked ACS712ELC-05B (+/-5A sensitivity according to the datasheet), I’m guessing it is really an ACS712ELC-20A (+/-20A). Perhaps wrong markings in a QA reject batch? Perhaps also why it shows up in a 70 cent module from China!!
- the current sensor chips: ACS712ELC-05B
- pin 5V power supply, on-board power indicator
- the module can be measured plus or minus 5 amps, corresponding to the analog output of 185 mV / A
- there is no the detection current through, the output voltage is VCC / 2
Given the +/-5A range and taking a reading through the analog point (0-1023), then the
actual current will equal the
analog input / 1023 * 2 * 5 - 5.
That’s a resolution of around 10mA, so not very sensitive, but perhaps good enough for gross current monitoring.
|+||Sensor power 3.3/5V|
|VCC||Input positive DC|
The module is basically connectors and a few supporting components around an ACS712 surface mount chip that does the hard work.
5110 LCD SPI Configuration
The u8glib takes advantage of hardware SPI, which means pin connections are dictated for at least MOSI and SCK.
Here’s the mapping from the terminology used by my particular 5110 module and pins on an Arduino Uno.
|Pin||Usage||Arduino Uno Pin|
|CE/SCE||chip enable||10 SPI SS|
|DC||address line 0||9|
|DIN||data in||11 SPI MOSI|
|CLK||clock||13 SPI SCK|
|BL||Backlight on when GND|