Current Sensor
The current sensor uses a Texas Instruments INA219B to measure DC voltage and current. It can measure voltage up to 26 volts and current up to 2 amps in 100 microamp increments.
Assembly
Wiring
The current sensor has three connection points marked A
, B
, and C
. There are
two ways to connect the sensor depending on your circuit:
Power Source
Use this method if you are measuring the output of a power source (like a battery, solar panel, or wind turbine), with nothing else in the circuit.
- Connect the positive wire (usually red) from your source to point C on the sensor
- Connect the negative wire (usually black) to point A on the sensor
Other Circuits
Use this method if you are measuring the voltage and current at some point in a circuit with a power source and a load. For instance, if your circuit is an LED, resistor, and a battery - use this method.
- Find the point in your circuit you would like to measure. In our example above, we'll insert the sensor between the battery and the LED.
- Connect the positive wire from the battery to point C on the sensor.
- Connect the positive leg of the LED to point B on the sensor.
- Connect the negative leg of the LED to the resistor, and the resistor to the ground wire of the battery.
- Also connect the ground wire of the battery to point A on the sensor. This means that the ground wire from the battery will be connected to both the resistor and point A on the sensor.
Getting Values
You can use the current sensor with the Sensor Plotter to see realtime values from the current sensor.
- Open the WireGarden sketch in the Arduino Programmer
- Open the
Options
tab - Scroll down to
Enable INA219 Current Sensor
and check the box - Send the sketch to your Arduino
- Open the Sensor Plotter
- Add an INA219 Sensor. (The Sensor Plotter Documentation has more information about adding sensors)
The available Sub-Types for the sensor are as follows:
busVoltage
: The total voltage seen by the circuit in volts.shuntVoltage
: The voltage between C and B or C and A (depending on how you've connected the sensor) in millivolts.current
: The current at the measured point in the circuit. This is calculated using Ohm's Law and the shunt voltage.
You can also use the WireGarden library and the Arduino IDE to configure a current sensor.
Project Ideas
Electromagnetic Induction
You can demonstrate electromagnetic induction using the current sensor, a bar magnet, and a coil of wire. Strip the ends of the wire and create a coil just a little wider than your bar magnet. Then connect the ends of the coil to points C and A on the current sensor. Next, while monitoring the sensor values in the sensor plotter, repeatedly pass the bar magnet through the coil. The moving magnetic field will induce a current in the coil.
Additional Information
The datasheet for the INA219 chip can be found here: http://www.ti.com/lit/ds/symlink/ina219.pdf
Please contact us at support@manylabs.org if you have any questions.