open source qr code reader vb.net THE DISTANCE COUNTER in Software

Generator Data Matrix in Software THE DISTANCE COUNTER

THE DISTANCE COUNTER
Recognize ECC200 In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Print DataMatrix In None
Using Barcode drawer for Software Control to generate, create Data Matrix image in Software applications.
The pulses from a shaft encoder do not in themselves carry distance measurement. The pulses must be counted and the count converted to distance. Counting and conversion are ideal tasks for a computer. Most single-chip computers and microprocessors, or their interface adapters, are equipped with counters. If your robot lacks a computer or microprocessor with a timer, you can add one using a 4040 12-stage binary ripple counter (see Fig. 18.17). This CMOS chip has 12 binary weighted outputs and can count to 4096. You d probably use just the first eight outputs to count to 256. Any counter with a binary or BCD output can be used with a 7485 magnitude comparator. A pinout of this versatile chip is shown in Fig. 18.18 and a basic hookup diagram in Fig. 18.19. In operation, the chip will compare the binary weighted number at its A and B inputs. One of the three LEDs will then light up, depending on the result of the difference between the two numbers. In a practical circuit, you d replace the DIP switches (in the dotted box) with a computer port. You can cascade comparators to count to just about any number. If counting in BCD, three packages can be used to count to 999, which should be enough for most distance
Read Data Matrix 2d Barcode In None
Using Barcode scanner for Software Control to read, scan read, scan image in Software applications.
Create Data Matrix In C#.NET
Using Barcode drawer for .NET framework Control to generate, create DataMatrix image in Visual Studio .NET applications.
+5VDC 16 VCC From encoding/ conditioning circuitry 10 CLOCK
Create Data Matrix ECC200 In .NET Framework
Using Barcode printer for ASP.NET Control to generate, create Data Matrix 2d barcode image in ASP.NET applications.
Data Matrix ECC200 Creator In VS .NET
Using Barcode encoder for VS .NET Control to generate, create Data Matrix image in VS .NET applications.
9 7 6 5
Creating ECC200 In VB.NET
Using Barcode encoder for .NET framework Control to generate, create Data Matrix image in VS .NET applications.
USS Code 39 Drawer In None
Using Barcode creation for Software Control to generate, create USS Code 39 image in Software applications.
3 2 4 13 MSB
UCC - 12 Encoder In None
Using Barcode printer for Software Control to generate, create EAN / UCC - 14 image in Software applications.
Code 128 Code Set C Drawer In None
Using Barcode creator for Software Control to generate, create Code 128 Code Set A image in Software applications.
Binary weighted output (first eight bits)
Printing UPC-A Supplement 5 In None
Using Barcode generation for Software Control to generate, create UPC-A image in Software applications.
Making Bar Code In None
Using Barcode generator for Software Control to generate, create bar code image in Software applications.
RESET GND 8
Code 11 Encoder In None
Using Barcode printer for Software Control to generate, create USD8 image in Software applications.
Draw EAN-13 Supplement 5 In None
Using Barcode creator for Online Control to generate, create EAN / UCC - 13 image in Online applications.
FIGURE 18.17 The basic wiring diagram of the 4040 CMOS 12-stage ripple counter IC.
UCC-128 Generation In Java
Using Barcode generator for BIRT reports Control to generate, create UCC - 12 image in BIRT reports applications.
EAN / UCC - 13 Drawer In Java
Using Barcode encoder for Java Control to generate, create USS-128 image in Java applications.
272 WORKING WITH DC MOTORS
Read Bar Code In Java
Using Barcode Control SDK for Eclipse BIRT Control to generate, create, read, scan barcode image in BIRT reports applications.
Paint Data Matrix ECC200 In .NET
Using Barcode generation for Reporting Service Control to generate, create Data Matrix 2d barcode image in Reporting Service applications.
Date input
Code 39 Extended Scanner In Java
Using Barcode recognizer for Java Control to read, scan read, scan image in Java applications.
Paint Data Matrix 2d Barcode In C#.NET
Using Barcode creation for .NET framework Control to generate, create Data Matrix image in Visual Studio .NET applications.
B3 A<B
1 2 3 4 5 6 7 8
16 VCC 15 A3 14 B2 13 A2
Cascade inputs
A=B A>B A>B
12 A1 11 B1 10 A0 9 B0
Data outputs
Outputs
A=B A<B GND
FIGURE 18.18 Pinout diagram of the 7485 magnitude comparator IC.
+5vdc
D From decoder C B A Set switch D C B A
15 13 12 10 A
16 VCC R1-R3 330 A>B 5 To control circuit
A=B 1 14 11 9 GND 8 B A<B
FIGURE 18.19 The basic wiring diagram of a single-state magnitude comparator circuit.
ODOMETRY: MEASURING DISTANCE OF TRAVEL 273
recording purposes. Using a disc with 25 slots in it and a 7-inch drive wheel, the travel resolution is 0.84 linear inches. Therefore, the counter system will stop the robot within 0.84 inches of the desired distance (allowing for coasting and slip between the wheels and ground) up to a maximum working range of 69.93 feet. You can increase the distance by building a counter with more BCD stages or decreasing the number of slots in the encoder disc.
MAKING THE SHAFT ENCODER
By far, the hardest part about odometry is making or adapting the shaft encoders. (You can also buy shaft encoders ready-made.) The shaft encoder you make may not have the fine resolution of a commercially made disc, which often have 256 or 360 slots in them, but the home-made versions will be more than adequate. You may even be able to find already machined parts that closely fit the bill, such as the encoder wheels in a discarded mouse (the computer kind, not the live rodent kind). Fig. 18.20 shows the encoder wheels from a surplus $5 mouse. The mouse contains two encoders, one for each wheel of the robot. You can also make your own shaft encoder by taking a 1- to 2-inch disc of plastic or metal and drilling holes in it. Remember that the disc material must be opaque to infrared light. Some things that may look opaque to you may actually pass infrared light.
FIGURE 18.20 The typical PC mouse contains two shaft encoder discs. They are about perfect for the average small-or-medium-size robot.
274 WORKING WITH DC MOTORS
When in doubt, add a coat or two of flat black or dark blue paint. That should block stray infrared light from reaching the phototransistor. Mark the disc for at least 20 holes, with a minimum size of about 1/16 inch. The more holes the better. Use a compass to scribe an exact circle for drilling. The infrared light will only pass through holes that are on this scribe line.
MOUNTING THE HARDWARE
Secure the shaft encoder to the shaft of the drive motor or wheel. Using brackets, attach the LED so that it fits snugly on the back side of the disc. You can bend the lead of the LED a bit to line it up with the holes. Do the same for the phototransistor. You must mask the phototransistor so it doesn t pick up stray light or reflected light from the LED, as shown in Fig. 18.21. You can increase the effectiveness of the phototransistor placing an infrared filter (a dark red filter will do in a pinch) between the lens of the phototransistor and the disc. You can also use the type of phototransistor that has its own built-in infrared filter. If you find that the circuit isn t sensitive enough, check whether stray light is hitting the phototransistor. Baffle it with a piece of black construction paper if necessary. Or, if you prefer, you can use a striped disc of alternating white and black spokes as well as a reflectance IR emitter and detector. Reflectance discs are best used when you can control or limit the amount of ambient light that falls on the detector.
Copyright © OnBarcode.com . All rights reserved.