Few months ago, I finished my first online electronic course. It was a new experience but it awakened in me an old passion very sleepy, the electronics!
The course was: EE40LX: Electronic Interfaces, through EDX platform and administered by Berkeley University, California. The idea was a general review of basic electronics through exercises and experiments, culminating in a robot to fulfill some basic requirements:
The robot should at least:
- Produce and React to light
- Produce and Respond to sound
- Move engine
- Remotely respond to IR commands
In the photos, the final project and the video shows how the robot meet the specifications:
EE40LX Robot video
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Bill of Materials
Step 2: Project Diagram
For the heart (or rather the brain ....) of the robot, I used the Arduino UNO. Bellow, the block diagram with its respective pinouts. For a more elaborate design is essential to develop this type of diagram. It will always be the guide that you must review during the encoding of the SW.
Step 3: "RESPONSE TO LIGHT"
The basis of "light reaction" are the photocells. The photocells (which are resistors that vary with the light), were connected in configuration "Whitestone Bridge." A change in light intensity cause an imbalance of the resistive bridge, which led to saturation of an operational amplifier. Two photocells, one front and one rear were used. The action is simple when the robot moves forward and the light is stopped, the engines give "reverse gear". And of course, vice and versa.
Another very important point, is the use of a "Power Block", because instead of constantly have power over the bridge, the source is gotten via an output pin of Arduino. Thus, only when you need to check if the sensor, 5V is momentarily produced by Arduino, feeding the bridge only during the "read window" (in this case, the pin 8).
Step 4: "GENERATION AND RESPONSE TO SOUND"
In order that the robot could "hear", an old PC microphone was chosen. As the microphone signal is very low, an operational amplifier (inverter) was used for signal amplification. Also, before being amplified, the audio signal passed by a high-pass filter, thereby eliminating the DC component.
To "talk", a simple "Buzzer" was used.
Step 5: "MOVE MOTORS"
For the movement of the engines one bridge H, (L293D) was chosen. Important to remember to add ceramic capacitors at the motor terminals. This will help reduce any electrical noise produced by the "brushes" of the DC motors (10pF is OK). Ah! speaking of noise, it never hurts to remember that it is always good have 2 different batteries, one for the motors and another for the Arduino (not forgetting to connect the "Grounds").
Step 6: All TOGETHER
I add a RGB LED (common cathode), so was possible follow some actions of the robot through the LEDs.
To receive commands via an IR remote (Infra red), I used a VS1838b, a simple and very reliable IR receiver.
Putting it all together the final circuit is more or less like the drawing showed here.
Step 7: Software
The idea behind the SW is very simple. When turned on, the robot generated 4 beeps, and stays the signal "ON" from the remote control. Upon receiving it, sounding 2 beeps, the LED turned blue and the robot is ready for the sound command, or means, a more pronounced noise like a whistle or a palm (the gain of the Op Amp, should be tested to generate a coherent signal). It is also important that during the "setup phase", to "listen" to the ambient noise level in order to compensate it, what will translate in better sound accuracy helping that the robot does not react with any little noise.
With the sound command, the robot starts to move forward and the LED turns GREEN until the front sensor light is blocked. At this time, the LED turns RED and the robot moves back at ”reverse gear" until the rear light sensor is blocked, thus reversing the movement. The robot continuous on those movements until a command to stop (remote control) is receive. The updated Arduino code can be found at GITHUB:
or at file bellow:
Step 8: Conclusion
That's all Folks! Just a minute of silence for the good old MJRoBot I, that now rest in peace inside my components drawer, serving pieces for his younger brother (or son?), The MJR0Bot II which will star in the future a new intractable here.
The MJRoBot II can be found here in heis 1st version:
And here with Bluetooth control:
For more tutorials and projects, please visit my Blog:
Participated in the
Robotics Contest 2016