More information on the servobot

  1. A high-level description of your robot design with total cost (for one prototype unit; see point 7 regarding volume pricing).

This is a very simple robot, using modified cheap servos as the motors (2USD each). This is typically cheaper than having separate motors and controllers. It is very simple to modify a servo, and it’s a fun project for a student to do so. You can choose more expensive servos, or the Hobbyking ones that only cost 2 dollars each (2.6 dollars for slightly larger servos). There are many similar builds like this on the internet, and I’ve been inspired by several people who I’m not giving credit to here.

As a microcontroller board, it uses the MSP430 Launchpad (4.30 USD) as the robot platform. I’m convinced the MSP430 is the lowest cost robot platform you can get that includes the programmer. If you share the MSP430 launchpad amongst several students, and use standalone MCUs for the robots, you’d lower the cost even more. A sufficient MSP430 microcontroller would cost around 1 dollar.

The cheapest form of sensors is based on two light-sensitive resistors, which work surprisingly well as an obstacle avoidance sensor. The reason for it working so well is that most furniture typically casts a shadow on the floor, which is detected by this sensor. A slightly more expensive DIY infrared proximity sensor can be used on the same robot (http://lars.roland.bz/diy-infrared-proximity-sensor/).

The robot also needs batteries, and I’ve chosen to use a battery case with 3 NiMH rechargeable batteries (each with 1.2V). This gives you an ideal 3.6V which is high enough for the servos and low enough for the microcontroller (max 3.6V). If you want to use Alkaline robots, you’d have to either experiment with 2 Alkaline batteries (1.5V each) or use a regulator for the MCU. There is a regulator on the Launchpad that could probably be used for the project with no additional cost, or use an external regulator that costs less than one dollar.

The robot does not need any custom parts, although I’ve made a more expensive version with an LCD and laser-cut parts available here: http://lars.roland.bz/a-simple-programmable-robot-rover-using-the-lcd-board/ and another similar bot remote controlled by a Chronos watch here: http://lars.roland.bz/watch-controlled-robot/.

In its simplest form, the robot is built using glue to glue the servos onto the battery pack and then the MSP430 controller board on top of that. As wheels, they can use cardboard cut as a circle. You also need some prototyping board to make the sensor (which can be either the cheapest light-sensitive resistors or a slightly more expensive IR proximity sensor). Connect the cables to the launchpad and your off. But students could do more than this. They could make a robot frame out of cardboard or thin wooden parts. It’s also relatively easy to add more servos and more functions to the same platform.

It can be programmed using open source tools such as MSPGCC (C or C++), with my online IDE or even better with an Arduino-clone called Energia. The Energia development environment is familiar to those using Arduino, but works on this much cheaper hardware platform. IAR and CCS also have code-limited versions that can be used to develop the robot firmware.

Here is the circuit diagram:

  1. A description of the educational applications and possible resources.

The MSP430 platform capability really spans from extremely simple tests (such as turning on an LED) to much more advanced projects (see 43oh.com/forum for some ideas). The main thing is for them to learn some simple programming primitives, and they can learn about electronics and mechanics. They can also learn about different types of sensors. I would suggest buying some more expensive sensors per class so that each class can test out more advanced concepts. These can include humidity, accelerometers, gyros etc. This is a good platform for example for making a balancing robot, but then you need more advanced parts including sensors and maybe also better motors. That would classify as a very advanced control engineering project where mathematics and control engineering (including signal processing) is part of the understanding of the project.

Connect a cheap solar panel on the bot, and you could even run it using the sun only, learning about renewable energy. I’ve used it succesfully with my children (6 and 8 years old), but adults also have a lot of fun with this platform.

A good way to inspire students to expand on the robot is to make a competition of some sort. Maybe they should make the robot follow a certain path, behave in some way, play a sound at some point (buzzers are also cheap and the right type can be connected directly to the IO of the MSP430) or even fight by pushing each other off the table. Just keeping it on a table without falling off is quite challenging. Another possible test is to make a line-following robot, which you should be able to do without any additional hardware. If you throw in an RGB LED (or just LEDs of different colour), it could detect different colours of lines also.

  1. A list of parts, their sources (include URLs if applicable), availability, and their prices.

1 x Launchpad MSP430: $4.30 (plus shipping) This includes the programming board, which you could share to lower the costs further.

2 x cheap Hobbyking.com servos: $1.98 each (plus shipping), easily modified for full rotation. The link is one of them. Hobbyking.com has several versions around this price.

2 x wheels. I 3D printed mine, but you can make these from many other things, such as a bottle cap or a cardboard circle.

2 x light sensitive resistors (LDR).  < 1 USD each.

Some prototyping board to assemble the resistors on (you could just use cables and solder them together).

A battery pack with 3 rechargeable AA NiMH batteries, totalling 3.6 volts (Don’t use alkaline! If you want to use alkaline, use two, not three batteries)

Double-sided tape (a few dollars for a whole roll of tape).

  1. A list of other tools and equipment needed to create your robot and estimated prices

A computer is necessary to program the board. And a battery charger for the AA NiMH batteries.

  1. Relevant drawings with dimensions.

No custom parts are necessary (though you can of course make them with a laser cutter etc. I have robots that have both 3d-printed and laser cut parts.

  1. Step-by-step instructions for creating your robot

-      Program the MSP430 chip with your firmware

-      Modify the servos for full rotation (I can supply more details, but there are lots of youtube videos for this. It’s simple.)

-      Glue or tape the servos onto the battery pack (or improvise). One site suggest using a CD as the base for a similar build, using velcro to fasten motors etc onto the board.

-      Glue the board onto the servos.

-      Glue the cardboard wheels (cut them yourself from cardboard or find something cooler) onto the servos.

-      Solder two light-sensitive resistors onto a protyping board in series. Connect the middle to an analog IO pin on the microcontroller, and each of the other sides of the resistors to VCC and GND.

-      Point the two resistors in separate directions, maybe towards the floor (experiement). Run the firmware and enjoy. Maybe have more of them and see how they react to each other.

  1. [Optional] If your robot can be mass manufactured, you can present an analysis of how costs would scale with quantity.

There is nothing to mass produce. This is a very cheap robot as it is. You could certainly make a kit around it and make it more advanced if you wanted to.

You could also make an expansion board (in the MSP430-launchpad-world called boosterpack) which has possibilities for other projects. One example is this one: http://lars.roland.bz/msp430-motor-driver-boosterpack/ If so, I would put space for an MSP430 chip on the board, so you can run the robot without the Launchpad itself, similar to the LCD-robot on this link: http://lars.roland.bz/a-simple-programmable-robot-rover-using-the-lcd-board/

If you’d like to reuse the MSP430 Launchpad across several projects, you may want to make a board with room for the MSP430 chip, some servo connectors and connectors for sensors. Such a board costs < 1 USD per board to manufacture. The MSP430 chip is easily programmed even if the microcontroller is connected to another board (using 4 wires), but it’s even easier if you use a 20-pin socket for the chip so you can move the microcontrollers around and reuse them across several boards.

  1. Software, if any. All software must be available open-source.

There are many possibilities. I think the best current option is Energia, an Arduino-clone for MSP430. That has come since my first prototype. I used my online-IDE for developing the firmware. You can also use MSPGCC (free and open source) or IAR/CCS (commercial packages with free licenses for code-size restricted projects). The latter options are not open-source, but they are free and they have debugging, which makes it far superior to the Arduino interface.

  1. A description of any actual experiments conducted

I haven’t done that many, but there are many possibilities.

  1. Pictures of your robot, if any.

  1. Videos of your robot in action, if any.

http://www.youtube.com/watch?v=4Q5gqny9eck

5 thoughts on “More information on the servobot”

  1. This is a great project, but I am having a very difficult time recreating it.

    I am not experienced with MSP430. I built a robot using MSP430G2553 and a few other chips, and none are working. I can’t get the servo motors to run the correct way. I assume from the code, one runs clockwise and the other runs counterclockwise. Is that correct?

    I can’t get the photoresistors to change any operation of the motors. I don’t know if that is because I’m using less than 3.6V.

    I have a lot of questions. Is there a way I can e-mail you these to try and work them out?

  2. Hi, is the servo running (full rotation) one way, but not the other? If so, your pwm clock is either too high or too low. If you have a scope, you can see what the PWM pulse looks like. The way these full-rotational modified servos work is that at one PWM, they’ll stand still, at a higher PWM they’ll move in one direction, and at a lower PWM. You are right, they should be moving opposite directions for the bot to move forward.

    PWM, for info, is a series of pulses that has a certain length, and the length of the pulse typically decides which degree the servo is in. With a full-rotation servo, the rotation direction is decided by this pulse width.

    Are you running the code from my website? Before using the photo-resistors, try modifying the code so that it always goes forward or left or right… Then modify the ‘center frequency’ of each servos, to see if you can get the servo to go the other way. Often different full-rotation servos have slightly different pulse-lengths that they turn on.

    If you’re ok with it, maybe it’s better to post the questions here and I can try to answer them here?

    1. OK I look like a fool because I am.

      After making many checks, I finally looked at the battery voltage. For the record, this won’t run on 1.8V. I changed batteries and it works like a champ.

      I am going to try to build these with some teachers. Do you object to us putting together a detailed step-by-step procedure for making this and posting it on the web? These teachers may have thier students do this, so it would be good for middle school students to have detailed instructions. We will give you credit, of course. (These teachers and very smart and will know right away I couldn’t have come up with this. But it is a brilliant project.)

      I will send you a link once it is complete.

      Thank you again for your quick response and great idea.

      1. Good news. Yes, batteries are important. In fact many servos won’t work well even at 3.6V, which is the maximum voltage for the MSP430.

        Please spread it as much as you want. Consider it Beerware 🙂 http://en.wikipedia.org/wiki/Beerware

        If you do develop some material, it’d be very good if you can link to it here also. I have talked to other teachers and interested people also who are looking for better material for school projects, so it would be very useful to have some. Let me know if you want me to review the material for you. You can also email me at lars and then the main domain of this site, i.e. roland.bz.

Leave a Reply

Your email address will not be published. Required fields are marked *