Software apps and online services
Hand tools and fabrication machines
As my daughter and I were working on a weather project anemometer, we decided to extend the fun by engaging programming.
Probably you're asking what "anemometer" is. Well, it's a device that measures the wind's strength. I have often seen it at the airports, but I've never known how it's called.
We borrowed the idea for the paper roll propeller and craft sticks from this video:
Next, we took out our Snap Circuits set and decided to use the motor from the kit. We used 2 craft sticks from our craft supplies for the arms of the propeller. I punched a hole in the middle of each one with an awl. We put the sticks one on top of the other with some glue between them to fixate them forming and "X". Then, we cut a toilet paper roll in four equal pieces and cut a hole in each one with a craft knife. Then, we poked the sticks through the toilet paper pieces and attached the craft sticks propeller to the motor.
- Take the two craft sticks.
- Find the middle of each of the craft sticks.
- Punch carefully a hole with an awl in the middle of each craft stick. Beware not to make the hole too loose for the stick needs to turn the motor.
- Take the paper roll and divide it into two equal pieces with a pencil. Cut along the line and then cut each of the two pieces in two as shown below:
- Use a craft knife and cut slots in each paper roll piece just enough to poke a craft stick inside.
- Put a paper roll piece on each of the craft sticks.
The motor produces electricity when the shaft rotates towards the positive end of the motor. If the (+) is on the right side, the shaft must rotate clockwise. If the (+) is on the left side, the shaft must rotate counter-clockwise.
Test the direction the propeller rotates by blowing some air at it. Make sure it rotates towards the correct direction. Otherwise, adjust the paper roll pieces.
Build the circuit shown in the diagram above.
Snap the motor with the propeller onto the circuit.
The above code reads the signal (the wind speed) received on pin P1 (the pin the motor is connected to) and displays the result on the display of the micro:bit.
You can build the code yourself in the MakeCode Editor. You will find the "analog read pin" block under the Advanced > Pins section. The "plot bar graph" block is under the Led section.
Alternatively, open the ready project here: https://makecode.microbit.org/_eugKyYMs6hw4
This project takes advantage of the fact that motors can generate electricity.
Usually, we use electricity to power the motor and create rotary motion. This is possible due to something called magnetism. The electric current that flows in a wire has a magnetic field similar to those of magnets. Inside the motor is a coil of wire with many loops and a shaft with a small magnet attached to it. If a large enough electric current flows through the loops of wire, it would create a large enough magnetic field to move the magnet, which would make the shaft spin.
Interestingly, the electromagnetic process described above also works in reverse. If we spin the shaft of the motor by hand, the rotating magnet attached to it will create an electric current in the wire. The motor is now a generator!
Of course, we cannot turn the shaft very fast, so the generated electric current is very small. But it is large enough for the micro:bit to detect and measure it.
Now, let's close the Slide Switch (S1). The Battery Holder (B1) powers the micro:bit through the 3V pin. The "forever" loop in the micro:bit starts executing. On every iteration, it reads the signal from pin P1 and displays it on the LED screen.
If we now blow air on the anemometer, we would turn the Motor (M1) and generate electric current, which will flow to pin P1.
The "analog read pin P1" function on the micro:bit will detect the generated electric current and, based on the amount of current, will return a value between 0 and 1023. Most probably, the value will be lower than 100.
This value is passed to the "plot bar graph" function which compares it to the max value 100 and lights up as many LEDs on the micro:bit screen as is the proportion between the read and max values. The larger electric current is sent to pin P1, the more LEDs on the screen will light up.
And this is how we measure the speed of our anemometer.
Now, that you've completed the project blow the propeller and fave fun. Here are my kids trying to score a wind gust record:
After a while, we wanted to enhance the project some more and added code for the buttons to show the wind speed and resume at the next gust of wind. So, stay tuned for follow up projects to this one.