Duemilinova and Powerswitch tail hook-up

Hi i am working on a project which is due this monday. I am having a hard time to hook up the Powerswitch tail to the arduino. I dont really wanna fry anything on the board or also on the tail. I do have the sheet which explains how to connect the tail but i couldnt understand it completely. So here is what i understand! First somehow with the flexible wire jumpers i have to connect the tail to the arduino or breadboard (this is where i have the major problem because there are + and - on the tail and with the wire jumpers where do i connect that on the arduino or breadboard???) then the male part of the Powerswitch tail gets connected to the wall power outlet. The female part of the tail gets connected to the unit that you want to power on and off right? If somebody could help i would appreciate it guys. Thank you.

i did read it and actually the tail came with it but i didnt understand it. This is the first time i am doing a project like this. I had many other problems with the sensors but they are almost all solved. i am using a thermistor and motion sensor and according to the readings from those sensors, i will be controlling a unit. I am sure it is very simple to connect the tail to arduino but i am not sure about the cable that i need to use for + and - on the tail (i assumed the wire jumper cables) and where do i connect those wires on arduino after that. Thats all i need to know. I should have any problem with coding after that. Thank you Richard for quick reply.

i dont have much experience about the circuits like that and i have been looking at that sheet for a while but i can not figure it out. Question 1- First of all i plug the Tail to the power outlet and the light on the tail doesnt turn on so does that mean that the Tail is bad? Question 2- can i use Flexible wire jumpers to connect the Tail to the arduino (the colored wires which come with the arduino kit)?

you are right sorry i thought i could control it with only one wire and thats what i have been looking. and Yes the Tail came with the transistor. So i guess i have to figure out first how to use a transistor with arduino because I dont know where to put that for now. I appreciate for your patience Richard. Thank you.

the transistor came with the Tail is PN2222A transistor. I have an example of it in the "Getting Started With Arduino " book so i ll mess up with it a little bit. Can i possibly accidentally fry the transistor? Is there anything that i Must not do?

"3) The arrow at the top labeled "external power supply" can be connected to the Arduino "+5V" pin."

but i thought i needed to get the +5V from somewhere from the transistor in order to use the Tail?

I think first i have to find out where to connect the collector-base-emitter on the transistor on the arduino.

After i get that working, I have to figure out how to wire from transistor&arduino to the Tail.

Richard I think first i have to find out and make the Transistor work with arduino. I have pn2222a transistor and how do i connect that to the arduino? on the transistor i have Collector-Base-Emitter and which one gets the +5V, GND, digital_out from the arduino? thats what i can not figure out. I have to find that out first.

"You connect the B (base) to the Arduino pin, the C (collector) to the 5V source, and the E (emitter) to the Ground." So that is how i coneected the transistor to the arduino. Now i have to connect the wires from the transistor to the PowerSwitch Tail.

wow how did you draw that???

i have connected the 5V+ from the arduino to the breadboards + so can i take 5V+ from there and connect it to the Powertail right? this shouldnt cause any problems?

at this moment the 5V+ goes to the PowerSwitch Tail's '+' and I also need 5V for the thermistor that i am using so is that ok for the thermistor. I have to get power somehow to the thermistor.

here is the wire situation. 1st wire from the arduino's 5V+ to breadboard's '+' marked red line (on the bottom of the breadboard). 2nd wire from the same '+' red line to the thermistor (which also need some power) and 3rd wire from the same line to the Powerswitch. is that ok? if not how am i going to distribute 5V+ to the thermistor on the breadboard?

by the way the program that u draw the picture at is amazing. now i can draw pictures to show you guys actually what i mean. thanks alot.

For my powerswitchTail I just go directly from an output pin to the + on the tail, and from the - to ground, and treat it just like an LED. I've had two powerswitchTails hooked up for several months and it works fine.

ok i connected everything but the red light on the tail didnt lit up. I think i have the make the pin high right?

Make sure you have pinmode(13, OUTPUT); if your pin is 13, at the beginning in the setup

guys believe or not but i got it working. I think I dont have to postpone my graduation :) Richard i dont know how much i should thank you but man Thanks millions for your help. Now all i need to do is some coding and thats all which i ll start immediately. thanks again guys really.

Got it working guys thank you very much millions for your help. Especially Richard saved my life big time. After looking at his drawing and advises it was flawlessly working. i am uploading the picture guys. thank you again.

I ll tackle the LED's tonight. Project worked perfectly fine just on time, the code is also very well designed and controlled everything perfect on the board. the loop was perfect for sensors and giving the unit enough time to figure out if anybody was in the room or not. Indeed it worked perfect. Well in reality it needs some check-up and still needs some work on it. I had lack of time, practice and sources which when i need a sensor or a transistor or almost anything i had to order it online and wait for it. For this project I had to get it done today so it just got the job done, but needs improvement of course. I ll keep working on it and see what else we can do since i realize that you can do almost anything with this thing it is amazing. You guys were great too, thanks alot to all of you and appreciate every minute of your help and effort guys. thanks again.

Hello Richard Crowley,

With reply #8, the diagram is showing the diode across E-C on the transistor and not the solenoid.

Just wondering if this provides additional protection to the transistor in light of the powerswitchtail's TVS1 which is across the relay coil? Or if the diode should be across two inputs on the powerswitchtail (J1, + & -)?

Thanks!

Thanks - much appreciated!