Hanging Gear Weather Station
by thediylife in Circuits > Arduino
10531 Views, 151 Favorites, 0 Comments
Hanging Gear Weather Station
In this Instructable, I'm going to be showing you how to build your own hanging gear weather station, which is made from CNC laser-cut MDF parts. A stepper motor drives each gear and an Arduino takes temperature and humidity measurements using a DHT11 sensor and then moves the stepper motors to display the measured values.
The weather station is supported by two legs and a flat base, making it perfect to stand on a desk, shelf, or side table.
The DHT sensor has a range of 20-95 percent relative humidity and can measure temperature between 0 and 50 degrees Celsius. I’ve designed the gears for the full humidity range and with a negative temperature measurement range so that you can easily use a different sensor if you’d like to place the sensor outside to measure the outdoor temperature.
If you enjoy this Instructable, please vote for it in the CNC Contest.
Supplies
To make your weather station, you'll need:
- 3mm MDF Board – https://amzn.to/3iq6xAy
- Arduino Pro Micro - https://amzn.to/2PA9UZo
- 2 x 28BYJ 48 Stepper Motors & ULN2003 Drivers - https://amzn.to/2PElQt7
- 4 x M3 x 10mm Machine Screws & Nuts - https://amzn.to/2V7vaZ5
- DHT11 Temperature & Humidity Sensor - https://amzn.to/2DKWtTZ
- 10K Resistor - https://amzn.to/33l3gOD
- 4x6 cm Prototyping PCB - https://amzn.to/3inmac8
- Male Header Pins - https://amzn.to/2VrQvML
- Female Header Pins - https://amzn.to/39L5eIV
Laser Cut the MDF Components
I designed the laser-cut components in Inkscape, you can download the cutting files here. The components are all on a single sheet in the download, so you’ll need to split them up to suit the bed size of your laser cutter.
I started out by engraving and then cutting the gears then engraved and cut the face-plate and finally cut the remaining components.
I always use masking tape over the MDF when engraving or cutting so that the smoke doesn’t mark the surface.
If you don't have access to a laser cutter, consider using an online laser cutting service. They've become very affordable and most of them will even deliver the parts to your door.
I used a cheap K40 laser cutter to cut the parts.
Once all of the parts have been cut, you'll need to remove the masking tape.
Install the Stepper Motors & Assemble the Driving Gears
Next secure the two stepper motors to the front plate using two M3 x 10mm machine screws for each motor.
Also glue the stand support plate with the cutout for the motors to the back of the front plate using some wood glue. This can be done later, but its easiest to do before installing the motors so they've not in the way when you're gluing it in place.
Next assemble your driving gears. Stack your gear pieces onto your servos with a drop of wood glue between each. Start with the disc with a hole in it and then the gear. You’ll then need to add a small spacer between the gear and the front disc to create a bit of room for the gears to move freely. I used a flat washer as a spacer for each of these.
Assemble the Electronics
Now let’s get the electronic components together.
The circuit is quite simple and includes basic connections from digital IO pins 2 to 9 to the two stepper drivers and then a connection between the DHT11 sensor and digital IO pin 10. You’ll also need to add your power connections to the sensor and stepper drivers as well as a 10k resistor between the connection to pin 10 and 5V.
I assembled the header pin connections and DHT sensor onto a 4x6cm prototyping PCB so that the Arduino and stepper motor drivers could just be plugged into it.
I then made up some Dupont connector cables to connect the PCB and the stepper motor drivers. You can use jumpers or create your own header cables as well.
Mount the Electronic Components
I used a glue gun to glue the Arduino PCB to the back plate of the weather station and the two stepper motor drivers onto the two side stand pieces. This works best to leave enough room for the wiring between the components as well as to the stepper motors.
Once the electronics are glued into place, we can assemble the rest of the weather station using wood glue.
Complete the Assembly of the Weather Station
Glue the two legs into the base and then add the front plate onto the legs.
Finally, glue the back-plate into place and allow the glue to dry. Make sure that the Arduino’s micro USB port is facing towards the base of the weather station.
Once the glue is dry, plug the stepper motors into the drivers and then connect the drivers to your Arduino using the cables you’ve made up. Try to tuck the cabling in so that it doesn’t hang out of the bottom or protrude out of the top of the back area.
If you’d like to close up the top, use the piece cut out of the support stand plate. Don’t glue this into place until you’ve tested out your stepper drivers and connections as you may need to access the cables again to make changes.
Plug your micro USB cable into the bottom of your weather station and you’re ready to upload the code.
Programming the Arduino
The code is quite straight forward. I'm not going to go into detail to explain the code here, but you can download the code and read a detailed explanation on what each section does here.
In the code, we create a sensor object, create the required variables, and then define the motor and sensor pins.
The setup function starts serial communication, sets the pin modes, and connects to the DHT11 sensor.
The loop function takes measurements from the DHT11 sensor, displays these on the serial monitor, and then calculates the number of steps and the directions to move each of the stepper motors to indicate the measured values. The code then waits a minimum of 5 seconds before repeating the loop.
There is an additional function which is called by the main loop which is given the number of steps and direction for each motor and then executes the movements.
Setting Up and Using the Weather Station
Before you upload the code, place the two gears onto the motors, setting them to indicate the values set up initially in the code, these were 25°C and 50% humidity in my code.
You can then upload the code.
If you open up your serial monitor, you’ll see the first measurement taken by the sensor and the motors will then start moving the gears to get to these values from the initial values.
Once the movement finishes, you should see the second set of values and then the gears may move again.
It usually takes a couple of minutes for the sensor readings to stabilise and you’ll then get more consistent data and less movement of the gears.
If you notice your displayed values are not the same as those shown in the serial monitor then first check that your motor movement directions are correct, then check your initial values are correct, and finally, you may need to make adjustments to the number of steps per degree or percent values in order to calibrate your weather station.
Your weather station is now complete and can be set up on your desk or shelf.
If you enjoyed this Instructable, please consider voting for it in the CNC Contest.
Let me know in the comments section if you’ve built a weather station before and what you used to display the values.