Here is a journal/instructions for creating an electronic circuit that uses an ultrasonic range detector and connects to my serial port (RS-232). General Information I selected the Devantech SRF04 ultrasonic ranger. Daventech SRF04 ultrasonic ranger. It had more than enough accuracy for me, and the price was right. There may be better rangers out there, but I came across this and I liked it. I selected the PIC16F84 micro controller. It has more than enough power and capabilities for my project, and there is a wealth of information available for all hobbyists. Step 1: Program I wrote this program in assembly. Here is the source code. I know that it is not yet perfect, and that it's accuracy can be improved, but it was good enough for my intended application. Step 2: Schematic Step 3: Prototype the Circuit Before having a PCB made, I first wanted to build my circuit on a breadboard. This was very helpful, and allowed me to find a couple of errors. Step 4: Design and order the PCB I selected ExpressPCB. Both for the software to layout my PCB, as well as the manufacturer of my board. The software is free, and the boards are very affordable for hobbyists. Here is an image of what my PCB layout looked like: ExpressPCB Data File - Make sure to read about my errors below. Step5: Assemble the Circuit Finally I got to assemble the circuit. I made some errors which were: The two holes for the RJ11 jack were too small. I just drilled these out, so this was easy to fix. The three holes for the 7805 voltage regulator were too small, but just barely. I was able to use a pair of needle nosed pliers to force the pins in the holes. It wasn't pretty, but it worked. The pins for capacitor C7 were too close together. This is really just cosmetic. Finally I had the power reversed on the power adapter. I did a little trace cutting and blue wiring to fix this. (Darn) Note: The PCB image and data file above have been corrected, and should work. I have not ordered new boards to verify that my fixes were correct - You have now been warned. If you want to see my original layout please look here. Well there you have it. I hope somebody sees this and finds it of some use. If you detect any errors please let me know. |
Home >