This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com).
My name is Andrew Smith and this instructable will go though a project I did during my stay at the University of South Florida. The inspiration for this project came from driving to work one day, I hadn't thought of a good idea for my project yet and this idea seemed fitting and relatively simple. However I ran into many problems that had not been thought of during the original designs. Hopefully this instructable will make this project go much smoother for you than me!
Step 1: Items Needed
For this project you will need:
1 Arudino Uno
2 standard small servos
1 10K Rotary Potentiometer
1 breadboard small enough to fit in the box
7 220 ohm resistors
1 seven segment four digit display
1 9v battery
Epoxy or super glue
8 #10 5/8" screws seemed to fit the best, I got them from Home Depot
You will also need some way of 3D printing the parts.
Step 2: 3D Parts!
There are several parts for this project and most of them somehow interlock with each other, so if they aren't fitting together too well (a problem I had from start to finish), you'll need to adjust the tolerances on some of the parts. This was the first time I tried assembling 3D parts so I learned a lot about some of the precautions of designing 3D printed parts. I created the parts using Autodesk Inventor 2016 and any parts that didn't needed to be printed were imported from GrabCad.com. The only parts that were not printed were the gears, I laser cut them at school because they give you better resolution but if you don't have one handy, printing them will work just as well. For best fitment, print both of the gauges as assemblies, I tried adjusting the values of the parts several times before someone enlightened me that I can just print both parts at the same time.The files are zipped below and the parts are fairly straight forward on how they're assembled.
Step 3: Programming!
Before this class I had minimal experience with programming and because of that, this part of the project was difficult for me. Fortunately I had a lot of help from the TA's and they helped me bring this project to life.
So the the way the gauges work are that the mph gauge receives input from the potentiometer through the arduino and the mph gauge is mapped directly from that input. Then the rpm gauge uses a function to read the values of the mph gauge to map its own values. The mph range is split into five sections, or gears, and the rpm gauge will respond accordingly, depending on which gear it is in. The seven segment display then reads the values of the mph gauge and displays the current speed. Above is a diagram of the control system that modulates the gauges and below that is the code I used. The multiplier on the Shift RPM variable is so the needle starts a little higher in each successive gear, just like in a real car.
Step 4: Wiring
The wiring is a bit compacted but that is mainly because of the seven segment display. Keeping the wires attached to the seven segment display may be a little tricky, they'll want to fall of as you assemble, so try and make sure everything is connected! Also the wiring for the display is somewhat complicated to follow, so take your time if you've never hooked one up before.
Step 5: Assembly
There isn't really anything too complicated about this assembly, the only part that will really have to be mocked up is how high to place the gauges on the stand for proper fitment with the gears. What I did was have the servos in their stands and then placed the assembled gauge where it is supposed to be. For the gears, I super glued the large gears to the small servo horns that came with the servo. The smaller gears can be attached to the connecting shaft, I advise building the needles first, then attaching them to the gauges with the gears on the other side. You can play around with the height and placement of the gauge on the stand to fit the gears to your liking. Note: I did not build supports for the gears, they are attached to the needles and the servos respectively,so try and make sure they are as straight as possible and in the place you want them before gluing! The foot pedal is glued flush with the larger connecting rod and the other end is slotted for the potentiometer. Other than that the pictures should serve you well with the assembly. Also, color really makes a nice touch, I used a red plastic for the needles and painted the numbers with a fine tip paintbrush. Happy making!