Let's Make Robots!

Building a SpurtBot

It's a simple line follower.

Introduction

SPURT stands for School Project Using Robot Technology, a concept introduced by the Rostock University, in Germany. You can find more about their program on their website.

These instructions are for building a very simple version of a line following robot, based on the SpurtBot design above. Thanks to Hartmut from Rostock University for his support in creating this design.

The video explains a bit how the SpurtBot works, and shows it in operation. The version of the SpurtBot in the video is not identical to this one, but it is very close and works just the same. A couple of resistors were eliminated, which simplified the circuit for these instructions.

Here's the schematic for the circuit.

NOTE: I have found that adding a 10k ohm pull-down resistor between pin 1 of the QRD-1114 and ground improves performance.  It tends to make the line following more accurate in some situations by insuring the base of the BC337 transistor is pulled firmly to ground.

 

I hope you enjoy building your SpurtBot!

 

STEP 1: Gather your materials

Parts/Materials

  • (2) Bearings from inline skates (Search YouTube for vids on how to remove and clean them.), or you can order them.
  • (1) Balloon for Bands/tires (Use heavier duty 'punching balloon'.), I order them in bulk.
  • (1) Popsicle/craft stick (I like nice color ones, but use whatever you like.), I order them in bulk.
  • (1) 2 inch piece of 5/16 inch wooden dowel (The dowel should fit snugly into the bearings.), from your local hardware store.
  • (2) Motors (3VDC, Jency Motor ST130-12240-38, Jenco part # 154915 or Mabuchi FK-260SA-10400, Jenco part # 2081908)
  • (2) AA alkaline batteries
  • (1) QRD-1114 reflective sensor
  • (1) bc 337 NPN transistor
  • (1) Resistor (50 to 100 ohm for IR emitter)
  • (1) Battery holder for 2xAA batteries
  • 8 inches of red wire
  • 6 inches of white wire
  • 6 inches of black wire

Tools/Supplies

  • Wire cutters
  • Wire strippers
  • Needle nose pliers
  • Hot glue gun and glue sticks
  • Soldering iron and solder
  • Drill and 1/16 inch drill bit
  • Sharp scissors
  • Heat shrink tubing (1/16 inch, 3/32 inch, and 1/8 inch)
  • Butane Lighter or other heat source

 

STEP 2: Make some holes

Using the four leads of the QRD-1114 sensor as a guide, mark four dots near the very end of the craft stick.

Now use the three leads of the bc337 transistor to mark three dots about half an inch behind the dots for the QRD-1114.

The two sets of holes should be close enough to each other that the leads of the QRD-1114 when it is inserted can be bent back to make contact with the leads of the bc337 transistor.

Use a 1/16th inch drill bit to drill holes over each of the dots. Go slowly and be careful to avoid running the holes too close together. Use of a drill press is very helpful, but you can do it with a hand drill if you don’t have one. A wooden backer board underneath the craft stick will also help support the material while you are drilling.

When you are done, the craft stick should look a lot like the picture below.

 

STEP 3: Attach the dowel

Mark the center of the dowel as a guide, and use the hot glue gun to attach the dowel on top of the craft stick. The dowel should be about 3/5th back from the front of the craft stick where the holes are drilled.

You want to be sure the dowel is square with the craft stick. I like to use the corner of a table to hold the two pieces of wood at 90 degrees while the hot glue is drying. 

 

STEP 4: Attach the bearings

Next place one bearing flat on its side. Hold the craft stick and dowel so that one end of the dowel is directly over the hole in the bearing. Being careful not to apply any pressure to the craft stick, push down firmly on the other end of the dowel until it is inserted fully into the bearing.

The end of the dowel should be flush with the surface of the side of the bearing, as shown in the picture below.

Now repeat the process with the other bearing, so that you have one bearing on each side of the dowel. While you insert the second bearing, be careful to press down on the top of the dowel, rather than on the edges of the first bearing, or you might wind up with the dowel inserted too far into the first bearing.

Also be sure that the bearings are mounted at 90 degrees to the dowel. Congratulations, you now have a ‘rolling chassis’ for your SpurtBot.

 

STEP 5: Attach your motors

The motors need to be positioned carefully. Before you mount your motors, keep the following things in mind.

  • The motor shafts need to be parallel to the rolling surface of the bearings. In other words, the motor shafts should be at 90 degrees to the craft stick and parallel to the dowel.
  • The right motor shaft will need to be thickened with 3 to 4 pieces of heat shrink tubing. You need to leave about 1/8th of an inch between the shaft and the surface of the bearing to allow for the shrink tube to fit.
  • Despite the above, you don’t want too much space between the motor shaft and the bearing, because it will add too much tension to the wheel when the bands are installed.
  • To keep tension roughly equal on both bearings, you want both motors positioned the same distance from the bearings.
    The shaft of the right motor should be positioned directly behind the right bearing. The shaft of the left motor should be positioned directly in front of the left bearing.
  • The shaft should overlap both sides of the bearing a little bit, so the tension bands will stay on the wheels.

OK, time to glue the motors on! Don’t sweat the points above too much. If you mess it up, hot glue is easy to remove and you can try again.

Start with the right motor, which will be mounted to the rear of the dowel. Position the motor and get a good feel for where it will go, noting the points above. Once you are ready, place a generous amount of hot glue on the craft stick and the dowel on the side the motor will touch.

CAUTION: Hot glue is, well… HOT. It will stick to your skin and burn you. The end of the hot glue gun is very hot. Don’t touch it, and don’t let it touch anything that can burn.

Pull the hot glue gun away quickly, and place it safely on the table. Working quickly, grab the right motor and place it on the SpurtBot. You will have a few moments as the glue hardens, so check that the shaft is positioned as you want it. Then hold it still for a minute while the glue dries.

After the glue is dry, you can break off the little annoying threads of hot glue that inevitably happen.

If you are happy with the way your right motor was mounted, repeat the procedure with the left motor. Remember that the left motor will be mounted in front of the dowel, with the shaft facing the left side of the robot.

 

STEP 6: Mark your connections

I like to mark all of my connections, so I don’t make (many) mistakes. Look at the SpurtBot from the top so that the front end with the holes is facing away from you.

Start with the four holes you drilled in Step 2 for the QRD-1114. Carefully mark the front-left hole with a ‘1’. Moving clockwise, the front-right hole is marked ‘2’. The hole just below that is marked ‘3’, and the hole just to the left of that is marked ‘4’.

Next, we’ll mark the three holes for the bc337 transistor. The left hole is marked ‘e’ for emitter. The center hole is marked ‘b’ for base. The right hole is marked ‘c’ for collector.

I also like to mark the shape of the bc337 transistor right on the SpurtBot, so I always insert it the right way. Make a little ‘D’ shaped marking behind the three mounting holes, with the flat side of the ‘D’ facing the front of the SpurtBot.

 

STEP 7: Install the QRD-1114

Look at the QRD-1114 reflective sensor. Pin 1 of the sensor is marked with a dot on the case. The sensor will be mounted ‘dead bug’, meaning the sensor will be pointed down with its leads up in the air.

You will insert the leads up from the bottom, and through the four holes you drilled in the front of the SpurtBot in Step 2.

Make sure that lead 1 of the QRD-1114 is inserted into the hole you marked ‘1’.

Hold the QRD-1114 flush against the underside of the SpurtBot, and bend all four leads slightly outward to help hold the sensor in place.

 

STEP 8: Install the resistor

You are going to solder the resistor between pins 1 and three of the QRD-1114. A small 1/8th Watt resistor should fit nicely. Try to solder it so that it is as close to the craft stick as possible. This will help keep the QRD-1114 in place.

Solder one side of the resistor to pin 1 of the QRD-1114. It may be helpful to use an object to hold the other side of the resistor, or get a friend to help you. Don’t worry if the solder isn’t perfect.

Now go solder the other side of the resistor to pin 3 of the QRD-1114. Because the resistor is now held in place from your previous solder joint, this should be pretty easy.

If you need to, go back and re-solder the first side of the resistor, positioning it so that it is close to the surface of the craft stick, as mentioned above.

Check to be sure the QRD-1114 is still mounted flush to the underside of the craft stick. Adjust the two solder joints if needed to be sure the QRD-1114 is in place.

Cut off the leads from the QRD-1114 and the resistor at pin 3 only. Leave the leads of the QRD-1114 pin 1, 2 and 4 alone for now.

NOTE: If you want to use the optional 10k ohm pull-down resistor, this would be a good time to install it. Solder the resistor across pin 2 and pin 4 of the QRD-1114, so that the 10k ohm resistor is sitting diagonally across the resistor you already installed between pin 1 and pin 3. Then cut the excess leads from the 10k ohm resistor, leaving the excess lead from the QRD-1114 pin 2 and pin 4 in place for now. Be careful not to short any of the QRD-1114 pins.


STEP 9: Test your motors

You need to know which way your motors will turn when you connect power to them. So we are going to test them.

Insert the two AA batteries into the battery holder.

Start with the right motor, which is mounted behind the dowel with its shaft behind the right bearing.

Looked at from the right side, the bearing needs to turn clockwise for the SpurtBot to move forward. Since the motor will be attached to the bearing directly using a band, the right wheel motor also needs to turn clockwise.

 

Temporarily attach the black wire from the battery holder to one lead of the motor and the red lead from the battery holder to the other lead of the motor. Note which way it is spinning when viewed from the right side of the robot.

If it is spinning clockwise, mark the motor lead attached to the red wire with a ‘+’ and the motor lead attached to the black wire with a ‘-’.

If the motor is turning counter-clockwise, then you need to reverse the markings. Mark the motor lead attached to the red wire with a ‘-’, and mark the motor lead attached to the black wire with a ‘+’.

Now test the left motor. Repeat the above procedure, making sure the motor will turn counter-clockwise when viewed from the left side when you attach the battery leads.

Take your time with this step. As they say in carpentry, “Measure twice, cut once.”

 

STEP 10: Connect the red wires

Carefully strip about ¼ inch of insulation from one end of the red wire. Pinch the exposed conductors at the end of the wire between your thumb and forefinger, and twist the wire several times. This will help keep the individual conductors together while you work with them.

In the following steps, I will refer to this technique as ‘twisting the leads’. You’ll use this technique whenever you strip some insulation from the wire.

Next, use a clamp or other method to hold the exposed end of the red wire above your work surface, and tin the lead with your soldering iron. Use the smallest amount of solder you can. If you do not know how to tin your leads, look it up on the Internet or ask for help.

Now take the tinned end of the wire, and bend a little hook in it with the needle nose pliers.

 

Wrap the hook of wire around pin 1 of the QRD-1114, and solder it in place. Be sure that the resistor is still soldered properly to pin 1 too.

You may now cut the extra leads of the resistor and QRD-1114 from pin 1 only. Leave the leads of the QRD-1114 pin 2 and 4 alone for now.

 

Route the red wire back along the body of the SpurtBot toward the left motor. Avoid covering any of the holes or markings for the bc337 transistor.

Check the length you need to reach the ‘+’ lead of the left motor. Leave an extra ¼ inch and then cut the red wire. Strip about 1/8 inch from the end of the red wire, and ‘twist the leads’.

Insert the twisted end of the red wire through the left motor contact for the ‘+’ lead, but don’t solder it yet

Now take the remaining piece of red wire that you cut off earlier. Strip about 1/8 inch from the end and twist the leads.

Take the twisted end of this red wire and insert it into the same left motor ‘+’ lead as the other wire. It may be a tight fit. Get creative, but be sure you will have good electrical contact. Now solder both red wires to the left motor ‘+’ lead.

 

Check your solder joint carefully. Be sure both wires are firmly connected.

Now route the free end of the red wire between the two motors, towards the ‘+’ lead of the right motor. Once again, cut the wire about ¼ inch longer than the length needed to reach the contact. Then strip 1/8 inch from the end of the wire, and twist the leads.

Insert the twisted end of the red wire through the ‘+’ contact of the right motor, but don’t solder it yet.

Cut a 3 inch piece of red wire from what you have left. Strip both sides and twist the leads.

Now insert one end of this red wire into the same ‘+’ contact of the right motor, where you have already inserted the red wire coming from the left motor. Again, it may be a tight fit.

Solder both leads firmly in place.

 

Use your soldering iron to tin the end of the red wire. Then use the needle nose pliers to bend a hook in the end of the wire.

 

STEP 11: Install the bc337 transistor

It’s time to install the transistor. Insert the transistor from the top of the SprutBot. Be sure to align the body of the transistors as it is marked. The flat side of the transistor should be facing the front of the SpurtBot.

The center pin should be in the hole marked ‘b’; this is the base of the transistor. The right pin should be in the hole marked ‘c’; this is the collector. The left pin should be in the hole marked ‘e’; this is the emitter.

Be sure to leave a little of the transistor leads showing at the top side of the SpurtBot. You will need to solder to the emitter lead from the top.
 

Turn the SpurtBot upside down, and bend the left and right leads of the bc337 transistor outward. This will help keep the transistor in place. Leave the center lead of the transistor (the base) standing straight.

 

Now, take the lead from pin 2 of the QRD-1114 and wrap it underneath the SpurtBot. Use the needle nose pliers to carefully route the lead so that it touches the base (center pin) of the transistor. Keep the lead as close to the underside of the SpurtBot as you can.

Be very careful that the base lead and the QRD-1114 pin 2 lead only touch each other and nothing else.

Next, solder the QRD-1114 pin 2 to the base of the transistor. Double check that you have a good connection, and that those two leads are not touching anything else.

Then cut the extra lead off the base of the transistor. It is important that none of the leads from the transistor end up longer than the body of the QRD-1114, or they will drag when the SpurtBot drives.

Turn the SpurtBot back over right side up. Bend the lead from the QRD-1114 pin 4 back along the body of the SpurtBot towards the emitter lead of the bc337 transistor. Use the needle nose pliers to position the QRD-1114 pin 4 lead against the emitter of the transistor.

 

Be very careful that the pin 4 lead of the QRD-1114 is touching the lead of the emitter and nothing else.

Carefully solder the pin 4 lead of the QRD-1114 to the emitter of the transistor. Double check that you have a good connection, and that those two leads are not touching anything else. It is easy to accidently short against the base of the transistor.

Trim the extra wire from the lead of the QRD-1114.

 

STEP 12: Connect the white wire

Strip about ¼ inch from the end of the white wire. Twist the leads. Then tin the leads with your soldering iron using as little solder as possible.

Bend a little hook in the tinned end of the wire using the needle nose pliers.

Now turn the SpurtBot upside down, and connect the hooked end of the white wire to the collector lead of the transistor. It is helpful to use the needle nose pliers to clamp the little hook shut onto the lead of the collector so it will stay in place while you work with it.

Be very careful that the white wire and the collector lead are not touching any other connections. 

Next, solder the white wire to the collector. Double check your connection.

 

Cut off the extra lead from the end of the collector.

Now route the white wire along the underside of the SpurtBot, towards the right motor. The wire will cross the body of the SpurtBot to come up near the ‘-’ lead of the right motor.

Cut the white wire about ¼ inch past the length it needs to reach the ‘-’ contact of the right motor. Strip about 1/8 inch of insulation from the end of the white wire, and twist the leads.

Insert the stripped and twisted end of the white wire into the ‘-’ contact of the right motor and solder it in place.

 

Press the white wire against the underside of the SpurtBot so it is flush. Hold it in place with a dab or two of hot glue.

 

STEP 13: Connect the black wire

Strip about 1/8 inch of insulation from the end of the black wire. Twist the leads. Tin the end with as little solder as possible.

Use the needle nose pliers to bend a little hook into the tinned end of the black wire.

Now turn the SpurtBot upside down, and connect the hooked end of the black wire to the emitter lead of the transistor. It is helpful to use the needle nose pliers to clamp the little hook shut onto the lead of the emitter so it will stay in place while you work with it.

Be very careful that the black wire and the emitter lead are not touching any other connections. 

Next, solder the black wire to the emitter. Double check your connection.

Cut off the extra lead from the end of the emitter.

Now route the black wire along the underside of the SpurtBot, towards the left motor. The wire will cross the body of the SpurtBot to come up near the ‘-’ lead of the left motor.

Cut the black wire about ¼ inch past the length it needs to reach the ‘-’ contact of the left motor. Strip about 1/8 inch of insulation from the end of the black wire, and twist the leads.

 

Insert the stripped and twisted end of the black wire into the ‘-’ contact of the left motor, but don’t solder it yet.

Remove the batteries from the battery holder. Strip and twist the end of the wires if they are not already so prepared.

Insert the black lead from the battery holder into the same left motor ‘-’ contact as you previously inserted the black wire from the transistor emitter. Once again, this may be a tight fit.

 

Solder both black wires to the ‘-’ contact of the left motor. Be sure you have a good connection to both wires.

Press the black wire leading to the transistor emitter against the underside of the SpurtBot so it is flush. Hold it in place with a dab or two of hot glue.

Route the black wire leading to the battery holder between the two motors.

If the red lead of the battery holder is not already stripped, twisted and tinned, do so now. Use the needle nose pliers to put a little hook in the end of the wire. You will use this hook and the hook on the end of the other red wire to connect the battery to the SpurtBot.

 

STEP 14: Quick motor test

We are getting close now. Time for a quick test to be sure we’ve got it all right so far.

Insert the two AA batteries into the motor case. Take the SpurtBot to a location with good lighting and have something with a bright white and dark black surface to test against.

Connect the hooked red wire from the battery holder to the hooked red wire coming from the ‘+’ contact of the right motor. The left motor should start to spin counter-clockwise when viewed from the left side of the SpurtBot.

Note that the wheels themselves will not spin, because we haven’t connected the traction bands yet. You can feel which way the motor is spinning by touching the shaft with your finger.

The right motor may not be spinning, which is fine. Place the SpurtBot on a bright white, well-lit surface. The right motor should now spin clockwise as viewed from the right side of the SpurtBot.

Place the SpurtBot on a black surface. The right motor should immediately stop spinning, while the left motor continues to spin.

If all works as described above, great! Move on to the next step.

If there’s a problem, check everything and test again.

 

STEP 15: Attach the battery holder

Now you can hot glue the battery holder to the top of the motors. Make sure to place the battery holder with the wires to the rear of the SpurtBot.

 

Place the battery holder as far forward as you can. This will keep the weight to the front of the SpurtBot, so the sensor maintains contact with the surface that it drives on. The battery holder should be balanced left to right along the central axis of the SpurtBot.

 

STEP 16: Cut the traction bands

Using a pair of sharp scissors, cut the ridged edge from the neck of the balloon.
Now cut two bands from the end of the neck, about the width of the bearings. Try to keep the cuts nice and straight.

 

You can fit the traction band onto the left bearing and motor shaft now. Start by stretching one band over the bearing on the opposite side from the motor shaft. Extend the band around the motor shaft.

Now carefully rotate the bearing. The band should tend to align itself onto the bearing and motor shaft.

 

STEP 17: Thicken the right motor shaft

The right wheel needs to spin faster than the left when it is running. Because there is a small voltage drop across the transistor, the voltage applied to the right motor will always be a bit less than the left, which is connected directly to the battery.

However, by thickening the right motor’s shaft, we change the ratio of the diameters of the bearing and the shaft. Effectively, you are changing the gear ratio. This will make the right motor spin faster. It will also have a little less torque, but it will be enough to move the SpurtBot, so that is OK.

 

Find the smallest size shrink wrap tube you can fit over the right motor shaft. Measure a length that is just a tiny bit shorter than the length of the motor shaft, and cut the tubing with a pair of sharp scissors. Make your cut nice and square.

Place the cut tubing over the end of the right motor shaft.

Now you are going to use a lighter or other heat source to shrink the tubing. You should be very careful not to burn yourself, or to melt any parts of the Spurtbot.

Bend all wires out of the way. Think about where the flame of the lighter will go, and be careful not to melt the battery holder, bearing or anything except the shrink tubing.

 

Hold the SpurtBot in one hand, and apply the flame from the lighter briefly to the shrink tubing. It is better to apply the heat for a short time, and then go back a few times than it is to keep it on a long time.

Allow the shrink tubing to cool, then rotate the shaft 180 degrees and apply heat again. You should now have a nice tight fit.

 

Now find the smallest size shrink tubing that will fit over the last layer of tubing. Cut it to size and shrink it as before. You will need 3-4 layers of tubing. You may be able to use the same size tubing more than once, depending on how much it shrinks. Check for the right size each time.

It is a good idea to test the SpurtBot once you have 3 layers of shrink tubing. You can always put another layer on later if you need it, but they are difficult to remove.

 

Once you have 3 layers on the shaft of the motor and the shrink tubing is cool, you can install the traction band the same way you did for the left motor. Then got to the next step and test the SpurtBot. If it doesn’t turn right fast enough and stay close to the line, add another layer.

 

STEP 18: Testing your SpurtBot

Use a bright white surface with black electrical tape to make lines in a closed loop shape. You may need 2-3 widths of black tape to give your SpurtBot enough time to react to the sensor.

Start by testing inside the l. Set the SpurtBot inside the circle so that it will move around the loop in a clockwise direction. When the sensor is on the black, the right motor will stop, and the SpurtBot will turn to the right. Now the sensor will cross over to the white background, and the right motor will spin faster than the left, turning the SpurtBot back towards the black line.

It should follow the line pretty closely, but may cut some tight corners.

Now place the SpurtBot on the outside edge of the black loop, facing so it will go around counter-clockwise. Once again, when the sensor is on the black, the right motor turns off and the SpurtBot begins to turn away from the loop. As soon as it hits the white background the right motor spins faster than the left, and the SpurtBot should turn back towards the line. If it follows the line pretty closely, all is well. If it doesn’t turn quite fast enough, try going back to Step 17 and adding one more layer of shrink tubing.

As you add layers, the right motor spins faster, but you are also reducing torque. If you add too many layers, the right motor may not have enough torque to move the SpurtBot.

Have fun!

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Yes, I think so. Check out the datasheet.

You want to keep the forward current (If) through the IR LED less than the absolute max of 50 mA (way less). Maybe aim for about 25-30 mA to be safe. To calculate the resistor you need, look in the datasheet for the forward voltage (Vf) of the diode. Substract that voltage from the supply voltage from your battery. That will be the voltage across your current limiting resistor. Use Ohm's Law to select a value for the resistor that will keep the LED from blowing up. 

Be sure to observe the pinout for this chip, as it may be different than for the QRD-1114 or the CNY70. If you connect voltage across the LED without a resistor, it will go 'poof' and you will have a dead LED.

Also note in the datasheet the sensing distance (L). When placing your sensor on the robot, try to maximize the reflective light current by placing the sensor a distance above the ground that has the best refective current.

Good luck. Let me know how it goes with this sensor. I've never used it before.

 

hey  i already build my version of spurtbot using cny70 i use 39 ohms is it ok??? the left motor is running but the right motor is not running even if i put in a white or black environment but still no reaction in right motor :( can you help me out ASAP please reply ASAP tnx

To answer your first question, read this post on choosing the right resistor for an LED. As I have said, keep the current through the LED well below the absolute maximum.

If the right motor (the one controlled by the sensor) doesn't respond, there are a few things that could be wrong.

Double check your connections to the CNY70. Be sure you have it connected correctly.

If you ever applied power (even for a moment) across the LED without the current limiting LED, you probably blew the LED, and your sensor is dead. If you have a digital camera, you can look at your sensor while it is powered up, and you should be able to see a blue glow from the LED. This is because the camera can see IR light, even though your eye cannot. This is a simple way to test if your LED is working still.

thanks to that  helpful info  i now know what resistance i can use in cny70 but can you help me to determine the pins of cny70 the data sheet is so hard to understand on how determine where to find the pin designation??? unlike the qrd114 the pin1 has an indicator/marker so it is easier to find the pins designation but in th data sheet of cny70 there is no marker or indicator where to find the pin1  etc.! plss help ^^ thanks in advance

 

Yeah, the marking on the CNY70 is less clear than the QRD1114. If you look carefully at the datasheet, you can see that one side of the CNY70 is labeled 'Marking area'. From that you can tell which pin in which.

if  i use a cny70 reflective sensor does it has the same pin connection or the pin connections of qrd1114 and cny70 are different??does it have the same designation of connection in their pins??? or not??

 

My answer is, read the datasheets for both components, and determine the answer for yourself.

You will learn much more that way than if I tell you.

 

if  i use a cny70 reflective sensor does it has the same pin connection or the pin connections of qrd1114 and cny70 are different??does it have the same designation of connection in their pins??? or not??

do you have a link to where i can get the parts? mainly the transistor and the senser?

 

I have added links in the post to where I got most of the parts and materials. Mostly from Jameco and Amazon. Your sources may vary.