Final Project
Click these links to jump to each day’s documentation!
6/27/19
7/2/19
7/8/19
7/15/19
7/22/19
7/29/19
7/31/19
8/1/19
8/2/19
8/3/19
8/5/19
8/6/19
8/7/19
My Final Thoughts
6/27/19 -- Final Project Idea
For my final project, I want to make a wearable control system controlled by hand motions to drive around a small robot.
The wearable control system will be a glove-like apparatus. It will have certain circuits or sensors within the glove so that when the user’s hand flexes or relaxes, the glove will have a completed circuit or give a sensor value that will translate into a motion for the driving robot. Different fingers flexed would translate to turning or stopping. The completion of these circuits would then be translated into movement commands sent over serial communication to a small robot.
The glove would ultimately be made of a softer material, maybe cast/molded, and have circuits and electronics smoothly embedded in it. It would have the main Arduino/circuitboard on the back of the hand. It would also have LEDs that would indicate when certain circuits/sensors have the proper readings to move.
The robot being controlled would be a small, simple robot. It would either have a 3 or 4 wheel drive, and would likely be made out of CNC milled material or a 3D printed chassis. The electronics would be easily accessible.
My eventual goal with this final project is to get the small robot to drive around the lab being controlled by motions of my hand.
7/2/19 -- How I'm going to approach the project
I think I first want to tackle the small, controlled robot, and then work on sensors and serial communication for the glove. Since we’re learning laser-cutting in the next few days, I want to make a press-fit chassis for my robot with space to mount motors and an arduino. I also want to attach wheels onto the motors and get the robot to drive around using pre-programmed the Arduino code.
In the following few weeks, I plan to shift my focus to the glove part. I need to learn more about sensors to decide on which to use for the glove, and I also need to figure out how the glove will communicate with the robot. I would also like to make the chassis for the robot out of a much sturdier material.
7/8/19 -- First prototype of the driving car part
You can check the documentation for this lab for a much more in-depth explanation of the prototype and how I made it, but here is a summary of what I accomplished.
- I made a simple chassis for the car
- I hooked up a working circuit with two DC motors that move in the right direction
- I wrote code that consists of a modifiable, time-based series of pre-programmed movement functions.
This prototype was pretty successful because it functioned how I intended it too. However, while building it, I noticed some problems/inefficient methods I could fix in later prototypes.
Things to fix:
- Make it more precise
- A more structured/robust chassis (a different material?)
- Add places within the chassis for the breadboard/5V battery/wires
- Better wheels
- Faster movement?
Next features/steps:
- Add in sensors?
- Move away from breadboard (to a custom, smaller circuit)?
- Fix the chassis so it’s made of 1 piece.
- Start working on/developing glove, learn about sensors/electronics needed there.
- Start working on communication between glove and car.
7/15/19 -- An approach to the glove
For our weekly assignment, we had to use a button to control LEDs and other output devices, so I used this as an opportunity to devise an initial prototype of the glove. I used a few small strips of the adhesive copper sheets, soldered on wires and resistors, and used an extra scrap of copper to act as the actual “pressing” part, so when I put the copper down on the two leads, the LED would turn on. I improved on this mechanism, first starting out with having the copper strips on a sheet of cardboard, and then transitioning it onto a latex glove. Eventually, instead of just turning on an LED, I used the “button pressing” to drive a motor. Here was my final circuit:
One problem I had, though, was that the latex glove was too flimsy and the copper kept on bending the glove when I didn’t want it to, so for later prototypes I will have to likely use a fabric glove of some sort. Also, it was pretty hard to accurately get the copper lead on my finger to connect the two on my palm. In the future to solve these problems, I want to make the control via bending more accurate, and not rely on connecting two leads together. I might use sensors, either capacitors or magnetic sensor, to detect the distance between my finger and palm, getting a more specific reading.
You can check the documentation for this lab for a much more in-depth explanation of my progress.
7/22/19 -- The glove, but improved!
This week, we were working on using input devices (sensors) to get readings of conditions, and I used this as an opportunity to test out sensors with my glove. I used the Hall Sensor (which senses magnetic field) and a magnet as a distance sensor. When I bring the magnet closer to the sensor, it changes the reading to be closer to 5V or 0V, depending on the side. I tried to first implement these changes on a vinyl glove, but hot glue wasn’t sticking. I found some new materials (webbing and expandable tubing) in the sewing cabinet, and the hot glue stuck much better. I also lasercut a box to hold the UNO. I like this version of the glove a lot better, now that it’s in multiple parts, because it’s much more robust. I think I’ll be sticking with this general new structure of multiple bands or rings rather than a solid glove. However, the UNO is really bulky, so I’m planning on switching to an Arduino Nano or ProMini for my final version. I also want a way to keep the ring attached to the band and to mount a power source to the band, but I’ll find that later.
You can check the documentation for this lab for a much more in-depth explanation of my progress.
7/29/19 -- Serial Communication
Today, I worked on getting serial communication between my glove and the car for the final project. This was the last main step I needed to take to make my final project idea start to become a working reality. I used two of the NRF24L01 radio modules that I wired up to both of my Arduino Nanos, and these modules are able to both transmit and receive, so they are wired the same. I used the example RX/TX code from Rob’s documentation as a starting point, and then integrated in my magnetic sensor code from last week to get readings. I added in a few if statements so, depending on the readings, it will send out different numbers. On the receiving side, the code will eventually have a switch case that will cause the car to do different movements depending on the number it receives.
//if magnet is touching sensor
if(sensorAve > 0 && sensorAve <= 5){
data = 1;
}
//if magnet is very close to sensor
else if(sensorAve > 5 && sensorAve <= 400){
data = 2;
}
//if magnet is far away from sensor
else if(sensorAve > 400){
data = 3;
}
After a lot of struggling to figure out why my receiving end wasn’t working, I used a working transmitter with my receiver, and the receiver worked well. I realized that the problem wasn’t actually on my receiving end, it was instead on the transmitting end. Upon closer inspection, I realized that I had plugged it in wrong. :(((((
7/31//19 -- Sewn Glove
Today, I used the sewing machine and fabrics to make a fabric version of my glove. I started by soldering a protoboard to hold all my glove electronics. It was really difficult, but I eventually got it all soldered. It looked very nice. Next, I used my hand as reference to make a pattern piece for my glove. After a few tests to adjust the seam allowance and dimensions, I cut two layers of 3 pieces to make up my glove. Then, I sewed the side seams of each set of 3 pieces together, and then sewed the layers together to make a tube. I flipped the tube inside out, and then sewed it in place. I also sewed my protoboard through the extra holes to the back of my glove. After sewing the base for the glove, I then soldered two Hall Sensors onto two small protoboards so I could wire them up to my protoboard. I connected the wires from my protoboard to one Hall Sensor, and marked the place I wanted to sew it down. I used some scrap fabric to make a channel for the wires to keep them in place and give the glove more structural integrity.
You can check the documentation for this lab for a much more in-depth explanation of my progress.
8/1/19 -- More Sewing
Today, I worked on sewing the channel for my other wires because I ran out of time yesterday. I also tested the readings from my sensors, and the readings are being really weird. I first tried to fix it by replacing the sensors in case they were broken, but nothing changed. I don’t know what’s wrong, but I will try to fix it tomorrow.
8/2/19 -- Troubleshooting my Glove Protoboard
After testing the readings from my Hall Sensors yesterday and realizing that they were bad, I spent most of today figuring out the issues with my protoboard. Since it wasn’t the sensor itself, I figured it was likely bad soldering. First, I tried to use the beeping function on the multimeter to figure out if any wires were shorted. <iframe src="https://player.vimeo.com/video/358941944" width="640" height="480" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe> Most of the protoboard was good, but one of my analog pins beeped in two places, so I decided to change which analog pins I was using. They beeped normally afterwards. Even after changing the pins, it still didn’t give me normal readings. Rob helped me use the voltage reading function on the multimeter to figure out where it was actually bad. Turns out, on my ground line, the soldering was just really bad and one wire was barely floating above the ground line. After fixing that soldering, the readings worked well. Before the lab ended, I also cleaned up my wire channels, and they look much neater now. I also took some velcro and hot glued it onto my glove so now I can wear it for real! It’s coming along very well!!
Here was how my glove turned out in the end– it looks so clean and nice! I’m really happy with my results.
8/3/19 -- Motor Drivers and Soldering my Car Protoboard
Today, I learned how to use a motor driver for my car. It actually just takes a few simple connections from the motor wires, and those connections go to PWM digital pins on the Nano. Luckily, I had enough digital pins for everything to work. I soldered the components I need for my car onto a protoboard. I had designed a schematic in Fritzing last night, but I didn’t take the motor drier into account so it has transistors instead. Honestly, this was the cleanest soldering I’ve EVER done on a protoboard– it turned out super well! There seem to be no visible shorts or disconnections, but I guess we’ll see when it’s being tested.
8/5/19 -- Designing the Chassis, Brainstorming Wheels, and Printer Troubles
Now, since I have the protoboard for my car soldered, it’s time to CAD the chassis to custom-fit all of my components. One of the issues I’ve been dealing with, though, is figuring out how I’m going to make wheels for the car, so for now I am only including two DC motor mounts and a space to fit a third wheel. I’m thinking of making a ball caster wheel as my third, free-spinning wheel, but I will deal with that tomorrow. I took all of my measurements with a caliper and used my prior sketches and designs as reference as well. Since part of the motor driver sticks off the final protoboard, I wanted to laser cut a test mount to make sure everything fit, and it fit well. Here is my final design for the chassis. It has space for a 5V battery inside and everything. When it was time to print, the Ultimaker was being very uncooperative with the filament. I tried changing the material many times, and I realized that the material was just getting jammed each time. I then switched materials completely from a red PLA to a black PLA, and after that, the filament was coming out well, and my print seems to be going well so far. It might not turn out completely perfeclty because it’s a 15 hour print, but we’ll see tomorrow. Now, I definitely feel more confident in troubleshooting a 3D printer when it has material issues.
You can download the car chassis STL here.
8/6/19 -- Chassis, Wheels, and Free Spinning Wheels
Turns out, the chassis print that I started at the end of lab yesterday turned out PERFECTLY! It only took a little bit of filing and cleaning up of some of the holes to get the screws and motor shaft to fit in well, but otherwise, it’s amazing! My measurements were surprisingly perfect. My circuitboard for the car fits in snugly into the enclosure I made for it on the surface of the chassis. I also drilled holes into the chassis top to put in screws on the corner holes of the protoboard to be extra secure. My 5V battery fits in perfectly, and the micro USB fits well through the wire hole I made. I had to drill a few holes to put the motor wires through, but it’s fine.
I next wanted to design the wheels that are attached to my motors. My wheels can be relatively simple– just a hole for an axle in a larger circle, with some rubber or grippy material around the circumference. The other day, I cut two axles that fit inside of two axle couplers well, so I just took the diameter measurement with a caliper and made a larger circle. I wanted to cut a cardboard test, but today, the lasercutter was having some issues (we think it was a dirty mirror that was causing the focus to be messed up), so I had to use a box cutter. My dimensions seemed to be pretty good, so Rob helped me use the lasercutter in the machine shop in the basement to cut 1/8” delrin for my wheels. I cut two delrin circles for each wheel, and used the quick-drying epoxy to stick the circles together and to each axle. I found some black rubber bands that fit around the circumference of the wheel that will give it some more traction.
After getting the motorized wheels attached to my chassis, my next job was to figure out the free spinning wheels. I decided that two separate wheels would not be ideal because it didn’t work well in my first prototype a few weeks ago. Instead, I think I’m going to make a “ball caster” wheel (which is basically a free spinning ball inside a socket) to attach as my third, free spinning wheel. I tried to design and print a test using a wooden sphere as my ball, but after taking my initial measurements and printing a test, I realized that the caliper was off and gave me measurements that were half the size of my ball. I printed the correctly sized test on the Prusa, and it turned out well! The enclosure for the ball was slightly too tight, so it didn’t allow for much movement. Also, one of the prongs of the socket broke off when I was trying to insert the ball, so I think 4 prongs is too many. When I got home, I implemented these changes into making an extrusion that will come off the back of the car that houses the ball caster joint. Tony kindly set up the print for me tonight, and hopefully it will turn out well tomorrow.
You can download both the socket test and final socket extrusion here.
8/7/19 -- Finishing Touches on the Car and Code
Today, I finally finished the car and got the code up and running!
First, I took my socket ball extrusion off the Prusa to attach it. The print turned out slightly messy, so I used diagonal cutters to clean it up. When I tried to fit the wooden ball I found yesterday into the socket, it was unable to move around freely even with the extra clearance I added. Luckily, I found another metal ball in the blue cabinets that was slightly smaller. I had to use the heat gun to fit the socket arms around the ball, but now it can move around freely without coming out.
After fixing the socket wheel, I attached it to the chassis. It was slightly hard drilling the holes to be aligned, but eventually it all fit well. Then it was time to move onto code!
I ran into 5 main problems today:
- My motors weren’t running when I sent them commands.
- The range of my RF sensors was way too small.
- The movement commands were executing in chunks rather than smoothly.
- The turn left command would start and be unable to stop.
- My car Arduino Nano shorted itself and broke.
I fixed these problems by (respectively):
- Removed the code that reassigned my
rec_data
variable to another value. - Changed the command that made the RF sensor range small into a larger range.
- Put in an interrupt so when my data is processed, it calls a separate process data function so it does not delay the rest of my code.
- I changed the pin where the motor driver was drawing power from 5V to VCC/VIN. I also checked my soldering of the motor wires and cleaned it up a bit.
- I had to remove the Nano with the desoldering pump and a heat gun and resolder a new one to the pins the original Nano was on.
After I fixed these problems, though, my car actually ran well and was able to execute the movement commands with my gestures! One of the motors runs slower than the other, though, so it is unable to go completely straight.
You can check the documentation of my coding process for a much more in-depth explanation of how I coded my final project.
My Final Thoughts
I really enjoyed making my gesture-controlled car, even though I ran into many issues in many regards. If I had been given more time, I would have probably refined the input system for my glove because bending my fingers the right shape to get the magnet to touch or be close to the sensors is actually pretty challenging. I also would have replaced my motor that runs slower with a working one.
In making my final project, I definitely expanded my knowledge of electronics and improved my skills. I actually understand how all of my electronics work, and I know how to troubleshoot my problems to some degree. I definitely would not have been able to do this before this class and project.