-
1Parts list
Magnets - each clock needs 8
https://www.amazon.com/gp/product/B097HBZ39T/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
Rubber Bands
https://www.amazon.com/dp/B07849G52M?psc=1&ref=ppx_yo2ov_dt_b_product_details
Aligator clips (used to connect to the meters) - each clock needs 2
https://www.amazon.com/gp/product/B09RZHCXX7/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1
Silicone feet - each clock needs 4
https://www.amazon.com/gp/product/B087MG3G76/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1
Arduino shield board - each clock needs 1
https://www.amazon.com/dp/B01J1KM3RM?psc=1&ref=ppx_yo2ov_dt_b_product_details
1/8x12x12 plywood - each clock uses 2 sheets
https://www.amazon.com/dp/B08NC1WRW7?psc=1&ref=ppx_yo2ov_dt_b_product_details
USB charging wart - each clock uses 1
https://www.amazon.com/dp/B08T98K2LG?psc=1&ref=ppx_yo2ov_dt_b_product_details
Arduino header pins - each clock will use one piece
Analog meter - each clock will use two
https://www.amazon.com/dp/B01KDVU1N6?psc=1&ref=ppx_yo2ov_dt_b_product_details
Wire connectors - each clock will use 6
https://www.amazon.com/dp/B01EV70C78?psc=1&ref=ppx_yo2ov_dt_b_product_details
DS3231 RTC clock module - each clock will need 1
https://www.amazon.com/dp/B01N1LZSK3?psc=1&ref=ppx_yo2ov_dt_b_product_details
USB cable 10ft - each clock will need 1
this was the hardest part to find and keep the cost manageable. The cable needs to be long so that you can put the clock on a shelf etc.
https://www.monoprice.com/product?p_id=39920
Faceplate material - White/Black - each sheet will support 10 faceplates
https://www.amazon.com/gp/product/B0C4KYKB1N/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&th=1
5k resistor - each clock will need 2
or you can do 2 10k resistors in parallel ( this is the option I did, I had better results with accuracy of the meters, and it was good practice soldering for the kids. This was the first thing I had them solder - each clock would need 4
The clock can be built in 4 or 5 meetings with kids. Recommend ages 10 - 18. Younger kids will need more help. One person can handle 8 - 10, with more you will need some help
-
2First meeting
The clock can be built in 4 or 5 meetings with kids. Recommend ages 10 - 18. Younger kids will need more help. One person can handle 8 - 10, with more you will need some help
First meeting
1. I talk about what an Arduino is and what it can and can't do. I have a white board and list this. One area it can't do it "time"
2. I think introduce the RTC module and explain that it has a watch battery and a crystal and keeps time. At this point I bring up how does the Arduino talk to the RTC module?
This is when I bring up the I2C bus. and how each module on the bus is required to have a unique number.
3. Then its time to talk about the meters, again I list Pro/Cons on white board
Pro - Nice clean look
Don't cost to much
Easy to work with
Con - They will not work with the Arduino out of the box
Need to change the faceplate (the original faceplate, 0 - 30v)
4. This is when I take one apart and show everyone the resistor inside, and I explain what it does. I show measuring the original resistor with a multimeter, and let them all see the measurement.
I explain that the Arduino wants to work at 5v. I introduce Ohms law.
I do the calculations on the white board.
5. I have everyone take one meter a part (only do one at a time). IMPORTANT make sure they keep the screws in the plastic cover they take off, and tell everyone its important not to lose them.
6. I have everyone cut out the original resistor. I show them how to do it first, cut close to the resistor so you have points to solder on to.
7. Ohms law says to use a 5k resistor. I used 2 x 10k resistors. I explain that if we put resistors in parallel their value is cut in half. So 2 10k equals 5k. I show measuring 2 10k resistors that have been soldered together and the value being 5k. Then I have them solder the 2 10k resistors together. I have three soldering irons and helping hands. For many of them this will be the first time soldering. This is great first time easy to do and builds confidence.
8. I then show them how to solder in the 2 10k resistors. I explain why we "tin" things and how it helps. Soldering in the new resistor is a bit tricky, tight spot. This can take some time. I didn't get all the meters done the first night.
9. encourage them to ask questions.
10. I only hand out the two meters the first night. I remind them to bring these back for the next meeting and that they should keep them in a box or bag
-
3Second meeting
Second meeting
1. Hand out the Arduino, RTC module, wires, alligator clips, USB power block and USB cable
2. I ask them how we are going to have the Arduino control the meters ? I explain what PWM signal is and how we can use it. I draw a PWM signal on the white board.
3. I then give a demonstration with an Arduino, RTC and Oscilloscope. First I show them how to connect the Arduino to a computer. I explain what a IDE is and why we need it. I tell them it's easy to use and free to download (I also send out email with the download and how to setup). I show them how to select the board and the port. Then show them test code I have to PWM. I walk through the code, asking them questions while I do (the goal is to have them ask you questions).
4. I then explain that the oscilloscope will show us the actual signal that is being sent. I connect the Oscope. At this point we have the code running (it cycles through 0 to 100%), the meter needle is moving and the Oscope wave form is changing. An area of confusion is often around the time being 0 - 12 hours and 0 - 60 minutes and the PWM values being 0 - 254. I had good luck talking about conversions between Fahrenheit and Celsius temperature. I ask them if they want the meter to be in the middle, 6 hours or 30 min what PWM value would then need. They give different answers and I show the updating the code and sending it and then we watch the results.
5. RTC module. First we are going to connect it with wires and then on another day we will solder it to a shield board. I have a print out of the pins I show them. I tell them the module supports 3.3v or 5v, we are going to use 3.3v. I ask them can they find 3.3v on their arduino. I do the same for ground. Then I have them connect these, I tell them its good practice to use Red color for power and Black for ground. Then it's time for I2C bus, I explain there are only two wires SCL and SDA again I ask if they can find these on the Arduino. Then I have them connect these wires.
6. I then explain that we need to set the time. I talk about many different ways this could be done. I tell them for this project we are going to take the "Easy Way" and we are going to set it from the code. We talk about how we could have buttons to do this, and this would be a great follow on project. I challenged someone to do this, and I offered to help ( I told them I would design a new box for the buttons). I showed them the commented out code in the setup section. I explained that the different parameters and importantly when this section of code would run. I asked them what happens if we turn the power off and back on again....... It time setting would run again and set the wrong time. Then we set the time and immediately commented this line out and uploaded.
7. I then showed them how the serial console works and talked about how the serial.print and serial.println worked. I told them they could use this to check on their program. I showed them some examples of printing out to the serial console.
8. Finally I had them look at the information being sent to the serial console. I asked them if they could tell what part of the code it was coming from, main or the function.
9. I gave everyone the final code. I gove them to programs
1. Test code for PWM
2. Final code
I told them for home work to see if they could get both meters working with the PWM test code.
-
4Third meeting
I recommend splitting the group up into two sections. A lot of prep work is required for this meeting. You need to have milled all the faceplates (hours and min), I made a couple of extras. The plywood boxes also need to be lasered out.
Group one will work on the shield board and Group two will work on the box.
Box -
1. Have the kids Test assemble the box. I explained "kerf" and why it's important, I have some test jigs that show different kerf .07 - .1. You can get this off Boxes.py. I did a project on the laser with the kids before so they are familiar with lightburn.
2. Magnets - Give each person a square of wax paper. Give out the magnets each member gets 8. Have them break the magnets up into four groups. Have them align the 4 groups so they are all in the same orientation, positive/neg
3. Have them put a small dot of wood glue into each circle of the wooden triangles (this should be done on the wax paper). Using their finger spread the glue around the edges of the wooden circle. Then place a magnet into each of these circles, try to maintain the orientation of the magnets.
4. find the lid, this part will have four smooth edges and on side will have four round spots. Place a small dot of glue into each of the circles
4. Then carefully remove the top magnet (it will be sitting on the magnet that is in the hole). Flip this magnet and place it in one of the circles on the lid. Do this for all four magnets. This needs to sit for awhile.
5. Assemble the box. The back side panel, it will have a small circle in one corner. Recommend that this be placed so it close to the bottom. This is were the USB cable will go.
6. Use a couple rubber bands to hold everything in place.
Shield board
1. I uploaded pictures, check these out. We are going to solder a header onto the shield board that the RTC module will plug into
2. Show them how to cut the header strip. We need to cut a section for the four different header sections of the Arduino. I have them use side cutters for this.
3. Once they cut a header have them put it in that section on the Arduino.
4. All four header sections are cut and in place on the Arduino. Then place the shield board on. this might take a bit of working with to get it in place.
5. have them solder the header on. I also tell them I like to solder one pin from each header, helps hold everything in place.
6. I have three soldering iron that they can use. This step can take a while.
7. When they get done I always inspect the work. Lot of times they will have two pins soldered together. I explain what I'm looking for and how to correct it. I will also find pins that haven't been soldered or not good enough. I show them and let them fix.
8. I show them how to remove the shield board and stress to do it carefully so no pins are bent.
9. I give them a piece of foam to set the shield board on. Now we need to solder the header for the RTC module. This is harder than the other headers
10. then I have them solder the headers to the right spot. I don't tell them, I ask them where it should go. example: power, I ask them what voltage is it supposed to be (if needed I have them look at the spec sheet). I then ask them wear is 3.3v on the arduino. I have them solder that wire. I do that again with the ground. Then the I2C, I tell them to be careful make sure its going to the right place, SDA to SDA etc
11. Cut one alligator clips in half at the middle. Cut one male or pin breadboard wirein half. Solder two alligator clips to the two male or pin breadboard wires. You will end up with two wires; one end will have an alligator clip and the other end will have a male or pin end. Cover the soldered joints with heat shrink.
12. Cut the other alligator clip in half, and another male or pin breadboard wire. You will only use one half of the breadboard wire. Solder that two alligator clips together to the male or pin breadboard wire. Cover the solder joints with heat shrink.
13. Solder one of the "alligator and male/pin" wires to pin 9 on the bread board, and solder the other to pin 10 on the bread board.
14. Solder the "2 alligator clips and on male/pin" wire to ground on the bread board. These are our ground clips.
Extra credit:
If possible have the group that works on the child board glue in their magnets. I didn't do much explaining (I will go into detail with them on this step at the next meeting). We need to get the magnets in place and glued, so they will be dry for the next meeting.
-
5Fourth meeting
If you were able to get all the magnets glue in at the third meeting everything will be wrapped up at this meeting. If you were not able too, then we will need to have a short fifth meeting.
I do the same steps as the Third meeting. Skip the magnet gluing step if you were able to do this at the last meeting.
Bring everyone together (after finishing all the step from the third meeting) Helps to have a helper.
Only follow these steps if the glue is dry. You could use super glue it dries very fast. I don't like super glue mainly due to the fumes.
1. now we are going put the triangles in place. First put the triangle but the lid magnet and see which way they attract.
2. place this magnet face that attracted up when you put the triangle in the box.
3. put a rubber band around the box keep it high to hold the triangle in place.
4. test fit the lid
5. adjust the triangles if needed (sometimes you need to flip them)
6. place a small amount of glue around each seam on the inside. make sure to get glue on the triangles
7. use a ear q tip (swab) to spread the glue around
7. I like to put 6 rubber bands, 3 low and 3 high
-
6Fifth meeting
We are going to put shellac on the box.
1. Again give everyone wax paper and set of rubber gloves
2. I use Bulls Eye Shellac Clear.
3. I use a paper tower to spread it around.
4. Have them do each side. They have to wait for the sides to dry. It drys quickly
5. They can do the inside also if they want.
6. The meters might fit tightly after the Shellac.
Putting everything together
1. Put the breadboard on the arduino
2. put the arduino in the box with the USB port facing hole in the back side of the box
3. feed the USB cable through the hole in the box and plug it into the arduino
4. attach the alligator clips to the meter. when looking at the box from the front (facing the meters). The positive will be on the right side. The Alligator clip from pin 10 needs to plug into hours, this will the the meter on the left.
5. Plug the USB cable into the USB power module.
6. after about 5 seconds the meters should start showing the time.
7. put the lid on
8. enjoy
I had one member that was very advanced. He went off and programed his own code and loaded with his AVR programmer. I had him explain this to everyone, I told them there are many ways to do something. I was going to add code to support setting the time and an alarm.
-
7Updated Arduino code
The code for this project is pretty simple. I had intermittent problem communicating with the RTC module. I would not be able to set the time. I traced it to a URTClib I was using. I switched to using RTClib and everything has been fine since. I uploaded the new code "Clock_Time_PWM_New_2024.ino"
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.