Polaroid Ultrasonic Driver Board
This new version was modified from the old in a few key ways. First the old board required that the host computer system be responsible for the timing of the signals. Although the original system did have some onboard timing to handle the close ranging features of the 6500 driver board, this was very simple and handled through the use of a 1-shot.
The first major change is that the new system is based around a PIC 16F877 or PIC 16C77 microcontroller. This allows the whole board to be stand alone. The microcontroller will drive, time, and interpret the times that it receives.
The second difference is that the PIC also takes the timing that it generates from the 6500, and translates it to a hex number. This number is then sent to a UART on the PIC for transmission to the host computer. With this innovation, the host computer is now completely removed from having to do any low level hardware interaction. All that is needed is to read the serial port for data, and convert the hex number to decimal. Once this is done, a simple formula is used to convert the time (the hex data is the trip time for the sound waves in milliseconds) to a distance.
Below is the schematics and PIC code to put this system together.
The first part is the power system. This circuit is simply responsible for the conversion of 12 vdc to 5 vdc. Also, this circuit has the storage capacitors for the ranging modules. The 6500 modules draw about 3 amps when they fire. Although, this is just for a brief period of time, a spike like this would reset the microcontroller. So, to prevent this from happening, a diode/cap arrangement is used to soften this spike.
The next part of the system is the hook-up of the Polaroid modules themselves. There are two of these modules in the system, although only one is shown. They are wired identically, except that the connect pins to the power and PIC are different. It doesn’t really matter which module you call 1 and which is called 2, just make sure that the right wires go to the right places.
Spec sheet for the 6500 Ranging Module
The final part of the board is the PIC and its RS-232 converter. Right now the PIC is just transmitting data. If you wish to modify the source code to read in commands, that is up to you. The wiring show has the ability to read and write RS-232, although, the read section is not used in software. The pin-outs for the serial connection to the host computer is setup for a DB-9 connection. Also, no null modem cable is needed for the connection. All of the null modem setup is done in the wiring of the PIC to the MAX232ACPE. The actual full part number of the PIC used is a PIC16F877–04/P or PIC16C77–04/P. These are both 4 MHz versions. A faster version such as the PIC16F877–20/P or the PIC16C77–20/P will work as well. The only difference is the maximum clock speed of the chip. Look closely at the code that you download to make sure that you get the right code for your chip, they are different.
Code for PIC16F877
Code for PIC16C77
Note: The source code can be compiled with the Microchip MPLAB software. Also, to burn the PIC, a programmer is needed. I used the Microchip Picstart Plus system. It can be purchased from Digikey.