You are currently browsing the tag archive for the ‘arduino’ tag.
This is our new favourite place – MakerCrate. Complete with 3-D printers. What's not to like?
Find out more here.
This was a quick weekend project, inspired by some YouTube videos.
Three small servos, stuck together with double-sided tape, form the body of the bot. Two servos point upwards and the centre one points forwards. Hot-glue connects the galvanised wire legs to the servo horns. The parts are small, so use a small hot-glue gun if you have one. Hot-glue and double-sided tape are strong enough for the bot, but not so strong that the parts can’t be disassembled and re-used.
The robot walks by pushing the middle leg down on one side, then using the servo on the opposite side to swing the body of the robot forwards. The servo on the near side also rotates in the same direction at the same time, so as to be in position for the next step.
To turn the bot, the top servos are rotated in opposite directions during each half cycle.
A standard Arduino is far too big for this bot, however, an Arduino Pro Mini is smaller than the back of the bot (18mm x 33mm). The Pro Mini is a full featured Arduino, but without the USB interface. To program this board you also need an FTDI adapter like the Sparkfun FTDI breakout. There is no connector on the Arduino, but you can just hold the header pins on the FTDI breakout against the holes along the end of the Arduino.
The Arduino Pro Mini I had was the 5V version. Lacking a boost converter to turn the 3.7V battery into 5V, I tried wiring the battery directly to the Arduino and everything worked. The 110mAh battery I used is tiny and fits underneath the bot.
An infra-red LED and infra-red photo-transistor form the obstacle detector. The photo-transistor is wired with its emitter to ground and its collector to Vcc, via a 5.5k resistor. The Arduino measures the voltage across the photo-transistor. There is a fair amount of ambient infra-red light, so the bot measures the voltage on the photo-transistor with the LED turned off, then again with it turned on. If the voltages are much different, it’s time to turn. In a sunlit room, a black paper tube to shield the sides of the photo-transistor will make detection more reliable.
- 3 small 3-6v servos
- Arduino Pro Mini
- 110mAh lithium-ion battery (and charger)
- Sparkfun FTDI Breakout or Adafruit FTDI Friend
- Infra-red LED
- Infra-red phototransistor, e.g. TOPS-050
- 5.5k resistor
- hookup wire
- heatshrink tubing
- Hot glue gun
- Double-sided tape
- rubber bands
- 1.25mm galvanised wire for the legs
The Arduino sketch can be downloaded from https://bitbucket.org/johnmccombs/bot8_3_servo_walking_robot/get/1d8d6c769bb2.zip or cloned from the bitbucket repo https://bitbucket.org/johnmccombs/bot8_3_servo_walking_robot
The Arduino is a great tool for investigating the world. We often build gadgets to measure something. An Arduino can measure time and voltage, interface with a huge array of I2C and SPI digital sensors and connect to computers and the Internet.
Compressing or expanding time is a recurring theme. Capturing data from very fast or slow events and then displaying it at human scale.
We had a problem getting the temperature in the fridge right. A few degrees too cold and the food freezes. To warm and the life of items like dairy suffers. Here’s a gadget we built to make some measurements. A protoshield with a breadboard is sandwiched between the Ardiuno and the LCD on top.
It measures the temperature every few seconds and plots a graph on the LCD so you can see what happens over the course of the day.
The Dallas DS18B20 is a favourite. It’s a digital thermometer with 0.5 degree accuracy which communicates over a 1-Wire bus. You can connect a bunch of these to the same set of three wires – each sensor has it own address that you use to read the value.
The LCD shield in the gadget is home-made and gets used a lot. It’s built from a ST7565 LCD, nylon standoffs, rubber bands and an Adafruit protoshield. A 4050 level shifter is required to convert the 5V Arduino logic to the 3.3V required by the display. The result is a shield that’s easy to use for basic data visualisation.
For this type of application, you want to use a display with a serial interface, rather than parallel. The ST7565 uses 4 or 5 pins. The more common KS0108 LCD’s uses 13 or 14 pins, which leaves very few pins for your project. Adafruit also have an SPI LCD that would be good for general use.
Here’s the result. The graph shows the temperature in our freezer over several hours. The freezer is self defrosting. You can see it rapidly drives the air temperature in the compartment to just above zero to melt the surface ice. Then the cooling cycle starts and the melted surface ice evaporates and condenses on the freezer coils. However, most of the time the freezer compartment is below -20 degrees C.