The Energy Sensor is a component in the Smart Solar Energy Kit. It measures electrical energy (supply) and can charge or power electronic components (load).

It can attach to blocks that come in the Climate Action Kit and Smart Solar Energy Kit.

Forward Education's Energy Sensor

The Forward Education extension comes with several new blocks you can use to control the energy sensor. Download the sample code below to your micro:bit to get started with testing your energy sensor.

Sensors

Sensors Drawer Makecode

From the toolbar, select the Sensors drawer, and scroll to the Energy category.

The blocks within this category are used to measure electrical input and output when plugging objects into the sensor.

  • Load: Connect using a USB cable, measures current in milliamps (mA)
  • Supply: Connect using a micro USB cable, measures voltage in volts (V)

Current is Over/Under Value (mA)

Energy Sensor Boolean Block: Current is over/under input (mA)

A boolean block, which returns true or false compared to a user-selected value (a number). By default, the user-selected value is equal to 0.

The block only returns a value when an electrical object is plugged into the supply side of the sensor using a micro USB cable.

Over

  • True: The current (mA) is greater than the selected value.
  • False: The current (mA) is less than the selected value.

Under

  • True: The current (mA) is less than the selected value
  • False: The current (mA) is greater than the selected value

Current (mA)

Energy Sensor Reporter Block: Current (mA)

A reporter block, which stores the value of current, in milliamps.

The block only returns a value when an electrical object is plugged into the load side of the sensor using a USB cable.

Voltage is Over/Under Value (V)

Energy Sensor Boolean Block: Voltage is over/under input (V)

A boolean block, which returns true or false compared to a user-selected value (a number). By default, the user-selected value is equal to 0.

The block only returns a value when an electrical object is plugged into the supply side of the sensor using a micro USB cable.

Over

False: The voltage (V) is less than the selected value.

True: The voltage (V) is greater than the selected value.

Under

True: The voltage (V) is less than the selected value.

False: The voltage (V) is greater than the selected value.

Voltage (V)

Energy Sensor Reporter Block: Voltage (V)

A reporter block, which stores the value of voltage, in volts.

The block only returns a value when an electrical object is plugged into the supply side of the sensor using a micro USB cable.

Projects Using the Energy Sensor

Ready for more? Check out these projects featuring the Smart Solder Component.

Feeling Stuck? Explore the Knowledge Base for common questions and troubleshooting tips.