Clone this wiki locally
To use the Maxbotix rangefinders with the RaspiRobotBoard, you need to use an adapter, because the Serial output of the Rangefinders is inverted.
There are two ways you can do this.
- Use the Open Source design contained in these EAGLE files:
- Build it yourself on stripboard.
The adaptor only has two components, a PNP (Note NPN will not work) transistor and a 1kΩ resistor.
Here is the schematic:
Here is the stripboard layout:
The choice of transistor is not critical as long as it is a bipolar PNP transistor, such as the 2N2907 or BC309.
If you have not used stripboard (aka protoboard or Veroboard(TM)) before it is not hard and here are some detailed instructions to help.
Step 1. Assemble the components
You will need:
- Stripboard 4 strips by 10 holes (cut from a bigger piece)
- Right-angle 0.1 inch pin header (4-way)
- 0.1 inch header socket (4 way)
- Transistor PNP - 2N2907 or BC309
- Resistor 1kΩ 0.25W (any power rating will do)
All of these parts can be found on eBay.
Step 2. Cut the board to size
Cut a piece that is 4 copper strips, each of 10 holes. Cutting with scissors tends to break the board up. I find the easiest way is to score it with a craft knife one hole bigger than you need and then break it over the ended of a table. BE CAREFUL IT CAN BE SHARP.
Step 3. Cut the tracks where needed
Using the image below as a guide, use a drill bit (just twist it between thumb and forfinger) to cut breaks in the tracks as shown below (4 cuts).
Step 4. Solder the Headers
Making sure that you have the stripboard the right way around (check the stripboard diagram above) solder the pin headers to one side and the header socket to the other.
Step 5. Solder the Link
Cut about half of one of the resistor's leads off. You can use this to make the link that must be soldered between tracks 1 and 2 on the left of the board.
Snip off the excess wire.
Step 6. Solder the Transistor
Make sure that you have the transistor with the curved part of its body to the left, towards the pin header and solder the three leads in place.
Step 7. Solder the Resistor
The resistor is soldered in vertically as shown below. It does not matter which way round the leads go.
You can now attach the rangefinder to your RaspiRobotBoard.
To test it out, see the getting started tutorial. Tutorial 01