Switchbox Design



Switchboxes are useful for many purposes. A switchbox is basically a box with switches and LEDs. A green LED shines when the switch is on and a red LED shines when the switch is off. There are usually many switches in a row. Additionally, each switch is connected to a Digital Input/Output (DIO) on a controller that reads "1" when the switch is on and "0" when the switch is off. This way, inputs can be passed to the robot, and the LEDs indicate the state of the switch to the driver.

Switchboxes may be connected to the Cypress FirstTouch PSoC 3 (which is connected to the operator console) or may be connected directly to the digital sidecar, setting configurations on the robot, such as for autonomous mode. Either way, the switchbox requires one DIO for each switch, a power source (VDD), and ground (VSS). Each switch requires either two LEDS or a biLED (three pins and can shine two different colors), a 1KΩ resistor (a pulldown for the LEDs), a 10KΩ resistor (a pullup for the DIO signal), and a single pole, double throw toggle switch (one common connects to one of two poles depending on its position). This list also assumes a lot of wires.

Switchboxes work well mounted inside a plastic (ABS) project box from RadioShack. If you're using it with the PSoc, you may want to find a box that can hold the PSoC inside. The top can be drilled or milled in a CNC machine.

Notice that one 1KΩ resistor is used for every two LEDs (or one biLED, if you wish). If the two LEDs are going to run simultaneously, this is bad practice and should not be done. However, since the switch will only allow one LED to run at a time, using only one resistor is safe and advisable.

The schematic at right shows a four-switch switchbox. However, it should be easy to scale to whatever size is necessary. The "+5V" doesn't need to be exactly 5 volts. The 3.3 volts on the PSoC or the 6 volts on the sidecar should work fine. However, you may want to scale the pulldown resistors using Ohm's law to ensure an appropriate voltage goes through the LEDs. I found the LEDs should be have about 3 milliamps flowing through them.

Upcoming Events

Events in the next week:

Friday May 29

  • Team Meeting

Connect With Us

Follow us on Twitter! Connect with us on Facebook! Add us to your circles on Google+ Subscribe to us on YouTube!