Over the past week of robotics I created some additional hardware to the RC car. This would include a circuit to have the Motion sensor operating to turn the motor off when it comes within 30cm of any structure. This required a code having a regular void loop having an “if” statement. The next steps for the vehicle will be to apply the steering which will require creating more coding this week.
Monthly Archives: February 2017
Harmonic Motion
I was able to hook up the motion sensor and the car together in order for the car to stop when near an object, and later to actually avoid objects. Continue reading Harmonic Motion
Fine Tuning the Arm
This week I worked on making the arm and marker lifting mechanism work together. I was able to create a working version, but it was not yet finished, as there were still some changes to be made on the arm. A new one was created with shorter arms, a larger base, and the servo motor above the marker instead of below it. After putting this together, there was a small issue with the stepper motors jumping around rather than moving smoothly. I plan to fine-tune this starting next week.
Light Reactive Speaker
I have created a speaker that reacts to light using a photo sensor and and Arduino board. I have coded it to put out a tone depending on the amount of light it can detect. This means that if I put my hand over it it cannot detect as much light as if it were in broad daylight.
Motion Sensor Madness
This week was specifically focused on using a motion sensor to control a small motor. The code up above has a simple void loop filled with a couple “if” statements. If there is an object close to the sensor the motor stops, in order to simulate breaking, otherwise the motor just keeps spinning forward. The function at the bottom actually uses the echo pin to find how long it takes to get that echo and from there it calculates how far the object is in cm. I didn’t create the function so here’s the link to the webpage where I got a good chunk of the code http://www.instructables.com/id/Simple-Arduino-and-HC-SR04-Example/
A Simple Solution
After mounting the floppy mass device onto the end of the arm, many problems became apparent. It is at times unreliable and unpredictable, and placing the servo and mass at the correct position is difficult. And not only that, it admittedly looked pretty dumb.
Arduino Programmed Range Finder( HC-SR04 )
In this fantastic week of robotics I was introduced to the HC-SR04, which is a Range Finder that is going to be mounted on my RC car eventually. The HC-SR04 will be making decisions for my RC car whether to turn or stop to avoid collisions. I was impressed with the large distance the Range Finder was capable of reading up to. I finished the RC car figure 8 code, but i need to make some hardware adjustments with the H-Bridge. After review the RC cars H-Bridges relays were not the correct part for turning the switch on and off rapidly. I am looking forward to adding the HC-SR04 and adjusting the Relays in the H-Bridge next week to get the RC up and running to my commands.
ARDUINO PROGRAMMED RC CAR
This previous week I transferred my knowledge of programming electric motors to a larger project involving a RC car. This RC car is already programmed to move a foot forwards and a foot backwards consistently, and the distance can be easily modified with change of delays. The next step for this RC car is to add an additional H-Bridge to control the steering. By the end of this week the car will be able to drive around in figure eights and possibly a few other paths. I am working on making a better physical model of the car to create more accurate turns and such as well.
Speed Control
This week was all focused on controlling the speed of the motor, turns out to be easier said than done. Trying to find out a ratio for stopping and starting the motor in milliseconds is as frustrating as it gets. We hooked up the speed function to a small dial and it was nice learning the boundaries and the purpose of analogWrite, but it was incredibly frustrating beginning to end.
The Floppy Mass Method
This week I focused on how I would lift the marker off the paper. I began by looking into the magnet method I mentioned in my last post, but in the end this proved to be more trouble than it was worth. My next attempt was the “floppy mass method.” Continue reading The Floppy Mass Method