Use 3pi output as driver for external circuit

Hi,

I would like to use an output pin from my 3pi to connect to an led chaser circuit running with its own 9v battery.

If I put the +ve output from the 9v into a transistor and the gate to a 3pi output pin, can I use that as a switch. Driving the output high to make the led’s light and low to turn them off? Or would I need to do something more complicated? I don’t want to fry my 3pi.

Thanks, Dave

Hello, Dave.

Your proposed setup sounds like it might work. If you post a diagram of your proposed circuit, I can give you better feedback. You might also find this guide for controlling LEDs helpful.

- Jeremy

Thanks for the link Jeremy,

I have this rough idea, probably useing PD0 (currently one of the front LED’s) and connect the +ve to the base drive it high to let the LED circuit work.

is this enough…I am new to this.

From what I have read, it may be a good idea to put a 1.5K resistor between the pin and the transistor and I apparently need to use a NPN type.

If you are using that layout, I recommend adding the resistor you mentioned between the output pin and the base of the transistor. However, you might instead follow the example found on page 5 and 6 in the link in my previous post for better control of the LED (the circuit on page 6 allows for brightness control).

- Jeremy