View Full Version : [Question(s)] Anyone know how to make a bump sensor?

03-02-2008, 06:28 PM
I'd like to make a bump sensor for my serializer. I have a switch, but no idea how to go about making it into a sensor. I have some ideas (see below), but I'm afraid to experiment on my $120 controller!

With the pin layout of ground, +5, signal I'm not sure how to wire the switch. What constitutes a signal? Can I just put the switch between +5 and signal so that when closed the signal pin gets current? Are any other parts needed (resistors, etc.)?

Once I get the switch figured out, I believe I can read the signal state using the GETIO type commands on the serializer.

Any feedback would be much appreciated!

03-02-2008, 11:37 PM
I've never used a serializer, but have used other +5 interfaces. You can either use a push button switch...just connect one end to your +5 side, the other to the sensor input. If your input has a ground, you can use a resistor and connect between the +5 and ground through the resistor. When you press the button, the current will go through. I'll try to post a diagram later.

03-03-2008, 12:24 PM
Please see this forum post:


03-03-2008, 12:30 PM
Also, VEX has some nice premade bump sensors you can use. I'm assuming these are just switches inside: http://www.trossenrobotics.com/store/p/3118-Bumper-Switch-Kit.aspx

03-03-2008, 12:36 PM
Yep, those would probably work...You'd need some right angle brackets to mount them.

Maybe some of these brackets would work..


Best Regards!


03-03-2008, 07:56 PM
A simple snap-action switch, hinged to a spring-dampened bumper, and interfaced as a simple on-off device works well. Try to avoid making things harder than they have to be. Bumpers by their nature should be hardy and robust.

This is from a guy who still hasn't perfected this LOL

03-03-2008, 09:30 PM
Thanks for all the replies, and for the diagram on your site Jason.

I will pickup the resistor and give it a shot. Will let you know the results.

03-13-2008, 09:56 PM
Well, I've made some progress on the bumper switch issue.

After picking up the resistor that Jason recommended over on the RoboticsConnection site and not being successful I went ahead and ordered the Vex kit that Matt suggested. They came today!

Vex Bumpers
While not exactly what I was looking for in a bump sensor (they are bit bulky), I was pleased with the quality of the packaging and the included hardware. However, when I opened the package I noticed the red wire was loose and appeared to have been pulled out of the casing. At first I was a bit disappointed. They were new after all!!

Well, out came the phillips screw driver. After removing the 4 screws that hold it together I carefully opened the switch. Sure enough the red wire was not connected to anything. After examining the contact board...it seems that it was never connected. Just to be sure I opened the second switch and it too had the red wire loose. Turns out it is not in use. The switches simply make a connection between ground and signal!

Bumping the Serializer
The Vex bumpers have female connectors (meaning the prongs are out), so I had to put together another male-male extender to wire it up. At first I wasn't sure if it should go on the analog side or the digital side so I fired up HyperTerminal to play a bit. After getting nothing from playing with bumper connected to the analog side, I moved it to digital. That did the trick. I could then set the pin and get the pin and see it switch when I pressed the bumper.

Into Visual Studio I went. I started by going into the MSDN Style Documentation for the Serializer. After rummaging around a bit I found the Class GpioPin code example (under the Components section). After tweaking the code for my pinout I fired up the app and bingo...I was able to read the bumper switch closing. The only thing that I find odd is the delay in the pin state switching back after releasing the bumper. It takes a full second. I played with the UpdateFrequency method but it didn't seem to have any affect. I'll have to play with it a bit more to see if I can figure out what gives. Even still...I think I can deal with the second for now.

03-14-2008, 03:05 PM
I would like to offer a bump sensor solution.

Using a very low pressure pneumatic switch, you route a rubber tubing around the perimeter of the "protected" zone and connect the tubing to the switch and close the other end. When the tubing is bumbed it pressurizes and triggers the switch. The tubing can be hot glued into place. Or for a cleaner look, you could cut a groove into the perimeter of the protected area and partially embed the tubing for a cleaner look. The tubing also provide a small level of bumb cushion.