Parts list:
- BBC micro: bit
- ZIP tile
- 3mm White Perspex
- 3mm Mirrored Perspex
- Strip Board 100 x 250 mm
- Miniature DPDT switch
- 6mm M3 machine screw x2
- 6mm M2 machine screw x2
- 10mm M3 machine screw x11
- 16mm M3 machine screw x2
- M3 hex nuts x10
- M2 hex nuts x2
- 12mm nylon threaded spacers x3
- DXF design file download
ZIP Tile For microbit Bike Light By Isaac Gosrani:
Step 1:
Download the attached DFX file into your laser cut software then cut out using 3mm Perspex in a colour of your choice. The front panel (far right) of our bike light uses engraved mirrored Perspex, but any transparent or translucent acrylic would do. WARNING: If you are engraving mirrored Perspex be sure to put it mirrored side down. This will prevent damage to your laser and achieve the result you see here.Step 2:
Attach your BBC micro:bit to the ZIP Tile using two 10mm screws and two nylon threaded spacers(8.00mm) through ground and pin0. The back panel and LiPo battery or a 3xAAA battery pack with JST connector (the choice is yours on which you use) are shown to help with step 4. Then, put two 16mm screws through the bottom of the zip tile and attach at the top of the micro: bit using another two nylon threaded spacers.Step 3:
Solder a female JST connector to a piece of stripboard, forming a live and ground rail. Then solder red (live) wire to the live rail, being careful not to short the live and ground connections against each other. Take this wire from the board and solder a connection across the switch, into the live wire from the male JST connector. Finally, solder the black (ground) wire from the male JST connector to the ground rail on the stripboard.Step 4:
Now attach the back panel of your rear bike light using two M3 6mm screws. These will screw down into the nylon threaded spacers connected to pins 1 and 2 in the first step. Then tuck your battery pack between the back panel and the microbit.Step 5:
Fasten the two side pieces to the back panel using 10mm M3 screws, then attach the two free leg pieces with the same method. Tip: This kind of captive nut joint is common in perspex. If you're having trouble with it, placing tape over one side can help hold the nut in place while you insert the screw.Step 6:
Before sealing the shroud, poke the switch through the hole in the side panel. The, secure this with M2 screws. Assemble the front and rear panels to form the shroud. The, using the remaining 6 hex nuts and 10mm screws into a T-joint like before.Step 7:
Then, fit the final piece into the top of your rear bike light. To secure the light to your bike frame, take rubber bands and wrap them around the “leg” pieces to clamp down on the seat post.Step 8:
The ZIP Tile has custom coding blocks downloadable for the MakeCode editor. To get them, open MakeCode go to "Advanced" then "Extensions" then search "Kitronik". You should see the ZIP Tile extension. This example code first sets up the accelerometer to a range of 4g for a good level of sensitivity. Then it sets up the ZIP tile's layout and brightness. The ZIP tile uses coordinates to know which LED to address, so the coordinate is set to (2,2) then changed by 5 in each direction to plot a small square. This is for the light when not braking. In the forever loop of the code, the square is set again (to reset after the end of the loop) and an IF statement is used for the brake light function. If the accelerometer is reading more than 1400mg of force the whole tile is set to appear for two seconds at maximum brightness. The accelerometer works on three axes. Shown above, there is X, Y and Z. In this project we only look at the overall force on the microbit (done through some trigonometry in the acceleration strength block above). But in more advanced projects you can also look at individual axes and compare forces on each to achieve tilt sensing.©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.
4 comments
Mark Donnison
Mmmmm… Good work Isaac!
Isaac Gosrani
Well done Isaac, this is the best thing I have seen on this website in a very long time. Certainly one for the future!! I bet he is a great guy as well
Mark Donnison
Hi George, link fixed, thanks for the spot!
George Baker
Well done Isaac, this is a great project. Unfortunately the link to the Micro:bit tile is broken.