dSwitch Kit

dSwitch Kit

The dSwitch is a product for the LEGO MINDSTORMS NXT that controls 110V powered devices.Introduction

The dSwitch is a controller designed to be used with LEGO® MINDSTORMS® NXT hardware and software.  The dSwitch controls any appliance in your house, such as a light, a toaster, or anything else you can plug into a household socket.  The device acts as a switch, allowing your NXT inventions to turn off and on any appliance in the house!

The dSwitch is only rated for 110V.  It is only rated for a maximum of 15 Amps.  Please use only with adult supervision.

Safety

There are a few important things to note about the dSwitch.  Please read carefully before starting and if you have any questions, please do not hesitate to contact Dexter Industries or PowerSwitch Tail.  We sell this product as a kit and all liability is assumed by the user.

For safe operation, please remember:

  • The appliance you are operating must be 110V AC.  The PowerSwitch Tail II is not rated for more than 120V AC.
  • The appliance you are operating must draw 15 amps or less.  The PowerSwitch Tail II is not rated for more than 15 Amps.
  • The dSwitch is rated for indoor use only.
  • The dSwitch must be used in a 3-prong, grounded wall socket.
  • The dSwitch should not be cycled at more than 1 time every second.  Depending on the appliance you are turning on and off, switching it on and off rapidly may shorten the appliance’s lifespan; be careful!
  • The dSwitch should always be used with adult supervision.

Setup

The dSwitch requires minimal setup.  The switch is shipped as a kit, and requires a small flat-head screwdriver to assemble.  You should be careful to orient the female LEGO NXT port in the upward direction when assembling the dSwitch for the first time.

The kit comes with two parts:

  • A PowerSwitch Tail II
  • A special adapter for the LEGO MINDSTORMS NXT.

To assemble: 

  1. Remove the two parts from the bag.

    Step 1: The Powerswitch tail unpackaged.

  2. Align the Adapter to the left two openings on the side of the Powerswitch Tail: opening 1 (+in) and opening 2 (-in).  The Adapter should be facing upwards, towards the label on the Powerswitch. 
    Step 2: Align the pins.

    Step 2: Align the pins.

  3. Slide the adapter into the two leftmost openings of the Powerswitch Tail.  Ensure the adapter opening is facing upwards.

    Step 3: Slide the pins of the adapter into the leftmost slots of the Powerswitch Tail.

  4. Use a small flat-head screwdriver to tighten the screws.  Tighten until the adapter is firmly mounted to the Powerswitch Tail.
    Step 4: The Fully Assembled Powerswitch Tail. Note the female port is pointing upwards, towards the label.

    Step 4: The Fully Assembled Powerswitch Tail. Note the female port is pointing upwards, towards the label.

    Step 4: Use a flathead screwdriver to tighten the screws on the Powerswitch Tail.

  5. The adapter can now be connected to the LEGO MINDSTORMS NXT motor ports.

    The dSwitch attached to a LEGO MINDSTORMS NXT motor port.

    You now have an assembled dSwitch.

  6. Plug the male end of the Powerswitch Tail into a 110V socket.  Plug the device you want to control into the receptacle.  Ensure the device you are powering with the dSwitch will NOT draw more than 10 amps and is powered on 110V.

Software

The dSwitch can easily be run in NXT-G, Labview, RobotC, NXC and Lejos.  Examples, blocks, and drivers can be downloaded from our download section.

The dSwitch can be controlled by simply setting the motor power to the desired port to 100% to turn the switch On, and 0% to turn the switch off.

NXT-G Software:

A block for controlling the dSwitch can be downloaded from our Downloads Section.  The block can installed in NXT-G and used to turn the dSwitch on and off.

dSwitch Control Panel in NXT-G    

NXT-G example program:  Blinking lights.  This program turns a standard 110V lamp on and off at a rate of 4 seconds.

Other Software:

The dSwitch can be controlled with RobotC, NXC, Lejos, and any other programming language by simply turning the motor port the dSwitch is connected to to 100% (on) or 0% (off).  In some languages, such as RobotC, the Motor must be set to “-1” to turn the dSwitch off.

An example in RobotC is provided below.

[sourcecode language=”cpp”] task main()
{
while(true){
motor[motorA] = 100; // dSwitch is on MotorA. Turn it on by setting to 100.
wait1Msec(2000); // The program waits 4000 milliseconds (4 seconds) before running further code
motor[motorA] = -1; // Turn dSwitch off by setting to -1.
wait1Msec(2000); // The program waits 4000 milliseconds (4 seconds) before running further code
PlaySound(soundBeepBeep);
}
}
[/sourcecode]

Technical Details

The dSwitch is a PowerSwitch Tail II with an adapter for the LEGO MINDSTORMS NXT.  More information on the PowerSwitch Tail II can be found at www.powerswitchtail.com

FAQ

 

Got a question?  Ask on our forum!