Introduction: MicroBIT Flood Warning Device

This idea came from a lesson with a group of Year 6/Grade 5 Students. We were looking at the UN Global goals 14 and 15 - life below water and life on land. Students were looking at how we could use a Micro:BIT as a way to help people stay safe when there were floods or droughts. We decided that if we had a device close to a water source that sent an alert when moved by rising floodwater would be an option (...or a floating system that sent an alert if it dropped or stopped moving to indicate low water supply or drought)

With this device, we are going to create a waterproof casing that will hold the Micro:BIT, battery pack, and an LED light using TinkerCAD. There will be 4 vertical holes that will allow the device to move up and down if it is floated by rising floodwaters, but not float away. There will also be 4 bottle attachments that will allow the user to add greater buoyancy with recycled plastic bottles.

The idea is that it is placed beside a river and will send a warning message if there is a change in its position. Once turned on the Microbit will wait dormant until there is movement. If the device moves with a left or right tilt (presumably by rising water levels) it will send a warning message through a Radio Message to the second Micro:BIT.

There are a few pitfalls, such as the distance that is required between the two devices to be in the Radio receiving range, but if it worked, it would be a very cheap way to help people in poorer areas to get an early warning from rising water levels.

The Housing Device is designed on TinkerCAD, but it would be super easy to make cheap copies using injection moldings and even recycled plastic once you have the initial prototype. If you do not have access to a 3D printer you could even make the entire housing project from recyclables, such as a watertight lunchbox to hold the Micro:BIT.

Message me on Twitter if you want to take it further ( @Dukelyer) and I would love to see your ideas take this much further if there is a need. Once Virtual School and Lockdown are over I will try and build the design and add more images here, but I am unable to leave my house due to lockdown in Vietnam and just counting down the days to freedom.

If this project interests you and you have a go at your own version of creating a Micro:BIT Flood Warning Device or you make my version please add photos of your design sketches, prototypes, 3D models and more in the 'I Made IT' section below.

Supplies

YouTube design Video

TinkerCAD to design your Housing - My Files is Linked below and feel free to modify to suit your need.

https://www.tinkercad.com/things/02ZT1nWPQAb

2 Micro:BIT microprocessors - 1 for in the floating device and one to receive the message

MakeCode to code the devices

LED Light and some wire to connect to the 0Port and Grnd

Bottle Caps & Plastic Bottles to add more flotation

4 Steel rods to keep the model in position as the water rises up or down.

Step 1: Creating the 3D Model

To create this model I have focused on 3 key features

  • Creating a secure housing for the Micro:BIT and components that is watertight and holds the components snugly.
  • Creating a flotation system that is both inside the main part of the model and has the ability to add more flotation through the addition of plastic bottles.
  • Providing a way to keep the device from floating away (the plan is to have 4 verticle holes that would allow it to be threaded over 4 metal poles like cotton through a needle, so if the water rises the device would move up and down, but not float away).

For my design, I have chosen to use TinkerCAD and 3D model my design, but there is scope to simply create out of found and upcycled resources - I can see a tupaware style container with an air tight lid to be a good option, but remember that we want to keep the Mircr:BIT protected from water at all costs so that it can be used again for other projects

Step 2: Creating the Housing for the Micro:BIT

To create this model I have focused on 3 key features

  • Creating a secure housing for the Micro:BIT and components that is watertight and holds the components snugly.
  • Creating a flotation system that is both inside the main part of the model and has the ability to add more flotation through the addition of plastic bottles.
  • Providing a way to keep the device from floating away (the plan is to have 4 verticle holes that would allow it to be threaded over 4 metal poles like cotton through a needle, so if the water rises the device would move up and down, but not float away).

The Housing for the device

Once You have decided on the dimensions of your box to hold the Micro:BIT you can begin the construction process. The box in my design has a floor print of 110mm by 110 mm and is 20mm high, but this is flexible.

Housing

  1. Create the main box 110mm x 110mm
  2. Add a Micro:BIT to the box, raise it 3mm of the Workplane and turn it from a solid to a hole.
  3. Repeat process with a 2xAAA battery box
  4. Add hollow shapes to allow for connection to the Micro:BIT pins, connection to the Battery Pack and for wires to go from Pin0 to the LED light.
  5. Select all shapes and group them to make a single shape that has the indentations of the components.

Walls

  1. 110mmx3mmx20mm cuboid and a second cuboid that is 110mmx6mmx18mm.
  2. Join these together using the alignment tool and group them into 1 shape.
  3. Duplicate the shape, rotate new shape by 90 degrees and align on the outside edges, then group to make a right angle segment.
  4. Duplicate as in step 3 and you will be left with the box.
  5. Group the box with the Housing and then centre with the alignment tool and group

Lid

  1. First shape is 110mmx110mmx3mm then coloured and set to transparent
  2. Second shape is 104mmx104mmx6mm then coloured and set to transparent.
  3. Center both shapes on the x and y with the aligning tool, group and rotate/flip by 180 degrees to make the lit for the box.

Step 3: Creating the Floatation System

Horizontal Float going around the Mictobit Housing

For the float going around the Housing, I have used a feature of TinkerCAD that allows you to make repeated duplications of a shape. It is a great technique to learn and can be fiddly to get started, but once you have used it a few times it will be a regular part of your design toolkit.

  1. Add a cylinder 10mm high and 30mmx30mm witdth/depth.
  2. Duplicate the shape and modify the new shape to be 20mm high and 28mmx28mm width/depth then turn it from a solid to a hole.
  3. Select the two shapes, center with the alignment tool then group to make a ring shape.
  4. Select the new shape and turn it on its side by 90 degrees.
  5. Duplicate the ring and move the ring 2mm to the left or right and rotate on the horizontal by 5mm
  6. while the new shape is still selected click the Duplicate button and it will create a new shape with the same transformation.
  7. Keep clicking the duplication button until you have a complete rin and group the new shape (this is fiddly and took me many times to get just right - my dimensions might not work for you, but the technique will and I suggest that you persevere and keep working on it until you get it right ;)

Attach 4 rings or Tubes evenly spaced around the outside of the ring for the guide poles to be threadded through (the things that will stop the device floating away)

I have attached 4 plastic bottle caps between the guiding ring position so that I can add plastic bottles to add more flotation.

Step 4: The Code

Here is a simple concept for the code made using the Make Code site for Micro:BIT. The device will sit and wait for movement and then once movement is sensed with a tilt it will send a radio signal to the second Micro:BIT. The LED Flashes on and off with port 0 and once a radio message is sent the receiver Moicro:BIT will also flash,

Ideas for expansion.

Audio message

Different messages based upon the type of movement

Use of different lights or lights come on with lack of light to indicate position of the device in the dark

Here is the design that I am working on inside TinkerCAD - follow, copy, remix and then share back with me in the comments below what your have done differently.

Micro:bit Contest

Runner Up in the
Micro:bit Contest