You are currently browsing the tag archive for the ‘electronics’ tag.
This is our new favourite place – MakerCrate. Complete with 3-D printers. What's not to like?
Find out more here.
Here’s another iteration of an Arduino controlled autonomous floor robot. This one uses a Tamiya gearbox and servo steering, with infra-red and touch sensors for obstacle detection.
The robot chassis is built from Fischer Technik and a rectangular section plastic downpipe fitting. The parts are held together with screws, plastic cable ties, gaffer tape, glue and rubber bands.
A Tamiya double gearbox powers the back wheels. The white spacer between the gearbox and the red plate of the robot is a PVC downpipe adapter. In this project, both motors are always driven in the same direction and speed.
A basic Futaba servo steers the Fischer Technik front wheels. The front axle is screwed to the servo horn and cable ties attach the servo to the chassis.
One of the challenges with this kind of robot is that whatever sensors you use they only work with 80% of household obstacles. For this robot we used two Sharp infra-red distance sensors pointing slightly left and right. The Sharp sensors have quite a narrow beam. Setting them pointing outwards works well for detecting approaching walls, but leaves a dead-spot in the centre that misses narrow objects like chair legs. The infra-read sensors also miss low (15-35mm) obstructions that the robot can’t drive over.
To deal with things that slip past the IR sensors, we added a touch sensor bar to the front, about 35mm above the floor. This is made of two strips of wood. Two microswitches were glued with epoxy to one strip and the second strip is positioned in front of the switches so that the switches are closed if the front bar hits anything along its length. The front bar was hinged with gaffer tape. This touch sensor gets quite a beating so it needs to be strong and well attached.
The motorshield controls the two DC motors in the gearbox. Separate 9v NiMH battery packs provide power for the Arduino and the motors.
The touch sensors and IR sensor are wired to analog ports on the Arduino and polled to detect obstructions.
The software that controls the robot has a simple set of rules:
- if an object is detected within a few hundred millimeters on either side the robot steers away from that side until the obstruction is no longer detected.
- if an object is detected close up on either side, or moderately close on both sensors, the robots backs up and turns. The turn takes it away from whichever side is closer to the obstruction.
- After the robot backs up, it remembers the turn direction for 3 seconds. Without this rule the robot could back up in alternate directions, leaving it still pointing at the obstruction.
- Arduino Duemilanove
- Adafruit motorshield
- Tamiya double gearbox with wheels
- Sharp GP2Y0A02YK0F IR distance sensor. The IR distance sensors sensors come in several versions, optimised to work over different distances. We used one designed for 200 – 1500mm range. The GP2Y0A21YK0F which works over 100 – 800mm, and has a wider beamwidth, might be a better choice
- 5mm square section wood strips for the touch detector
- 2 x microswitches, recovered from an old mouse
- plastic cables ties, epoxy glue, rubber bands, M3 machine screws and nuts.
- 2 x 6-cell AA battery pack and NiMH batteries
- Fischer Technik baseplate, axle and wheels
This robot negotiates the floor fairly successfully. Going forwards the sensors detect pretty much everything. The main problem is that the robot is fairly tall. Some overhangs or sloping chair legs can strike the top of the robot without being detected by the IR sensors or hitting the touch sensor. Similarly objects that fit under the touch sensor stop the robot.
There are no sensors on the back of the robot, so it’s unaware of hitting something while backing up. The robot can get stuck in a close space where the robot can’t back up, but the IR sensors show an obstruction. When the happens the robot will backup continuously without success. This situation could perhaps be improved with some software changes.
Jeri Ellesworth reckons the secret to learning electronics is to fail and fail often. Here are a few things we do to make it safer for kids to noodle around electronics on their own.
Electronics need power. Young kids often have difficulty spotting danger or seeing that one thing is dangerous, whereas another (apparently) similar thing isn’t. Our rule here is batteries and no AC mains power (unless an adult checks it and plugs it in).
We use battery connectors to tilt the playing field in the direction of success, so that “if you can plug it in, it’s ok”. For example, since 2.1mm barrel jacks are the standard for Arduino power, we use these on 9 volt NiMH battery holders. Some items like the Adafruit Arduino motor shield we use requires additional external power. The power connector isn’t polarised, so we permanently wire a barrel jack to it, to avoid accidents.
There’s a good range of polarised connectors available that you can use.
6 volt and 3 volt AA-size battery packs are good power sources for experimenting on a breadboard. NiMH rechargeable’s can deliver destructive amounts of current if shorted. Alkalines cells, which have much higher internal resistance, are more tolerant of mistakes. Large-sized EZ Hook test clips are great for ad-hoc connections to components or breadboarded circuits. They clip on securely and the connectors retract into the plastic body of the clip when not in use, making shorts less likely.
For digital stuff, pick a voltage for the logic levels, probably 5V is best. You can use level-shifting breakouts to hide the 3.3V components.
- Component leads tend to fly when clipping them after soldering to a circuit board. Safety glasses cover this.
- Burns. The best way to prevent this is a clear work area and a stand for the soldering iron. But fingers will get burnt, so make sure the solderer knows the drill. Ice cubes in a plastic bag, plus a splash of water to improve conduction between the ice and the fingers. Get the ice on as fast as you can and chill for 20 mins. Don’t skimp on the chilling time as it really helps healing.
- Lead-free solder. The consensus of OSH material I’ve read is that lead solder isn’t really a personal risk, but more of an environmental issue. Our approach here is hands wash with soap after electronics and no food in the work area. Lead-free solder is available if you prefer, but for beginners, keep in mind that lead-free solder needs more care and skill to get good joints. Also for lead-free soldering you really need a proper temperature controlled soldering station.
- Solder flux smoke. OSH advice is that you shouldn’t breathe this! It’s generally not healthy and some people can become allergic to the smoke. You can buy or build an extractor to suck the smoke away from the work area, ether outside or into a filter. We use a Hakko desktop unit, but you could get some of the activated charcoal filters and build an extractor with some computer fans.