Help on a circuit

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Help on a circuit

Post by QMESAR »

Hi All.

I apologize as this is not a programming issue directly however I am sure here is very experienced Hardware people and I am asking a bit of help on a transistor circuit.
I need to handle on a machine an emergency stop button which is wired to a 24V supply ,I was thinking to use a transistor inverted signal to the mcu pin
however this has brought 2 questions to my mind

(1) What is the easiest way to calculate the value of the base resistor?
(2) can this circuit be improved to handle reverse polarity condition ?

I do apologize for this elementary questions :oops: I am no hardware developer and I want to make sure that what I am doing is ok and safe I will appreciate any help and any other suggestion to handle the emergency stop button

Many thanks :D
Attachments
1.JPG
1.JPG (11.79 KiB) Viewed 5068 times

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Help on a circuit

Post by Steve001 »

Hi Peter

Looking at a bog standard BC107 for example

http://www.farnell.com/datasheets/16619 ... 1485678472

Working on worst case scenarios

The information shows that this has a minimum current gain of 40 (hfe)
Using your 10K collector resistor

I= V/R
I= 5/10000
I= 0.5 mA

You can calculate Ib now

Ib=Ic/hfe
Ib=0.0005/40
Ib= 0.0000125
Ib= 0.0000125= 0.0125 mA

R= V/I
R= 24/0.0000125
R= 2.4 MΩ


this is how i do it there are other ways to do base biasing using a potential divider this helps the issues with the differences with the transistors hfe range.
Because the input is 24 volts i would use an opto because of the large size of base resistor and also the voltage level.

there is this too may help

http://www.nutsvolts.com/magazine/artic ... ook_part_1

to handle the reverse polarity is this the transistor base ?

i would use a small diode 1N4148 or similar dont forget the diode forward volt drop when calculating resistors

one of our suppliers of ups's / static switches uses an opto isolator for the emergency shut down input that is energised healthy so if any problem ie wire comes off then the unit shuts down.

Using an AC input opto isolator this would do your reverse polarity also

http://www.vishay.com/optocouplers/opto-ac-in/


hope this helps

Steve
Success always occurs in private and failure in full view.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Help on a circuit

Post by QMESAR »

Hi Steve

I do not now how to thank you for sharing your valuable knowledge ,All I can do is say really a true thank you very much,
and hope one day I can roll a stone out of your way.Once again thank you very much ,This is a very good example and made it easy for me to understand :D


Regards
Peter

Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times
Contact:

Re: Help on a circuit

Post by Docara »

Hi QMESAR,

I completely concur with Steve's advice concerning the use of an Opto Isolator and emergency fail safe procedure.
The use of an Opto Isolator what be beneficial when monitoring 'outside' voltages as Steve said but also to completely isolate the micro-controller pin from the outside world.

I'm guessing you are just monitoring the emergency circuit but in case you are involved with anything more please allow me to impart a little background info. By trade I'm an electrician (who did electronics 30 yrs ago but changed career), when I've been involved with an industrial electrical installation, GENERALLY, there have been two main designs when dealing with emergency cut off switching. The first has been installed by the manufacturer of the machine, which cuts the supply to the machine locally. The second system (basically) is when there is a series circuit connected via a number of locking switches around a workshop, which connects to a contactor's coil and keeps the contactor energised which feeds all the the machines. However, in practice there a little more to it than what I have described above ie self feeding contactor circuits etc

As a general rule of thumb an EMERGENCY SWITCHING SYSTEM switches off power and it cannot be restored with specific human intervention and is often controlled/regulated by country specific legal regulations.

Doc

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: Help on a circuit

Post by QMESAR »

Hi Docara.

Thank you for your information,Luckily only need to monitor the Emergency circuit to stop SW execution for some parts however the main safety circuits for the machine are handled by the original equipment

Post Reply