Thanks for supporting local! Our online shop is open & shipping orders.
Check out our latest news to find out more about events, opportunities and partnerships.
Esmes' Electronics is a simple introduction to using the micro:bit written by a year 5 student.
Learn with Troy by asking for support and, he will post a tutorial here to benefit all of our visitors. Free advice!
The Relay requires just two connections to the micro:bit. One to GND (ground) and one to whatever pin is to be used to control the relay’s switching action.
When attaching the alligator clips to the micro:bit, make sure that the clips are perpendicular to the board so that they are not touching any of the neighbouring connectors on the micro:Bit edge connector.
Here’s an example of how you could wire up a MonkMakes Relay for micro:bit to turn an old fashioned light bulb on and off.
The quickest way to try out your relay is to DOWNLOAD THIS HEX FILE and then copy it onto your micro:bit. The program will turn the relay on and off once a second.
Set the controlling pin to 1 and the relay contacts will close, set it to 0 and the contacts will open again. Its as simple as that. So, to make your relay turn on and off once a second, open the Blocks Editor, add a forever block and then the digital write blocks from the pins category and the pauses from the basic category.
You can also click on the image of the blocks below to open up the Blocks Editor on this project.
Paste the following code into the Python window and then Download the file and copy it onto your your micro:bit.
from microbit import * while True: pin0.write_digital(True) sleep(500) pin0.write_digital(False) sleep(500)
Bitty is a suite of software that allows you to use your smartphone as an interface to your micro:bit. The software comes in two parts. A resident program that you download from here as a HEX file and copy onto your micro:bit and an App that you install on your smartphone (search your app store for Bitty Blue.
Here’s a video of using Bitty Blue to turn a MonkMakes Relay for micro:bit on and off and hence control a motor.
The latest MonkMakes Relay for micro:bit can do more than just switch things on and off. It can also be used with micro:bit analog outputs. Look closely at your Relay for micro:bit and is it has the version number v1ev (under the word ‘Board’) then it can be used with the ‘analog write’ block in the blocks editor or the ‘write_analog’ function in MicroPython. If your board has the version number v1e then it is not suitable for use with analog outputs – sorry you were unlucky to get one of the small batch of first boards to be sold.
The output of the Relay for micro:bit is not linear at low PWM and high PWM values as the following chart illustrates.
The y-axis shows the current in mA for a test load resistor supplied from a constant voltage source. The x-axis is the analog write value (0 to 1023). As you can see, there is a dead zone up to an analog output value of about 100, followed by a relatively good linear region right up to about 1000, after which the output effectively becomes ‘on’.
The tests were carried out at the default PWM frequency of 50Hz for the micro:bit. Lower frequency PWM is expected to produce more linear results.
As well as this board, we also have a Sensor for micro:bit and a Speaker for micro:bit. We also have an Electronics Starter Kit for micro:bit that includes all three boards, a project booklet and other useful components to build yourself some great micro:bit projects.
We believe in giving back; We are proud to give 1% of all orders directly to environmental not for profit groups whose focus is the protection, preservation and restoration of our planet. This means every time you purchase from us, 1% goes directly to an environmental cause.
Subscribe to our monthly newsletter for sneak peeks at new collections and early access to promos and flash sales!