-3
\$\begingroup\$

my reference circuit

please ignore the lamp and 220vAC supply when i use 12v DC insted of 5v and changed relay to 12v the circuit doesnt work how to use the circuit and modify it to work for 12v. i need to connect and disconnect 2 points(for controlling my 3d printer on and off)

edit:I have connected the circuit exactly like the circuit i have given (i dont really know to use any software to make the circuit so i havent put my original one but its the same!) changes i made to this circuit 1. changed 5VDC supply to 12VDC supply 2. changed 5VDC relay to 12VDC relay switched on the supply and relay is always ON i.e the relay gets 12V even if i remove the transistor

so my question is will this circuit actually work? Can it be made to work for 12VDC supply with 12VDC relay? IF this transistor as switch doesnt work then can anyone suggest a better circuit? How to calculate the base resistor value?

edit2: i had a bad transistor so now i checked the transistor before using it enter image description here note: i used hfe as 75 is that correct value for using 12v source? how to determine that value from datasheet from the graph

\$\endgroup\$
  • 1
    \$\begingroup\$ What you're saying is "This is a circuit, which has some similarity to mine, but mine doesn't work, can you debug it." In what way doesn't it work? What is your actual schematic? Did it work once, until the transistor was turned off? \$\endgroup\$ – Colin Mar 28 '18 at 13:23
  • \$\begingroup\$ @Colin__s i have edited the question \$\endgroup\$ – Amrith Mar 29 '18 at 1:04
  • \$\begingroup\$ added the image i drew with pen maybe someone can suggest me a circuit making software noob friendly ? \$\endgroup\$ – Amrith Mar 29 '18 at 4:02
  • \$\begingroup\$ LT spice, its got a learning curve, read tutorials. Make sure you have enough current to turn the relay on, check that in the datasheet of the relay. \$\endgroup\$ – laptop2d Mar 29 '18 at 4:33
  • \$\begingroup\$ thanks @laptop2d the circuit works i should have checked the transistor first (i should have not trusted those blindly!!) i cannot answer my own question i guess the status of the question should be changed... \$\endgroup\$ – Amrith Mar 29 '18 at 4:56
1
\$\begingroup\$

Use ~20 for the hFE to ensure the transistor is deep into saturation. The hFE figures stated on the datasheet are for the transistor in the linear mode and not fully switched on.

So your resistor should be 20*(3.2V-0.7V)/0.03A or about 1.7K. Using 1K or 1.5K should be no problem. Check that the output is really giving you 3.2V under load or check specs on the Pi's Broadcom chip if you can find them.

And check that nothing bad is coming from the base of the transistor before wiring it up (you can common the 12v and Pi supply grounds). A wiring mistake could damage the Pi, especially when voltages outside the range of 0..3.3V are involved.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.