Hanging Gear Weather Station

10K14920

Intro: 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.

STEP 1: 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.

STEP 2: 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.

STEP 3: 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.

STEP 4: 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.

STEP 5: 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.

STEP 6: 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.

STEP 7: 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.

18 Comments

Please provide the link about the clear documentation about the project
My serial monitor shows ?????????????????????????????? and thats all.
Does that come up right away and is anything added after a few seconds? That seems like a coms issue.
comes up after the time stamp and just keeps adding ? symbols.
If it keeps adding then there's probably a communication issue with the DHT sensor or the sensor is returning an unexpected variable type.
I COULD NOT FIND THE DOWNLOAD FILES FOR THE LASER CUTTER AND ARDUINO CODE. CAN YOU POST THEM?
Very nice.
For the next upgrade I suggest a RTC to show the date and time ;)
Very creative idea and well executed. Two comments. Stepper drivers use a lot of current, which the Arduino cannot deliver. You may damage the microcontroller. It’s best to use an external supply and not go through the USB port of the board. Less importantly, since temperatures don’t change that frequently, consider putting the Arduino to sleep for as long as you can, minutes if possible.
Hi Langrock,
Thank you.
Stepper motor's generally do draw a lot of current, but these only draw around 70mA. Also, they're not being powered through the IO pins, the drivers are powered through the 5V supply pin on the Arduino, which is essentially connected directly to the 5V USB supply, it doesn't go through the on-board regulator. Since I'm drawing the 70mA (the motors don't ever run together) straight from the USB supply, I don't think there is a problem with this particular project. It is however better practice to power them externally.
Yes, it is a good idea to put the Arduino to sleep for a couple of minutes between readings. I'm actually busy looking at which Arduino board is best suited for long term battery-based projects and trying to see how long I can get one to run.
Good point about the RAW pin. Hadn’t thought about that. Still a good idea to power these externally in case someone thinks they can drive a stepper from a regular pin other than RAW.

About boards, there’s the TrigBoard by Kevin Darrah. It’s meant for exactly these kinds of applications. It has very efficient sleep modes. https://www.kevindarrah.com/wiki/index.php?title=TrigBoard
Could you please update the link to the laser cutter you used? Thanks
Hi Langrock, I've updated the link but it hasn't pulled through yet. It's just a common Chinese K40 laser cutter/engraver. Here's the new link - https://amzn.to/30OxpnY
Great quality of your video!!!
Is it possible to change it to F degrees instead of C degrees?
Yes, it would be quite easy to change to Fahrenheit. You'd just need to change the number range on the temperature gear as you'd want to go higher than 50 and not as low as -10. The modification in the code would just be to change the number of steps per degree variable and then convert the Celsius values from the sensor to Fahrenheit using the formula - Celsius * 1.8 + 32
That's so original! And fit for purpose.