ACS712 driver

Introduction

The ACS712 current driver measures current in mA (Milliamps). It is hall effect based and reports the current by sending an analog value to the Builder Base.


Driver Parameters

The ACS712 driver has three parameters that have to be configured:

Pin

This is the pin receiving input from the ACS712, any pin is suitable for this driver.

Resolution (mA)

The Resolution is the minimum change the driver reports before the system gets notified.

For example in in the metric system, if our latest reading was 1000mA and the resolution is set to 200, the builder base is not going to notify the central core unless the value is <800mA or >1200mA.

ACS Model

There are 3 versions of the ACS712. One that measures up to 10A, 20A or 30A. Select yours here. The number can be read on top of the IC.


Wiring

The wiring of the ACS712 can be found below:

Example

 Breadboard

Schematic

Used Pins

Used Pins

Description

Used Pins

Description

GP0

The analog value from the sensor


How to write an App

Navigate to the App Builder and create a new application. You can find the “Current” hardware object under the “Hardware” Tab in the object drop down menu on the left, or you can also use the search bar.

Drag the “Current” Object onto the canvas. We also need a “Text” interface object.

Connect the “Current“ Port to the “In“ Port of the Text Interface Object. We can now see the mA measurement of the sensor in our text field on the dashboard.


How to create a firmware

Navigate to the Firmware Builder and create a new firmware file.

Click the “+ Add Hardware” button which will open a modal window. Scroll down in the list to find the “Sensor” section and select the “Current” hardware option.

Give your device a name, and click “Add Device”

 

 

 

Next, select the “ACS712” driver under the driver dropdown menu, set the Pin, Resolution and ACS Model.

 

 

For this example we select:

  • Pin: GP1

  • Resolution (mA): 10

  • ACS Model: 30A

You may now save your firmware file and upload it to one of your clients.

 

 

 


Supported Hardware

  • Current


Downloads

Apps

 

Firmware

 

Assets