I am trying to use the arduino to switch 12 volts off and on into a 1.5 kilohm circuit (it is and electronic motor controller that takes a 12 volt signal to turn a large motor on).
I am connecting the base of the BC547 to an arduino digital pin through a 1k resistor. Th emitter I connect to ground and the collector to +12volts through a 10 K resistor. However, when I set the pin high and then low, the voltage on the pin stays high. If I replace the BC547 with a LED, the LED goes on and off as expected.
I am connecting a wire to each end of the 10K resistor and use these two wires as input to the motor controller.
Is my circuit design causing the problem and if so does anyone have a better one? I am running the arduino at 3.3 volts as I will need to interface it with a 3.3 volt device.
Well it would better if you could draw out your circuit to see how you have the whole thing wired together.
One thing to check is are you tying the grounds of the Arduino to the 12vdc supply ground? If not then funny things happen and it won't work correctly without a common between the two voltage sources, Arduino power and external 12 volt source power.
Lefty
Thanks retrolefty.
I am making a common ground for the Arduino and 12 volt supply.
Sorry about the lack of diagram, but I have not learnt Eagle yet so I am unable to provide the schematic, however its a fairly simple circuit that I have described consisting of 3 components.
when I set the pin high and then low, the voltage on the pin stays high.
So are we talking about the arduino output pin here for both pins?
and
If I replace the BC547 with a LED, the LED goes on and off as expected.
If you are connecting the LED to what was the base.
I think you have miss identified the pinout of your transistor.
Thanks GrumpyMike.
"So are we talking about the arduino output pin here for both pins?"
I am only using one pin (9) to feed either the base of the BC547 or the LED.
I removed the BC547 completely and used an LED with resistor between pin 9 and ground. This worked OK.
When I put the transistor circuit (as described) back onto pin 9 the voltage output across the 10k resistor remained high (11.84 v) as did the output of pin 9 (3.26 volts).
Can you confirm whether my transistor circuit is correct for feeding the 12 volts into the 1.5k load?
as did the output of pin 9 (3.26 volts).
That is the bit that makes no sense. You have a 10K going into a base and the other end at 3v3 and even if you command it to go to zero it stays at 3v3. You just have not got what you describe. Even if you were to have a base collector short and the other end of that resistor is connected to 12v you should still be able to pull that pin down.
Your schematic is OK and if implemented should work. I can only concluded that you have not implemented what you think you have.
Try a test to see if the arduino is still working when connected up to the transistor by trying to blink an LED with some other pin.