Skip to content
Dec 10 09

A Cold Day in the Lab – Rover Test #6

by Puck

Last night we tried our first Rover turn based on the basic algorithms I presented earlier.

Instead of the smooth and precise turn we hoped for, the Rover sat there and sort of shivered in place.  I admit that December is cold and perhaps the carpet could be heated for him, but I hadn’t expected him to refuse to perform.

Test #6 – The Turn Failure

(You will have to watch closely to see it try the turn.)

Back to the Code

As I stated earlier in the blog, engineering isn’t about always having the right answer.  It’s the process by which we get there.  Larry and I have a few ideas we will see if we can solve it.

I also can’t help but admit that the rover looks pretty cute sitting there shivering on the carpet like an unhappy puppy.

Dec 9 09

New Test Video on Larry’s Blog

by Puck

This is just a quick note to point you to Test video #5 on Larry’s blog.

Links to all the Articles with Rover Videos:

Dec 9 09

To every Rover turn… turn… turn…

by Puck

Now that we have achieved basic locomotion we are interested in adding directional control.  To explain how we’re going to do this, it would be useful to look at how we have numbered our motors.

Motors labeled as 1, 2, 3, and 4.

Motors labeled as 1, 2, 3, and 4.

I have created a simplified diagram of the motors for discussion.

Rover Motor Diagram

Motors 1 & 2 shown at the Rover's front with 3 & 4 at the rear.

There are two types of turns we need.

Stationary Turns

Stationary turns have the advantage of being more precise but could be less useful for chasing something down.  Because each tire has independent control we can do things your car couldn’t.  In this case we can have the tires on one side turn forward while the other side spins backward.  This should allow the rover to spin in place which means he will be able to parallel park more easily than a even a Toyota Prius.

By spinning the tires in different directions, we can turn in place. While I have used 100% as the motor speed, I could also turn more slowly by reducing the speed of all the motors equally.

Moving Turns

We don’t have a steering column we can use to change the direction of the wheels, but by varying the speed of each tire, we can create moving turns by rotating the tires on one side faster.

The Rover can turn while moving by spinning tires on one side faster.Again, we can vary the percentages to create sharper or more gradual turns.  For very tight moving turns we could leave the tires on one side stationary while the others drive the rover through a tighter moving turn.

More Tests?

In our next series of test we are going to try to quantify how many pulses on each motor are required for the following stationary turns:

  • 45 degrees off center
  • 90 degrees off center
  • 135 degrees off center
  • 180 degrees off center  (turn backwards)
  • 225 degrees off center
  • 270 degrees off center
  • 315 degrees off center
  • 360 degree turn (turn completely around back to start)

Because we used a series of pulses to drive the motors we can use them to count with a good degree of accuracy.  That means once we have a good pulse count, we can be reasonable certain our rover will turn in the direction we want with good precision.

Dec 8 09

The Rover Moves…

by Puck

As promised we achieved several successful Rover tests today.  (You can also view the video of our first test in this earlier blog post.)

Before I get to the videos, I have a couple of observations.

Wiring up the Rover to the Motor Control Board

Wiring up the Rover to the Motor Control Board

Motors mounted on opposite sides should rotate in different directions

It turns out that when you have motors mounted on either side of the device, you need to spin the motors on one side clockwise and the ones on the other side counterclockwise in order to move forward.  We immediately noticed this in our bench test and solved the issue by reversing the polarity of the wiring for one side of the device.  Now the move forward command actually goes forward instead of sending the rover in circles.

This is also why bench tests are a good thing. :-D

Note the reversed polarity for motors 2 and 4.

Note the reversed polarity for motors 2 and 4.

Current Spike associated with the Motors

Looking at the readout on our bench power supply the motors can pull up to 1 amp when kicking on initially before stabilizing at a lower current draw.  That is not completely unexpected since the coils inside a motor don’t like voltage changes, but it is something you have to account for.

The Rover Tries out his New Wheels

The Rover Demonstrates Direction Changing

Rover’s Baby Steps

Dec 8 09

Soldering the Motor Control Board

by Puck

Yesterday we soldered the components to the motor control board and it creates an opportunity to discuss soldering technique a bit here.

Larry prepares to solder the components to the PCB

Larry prepares to solder the components to the PCB

Advice on Soldering

First, soldering irons are hot and should be used with caution.  In addition, the fumes released while soldering are toxic and you should only solder in a well-ventilated space.  (My personal advice is to exhale when I applying the iron to the solder to ensure you are not inhaling the fumes.)

Keep a wet sponge nearby for occasional cleaning of your iron.

Also, no matter how tempting it might sound, don’t lick the soldering iron.

;-)

Working with Surface Mount Parts

