You Will Need:
- Inventors Kit for the BBC micro:bit.
- ZIP LED Add-On Pack For the Inventors Kit.
- BBC micro:bit.
- You can download our code here.
Inventors Kit Fan Controlled ZIP LED Ring Circuit:
Since we’re using this circuit to show off the Inventors Kit at shows, we’ve made some modifications to make it more durable. The ZIP Ring’s pins are replaced with right-angled pins to make it lie flat, and the circuit has been covered with a protective laser cut sheet of our clear Perspex, also featuring a motor mount. Otherwise, the circuit is as below: Note: Since we wanted this to be a compact demonstration piece, ours runs off of the 2xAAA battery pack of the inventors kit. However, this is running the ZIP LED’s out of spec at 3V (rather than their rated 5V). For a more reliable setup, use the 3xAA pack that comes with the kit. See experiment 10 of the ZIP LED pack for how to set this up.Code
Use the analog read pin block to read the voltage created by the spinning motor into P0. The ZIP LED's can be made to rotate when the EMF of the motor rises above a set threshold. Use the Neopixel blocks in the MakeCode editor for this. to do this. Note: You will need to add the Neopixel package to MakeCode if you haven’t already. Click on “Advanced” then “Extensions” to find it. A fun feature of this circuit is that the ZIP LEDs can rotate relative to the motors speed. So the harder you blow the faster they spin! To do this take the analog read of pin 0 and use the map block to make a variable. We called this variable "item". This can be used to shorten the pause between the ZIP LEDs rotating, making them spin faster. You can download this example code for the fan controlled ZIP LED Ring from the embedded editor above.©Kitronik Ltd – You may print this page & link to it, but must not copy the page or part thereof without Kitronik's prior written consent.