-
1Step 1
Find a small wooden box with a lid that has a transparent panel in the lid. My box had a thin wooden panel so I had to carefully cut out one end to remove the panel. Remove all the hardware. Stain and finish the box. Cut a piece of plastic from a CD box to replace the wood panel. Reassemble.
-
2Step 2
Program the Digispark and temporarily connect the servo to test the software and servo. I had a batch of 5 identical servos. Two of them rotated contuously when the Digispark was reset. The other three worked fine. One of those three was very jittery. I thought they were cheap but buying five to get two working is not a bargain.
-
3Step 3
Test fit all the components in the box to find the best arrangement. Cut a piece of strip board 8 rows wide and up to about 25mm long that will fit flat on the floor of the box. The strip board will act as a bus to connect to the header. I placed the trace side up so I could solder directly to the traces. You may be able to prewire the board in a more conventional manner but then you would have a challenge soldering it to the header.
-
4Step 4
Bend the pins on the header at a right angle. Drill 8 holes 1/16-inch (1.6mm) diameter in a line spaced 0.1-inch (2.54mm) on centers. Pass the pins through the holes with the header on the underside of the box.
-
5Step 5
Wire up the circuit. Use 3-pin and 6-pin male headers to connect to the Digispark rather than wiring directly. This will allow easy disconnection of the Digispark for reprogramming. Optionally use a 3-pin header for connection to the servo in case it must removed someday.
-
6Step 6
Fasten the servo to the inside of the box with double sided tape. Measure the distance from the center of the drive gear to the box. Place little blocks in each corner of the box at the same level of the top of the servo hub. These will serve to hold the dial.
-
7Step 7
Layout a meter dial using free MeterBasic software from www.tonnesoftware.com. Print the dial on glossy photo paper. Cut a slot for the servo gear drive and place the dial in the box. Make a pointer from a tie-wrap. Cut or file the hub to the same thickness. Carefully screw the pointer onto the gear drive.
-
8Step 8
Temporarily put a jumper between ground and the input pin on the header under the box. Turn on the system. After a 5 second delay the servo should move to zero then full scale then back to zero. You may have to adjust the mounting of the pointer on the gear to make it align properly. You may also have to adjust the servo parameters in the SetServo() function. Mine had to be commanded through a 130 degree sweep to achieve 120 degrees actual motion.
-
9Step 9
Now the meter is ready to display any dc voltage between 0 and 5 volts connected between the gound and Vin1 pins on the box header.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.