Surface mount parts aren’t easy to solder and require practice before you become proficient.  For best results, you should consider working with a lit magnifying device and using a small diameter solder with a fine-tipped soldering iron.   If you need to solder to a larger surface like the ground plane, you can switch to a larger iron tip which will carry more heat with its larger surface area.

Working with Surface Mount parts

Working with Surface Mount parts

Surface Mount parts can be very small!

Surface Mount parts can be very small!

Tin one Pad

Soldering requires one hand to hold the part and one hand to hold the iron.  The challenge is how to apply solder at the same time.  Rather than spontaneously mutate a third hand, you can avoid this problem by applying solder to the pad before placing the part.

Another advantage is that having solder ready on the pad reduces the amount of time your component is exposed to heat. Sensitive parts might be damaged if they pick up too much heat from the iron and in some cases you may need to use a heat sink when you place the part. It is often better to use a hotter iron that can place the part quickly instead of  a slow iron that may expose the component to heat for more time as you try to tack it down.

Apply some heat to the pad and apply solder as shown here.

Before placing the diode, Larry adds solder to the pad

Before placing the diode, Larry adds solder to one pad.

You only want to tin one pad so that you can easily slide the part into place.  If you tin both pads for the part, your component will rest on the other bump of solder at an angle and won’t sit straight.  When you tack down the other side, pushing it down into place will create stress on your first solder joint which could be a point of failure.

Your goal is a shiny and rounded blob of solder that fills the pad without spilling over the edges.  Surface mount parts can be notorious for creating short circuits if you get too exuberant with the solder, especially between the tiny pins on a chip.  Likewise, if your solder is dull gray this could indicate a cold solder joint which may cause your board to fail later.

Both pads for the diode have solder awaiting the part.

Larry has tinned two pads for two different diodes. The solder forms a shiny bump that covers the pad without spilling over. Note that the second pad will be soldered after the part is in place.

Push the Part into Place

Apply heat to liquefy the solder on one pad and push the part into place with tweezers using your other hand.  Tweezers help you to get a grip on the small component and also keep your fingers away from the hot iron.

With the pad heated and ready, Larry pushes the part into place with tweezers.

With the pad heated and ready, Larry pushes the part into place with tweezers.

Before you attach the other side of the component, take a moment to be certain that the part is placed correctly.

  • Is it straight?
  • Is it correctly aligned so that it isn’t backwards? In some cases, a part placed with the wrong polarity can explode so it is best to be certain you have placed it correctly before tacking down both sides.

Tip on Removing Surface Mount Parts!

If you do solder down both sides and then find you need to remove the part later, it can be difficult.  First, use solder-wick to remove as much solder as possible.  While there are specially built irons for removing parts if you haven’t got one, my advice is to use an iron in each hand similar to the way you might use chopsticks.  Heat both pads simultaneously and when the part loosens, slide it from the pad applying just enough pressure with each iron to move the component.

Check it off your List

When you have correctly placed the part, you should check it off of your Bill of Materials.  This ensures that you don’t forget to place a critical component.

After placing the diode, Larry checks it off his list.

After placing a diode, Larry checks it off his list.

Other Advice

Silkscreening

We added a printed silk screen to our circuit board because other engineers and customers might view it.  However, silkscreening isn’t free and while the cost of our two custom circuit boards was about $93 total, the silkscreen printing cost $28 which makes it almost 1/3 of the total board cost.  If you don’t need the silkscreen, you might consider omitting it as a cost saving measure when prototyping.

The silkscreen was almost 1/3 of the total cost.

The silkscreen was almost 1/3 of the total cost.

Testing the Board

You can see our voltage regulators in the picture below.  The power circuits were the first thing we installed and before we applied any power to the board, we used an Ohm-meter to test the circuit.  Only after we checked it did we apply power.   After verifying that the power supply was working correctly, we then added the other parts to the board.

Build out and test the power circuit first.

Build out and test the power circuit first.

Pictures of the Completed Board

When the board was laid out, Larry placed mounting holes and a header on the circuit board so that it would plug directly into the MiniCore prototyping board.  He also made certain that the screw terminals would extend beyond the body of the MiniCore’s board for easy access with a screwdriver.

The assembled board.

The assembled board.

I can reach the screw terminals!

I can reach the screw terminals!

There is a good clearnace margin between the two devices.

There is a good clearance margin between the two devices.

The power supply circuit on the motor control board supplies 5 volts to the MiniCore with this plug.

The power supply circuit on the motor control board supplies 5 volts to the MiniCore with this plug.

This is a nice close up view of the board.  You can see the 4 H-bridges and the buffer chip.  (The pad for the ZigBee modem is unpopulated on the right.)

This is a nice close up view of the board. You can see the 4 H-bridges and the buffer chip. (The pad for the ZigBee modem is unpopulated on the right.)

That's a successful square wave on the O-scope.

That's a successful square wave on the O-scope.