Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Electronics_Projects_For_Dummies

.pdf
Скачиваний:
37
Добавлен:
10.06.2015
Размер:
17.71 Mб
Скачать

270 Part III: Let There Be Light

Figure 11-34:

Mark the base for cutting and drilling.

4.Cut the sheet along the lines you drew (a hacksaw or any fine-toothed saw should do the job), and then use a 14" bit to drill a hole where you marked the feed-through hole in Step 2.

5.Use a 18" bit to drill the holes used to attach the castor.

Use sandpaper or a file to smooth any rough edges. Figure 11-35 shows the base after it’s been cut and drilled.

Figure 11-35:

The base for the kart, all sawed, drilled, and sanded.

Chapter 11: Controlling a Go-Kart, Infrared Style 271

6.Attach Velcro to the battery packs, motors, and switch, as shown in Figure 11-36.

Figure 11-36:

Attach Velcro to the various components.

7.Solder 12" wires to the motors, as shown in Figure 11-37.

By using different wire colors (we used red and black), it’s easier to identify which goes to each pin in the terminal blocks on the breadboard so you can control which direction the motors turn.

272 Part III: Let There Be Light

Figure 11-37:

Solder wires to the motors.

Black wire

Red wire

8.Stick some Velcro to the base of the kart where the motors will be attached and then attach the motors; see Figure 11-38.

Figure 11-38:

Attach the motors and castor.

Chapter 11: Controlling a Go-Kart, Infrared Style 273

9.Attach the castor, using 58" 6-32 screws and nuts, also shown in Figure 11-38.

10.Feed the wires through the 14" hole and secure the wires with the wire clips (as shown in Figure 11-38); then slip the wheels on the motor shafts and secure the wheels with the screw provided.

11.Stick Velcro to the base of the kart and attach the battery packs, switches, and breadboard to the top of the base, as shown in Figure 11-39.

Figure 11-39:

Attach various parts to the kart.

12.Attach wires from the motors to the terminal blocks, as shown in Figure 11-40.

274 Part III: Let There Be Light

Red wire from motor R Red wire from motor L

Figure 11-40:

Wire the motors onto the

breadboard.

Black wire from motor R Black wire from motor L

13.Attach wires from the battery packs to the terminal blocks and power switch, as shown in Figure 11-41, and solder the wires attached to the power switch lugs.

Figure 11-41:

Wire the power onto the breadboard.

Black wire from battery pack to power switch

Chapter 11: Controlling a Go-Kart, Infrared Style 275

Red wire

Red wire

from battery pack

from battery pack

Black wire

Black wire

from power switch

from battery pack

14.With a mini hacksaw, cut openings in the back of the plastic kart top.

One opening will allow the IR detector to peek out and detect a signal; the other opening is for the power switch in the side.

Make sure you’re using a top made of flexible plastic so it cuts easily. Wear safety glasses in case a piece flies off while you’re cutting.

15.Rest the bubble on the kart, as shown in Figure 11-42.

276 Part III: Let There Be Light

Figure 11-42:

The final product: an infrared go-kart!

Trying It Out

Here’s the payoff to all your hard work: You finally get to see the little kart zoom around your living room. Remove any obstacles before you start!

Follow these steps to operate your go-kart:

1.Slip in the batteries.

2.Turn on the power switch on the kart.

3.Point the transmitter at the kart and press and release the on/off button.

4. Watch it go!

If nothing happens, here are a few things to check out:

All the batteries are fresh, are tight in the battery pack, and face the right direction.

See whether any wires or parts have come loose.

Compare your circuit with the photos in this chapter to make sure you got all the connections right.

Chapter 11: Controlling a Go-Kart, Infrared Style 277

To turn left, press and release the motor L button; to turn right, press and release the motor R button. After the kart has turned far enough, press and release the same button again, and the kart will go forward. If you want the kart to go backward, just press and release motor button L and quickly press and release motor button R (or vise versa); ditto if the kart is moving backward and you want it to move forward.

If these buttons work opposite to the way you expect, swap the wires from the motors at the terminal blocks on the receiver.

Just like your car on a cold winter morning, the kart could take a few moments to warm up. Wait a few beats after you turn on both on/off switches, and then go for it!

If you plan on keeping the kart working long-term (rather than using the parts on another project), we suggest that you remove the Velcro from the motors and from the base (where you mounted the motors) and glue the motors to the kart base at the same spot. This will make the kart a little more stable. You can also glue the wheels onto the motor shaft to make your kart more permanent.

Taking It Further

Are you so wowed by the go-kart you want to add to it? Here are some ideas to explore:

Other encoder/decoder ICs are available that have more than the three input/output pins used here. One option is the Holtek HT12A encoder and HT12D decoder; another is Reynolds Electronics IR-DX8 encoder/ decoder. Building a kart by using one of these lets you add other things to the kart that you can control: for example, LED headlights or a buzzer to use just like a car horn.

If you want to race go-karts with a friend, you can build multiple karts with one of the other encoder/decoder pairs just mentioned. These allow you to pick an address for each kart by tying different pins to ground or +V on each of the encoder/decoder pairs. However, you still have to be careful not to activate your transmitters at the same time or point your transmitter at your buddy’s car lest you confuse the receivers. The only way around this is to use radio control instead of infrared control, and use different frequencies for each transmitter. See Chapter 18 for information about using radio control.

Spiff up the go-kart base and top any way your artistic whim dictates: Paint it, add racing stripes, use a different shape, add decals, or glue fuzzy fur and cute little ears on it.

278 Part III: Let There Be Light

Part IV

Good Vibrations

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]