![]() |
![]() |
![]() |
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
![]() Robotics Projects: ![]() Electronics Projects: ![]() ![]() |
![]() |
![]() |
Basic Stamp Sonar![]()
![]() Note: This circuit requires the Basic Stamp 2, and 3 I/O ports of that Basic Stamp. This project is best suited for use as a sensor on a robot. This circuit will actually allow you to measure distances from an object. It measures in a 'unit' and it's range is about 10 inches. As the receiver and transmitter, you will use an ultrasonic transmitter and receiver pair tuned to 40khz (see parts list below.) The circuit is very easy to build, and you can build it on whatever you have laying around. I assembled it onto a Radio Shack pre-etched circuit board - and it only took up about an inch and a half square.
The schematics are below. Make sure you connect everything correctly, then after that is done move onto the basic stamp code below. ![]() ![]() ![]() Basic Stamp Code: What will it do? It will open a debug window in the basic stamp compiller, and display distance readings (in 'units') from the circuit. Please note that the 'Free Stamp Pin' in the schematics refer to the basic stamp i/o port that you connect that part of the circuit to. You will need to look out for the the three (!!!! FREE STAMP PIN ' ' !!!!)'s in the code, and change the X's that accompany them to the correct i/o port number. Download the source code by 1.) Right-click on the link and select 'Save Target As..' (Windows) 2.) Click on the link, and hold it until a menu pops up, and select 'Save Target As...' (Mac) bs2sonar.txt OR bs2sonar.bs2 Refer to the SmallBot Programs page to see how to implement this circuit as an ultrasonic sensor for your robot. |
![]() |
| ||||||||||||||||||||||||||||||||||||||||||||||
![]() |