Shop OBEX P1 Docs P2 Docs Learn Events
What type of transistor to use? — Parallax Forums

What type of transistor to use?

CyrussCyruss Posts: 19
edited 2014-07-31 10:15 in General Discussion
Hi

Im setting up a toolchanger for my CNC machine, i´m looking to use a propeller chip that i´ve been using for another project.

I thinking of using a transistor for switching up power to 24 dc to run a relay that switches on 100v dc.

The relay in the machine is a Omron Type LY2 Link: http://www.ia.omron.com/product/item/ly2_1003e/index.html

What kind of transistor, diod and resistor do I need to use the attached circuit?

3,3 V DC from Prop, 24 V DC as VS.
circut.jpg



Another question to ask is what do I need to make a stable Input to the Propeller chip when reciving 24 V DC from Limit and proximity switches? How much voltage can the Prop handle? Input directly or have some circuit before entering the Propeller chip.

I really appreciate all the help that I can get!

/Lars
Sweden
214 x 169 - 4K

Comments

  • kwinnkwinn Posts: 8,697
    edited 2014-07-28 14:39
    A 2N2904 or 2N2222 would work for the relay coil. The propeller inputs are 0 - 3.3V, so need either current limiting resistors or a voltage divider. I would suggest a voltage divider using a 33K/4.7K resistor to produce a 3V input to the pin.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-07-28 14:47
    That relay coil requires 24VAC. I would pick a different relay.

    -Phil
  • mklrobomklrobo Posts: 420
    edited 2014-07-28 14:53
    Cyruss wrote: »
    Hi

    Im setting up a toolchanger for my CNC machine, i´m looking to use a propeller chip that i´ve been using for another project.

    Another question to ask is what do I need to make a stable Input to the Propeller chip when reciving 24 V DC from Limit and proximity switches? How much voltage can the Prop handle? Input directly or have some circuit before entering the Propeller chip.

    I really appreciate all the help that I can get!

    /Lars
    Sweden

    First question -I would use Kwinn's solution for the transistors. Second question -I prefer to use optocouplers to any microprocessor input.
    This eliminates the possibility of shorts and Opps! :frown: moments in the field, wiring could ruin the propeller. If it blows the optocoupler, replace
    the chip, and keep on trucking!:smile: If you have a noisy enviroment, you may need to secure the I/O from the chop.:blank:
  • jonesjones Posts: 281
    edited 2014-07-28 17:24
    That relay coil requires 24VAC. I would pick a different relay.

    -Phil
    If the relay is "in the machine", the coil may be powered by 24VAC. What about a triac/SSR?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-07-28 17:58
    That relay coil requires 24VAC. I would pick a different relay.

    -Phil

    Yes, and looking at that relay it is a plug-in style, the kind that sparkies replace just like tubes. You just want a small PCB mount relay a bit like <this one>

    Opto inputs are the safest if this is meant to be hooked up by "sparkies" but if it is for yourself I would just use the current limit resistor approach and the voltage divider does that if the input resistor value is high enough and it also allows you to tailor the threshold as the Prop's Vih or high sensing threshold is 1/2Vdd = 1.65V so the values given by Kwinn would just sense high at 13.2V. Personally I would multiply those values by 10 as there is no high speed (MHz) sensing requirement so 330K/47K. If you use the direct resistor approach rather than optos you must understand that at what point the common of the 24VDC supply connects to the common of the Prop's supply is very important as current will flow through grounds and many of the unwary have been caught smoking Props. Apparently this does not have a calming effect.

    BTW, DC could be switched with a MOSFET but you would want to drive that through an optocoupler or other appropriate driver.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-28 18:47
    There has been a lot of discussion expressing disappointment with the useful life of relays.

    I have personally wondered how we got by for so long with relays if they had such short lives. And with a bit of research, it seems that some simple solutions extend the life of the switching side of the relay.

    1. AC tends to wear better than DC as current flows back and forth reducing point wear.
    2. DC relays can significantly extend the life of their contacts by have a flyback diode on the switching side (It seems everyone knows to put a flyback diode on the coil system to protect the coil driving components, but many of use have not considered the same measure on the switch contacts.)

    Just so you can read this all for yourself.
    RC arc suppression circuits work well with AC
    A flyback diode arc suppression circuit works well with DC


    https://www.idec.com/language/english/AppNotes/Relays/contact_circuit_protection.pdf

    http://cp.literature.agilent.com/litweb/pdf/5988-6917EN.pdf
  • CyrussCyruss Posts: 19
    edited 2014-07-29 14:11
    Hi everyone! Thanks for all the responses!

    I´m pretty sure that it is the DC 24V kind of relay. Link: http://se.mouser.com/ProductDetail/Omron-Automation-and-Safety/LY2-DC24/?qs=Pjd0UV7BHP8x1Q3nVd1B1A==

    It says DC24V 650 ohm on the "core". Rated current 36.9mA
    It would be easiest to use the relay that is already in the machine, the cabinet has a very good mounting system for them.

    I will double check the current of the solenoid that the relay will power. I think it is DC 100V 0.3amp.

    Is it wrong to use a optocoupler on the output as well as the input? Are there any appropriate for 3,3 V(prop) in and switching 24V DC? Is it overkill?

    I need to have 11 outputs and about 14 inputs. All the inputs will be 0V DC(off) or 24V DC(on).

    /Lars
  • mklrobomklrobo Posts: 420
    edited 2014-07-29 14:32
    Cyruss wrote: »
    Hi everyone! Thanks for all the responses!

    Is it wrong to use a optocoupler on the output as well as the input? Are there any appropriate for 3,3 V(prop) in and switching 24V DC? Is it overkill?

    I need to have 11 outputs and about 14 inputs. All the inputs will be 0V DC(off) or 24V DC(on).

    /Lars
    I would say that it is never wrong to use optocouplers in your application. You need to secure your investment, and the mission of the project,
    so optocouplers could save the day. There are always accidents when wiring, and you don't need this to stop your project going forward.
    Good Luck!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-07-29 14:59
    Cyruss wrote:
    I´m pretty sure that it is the DC 24V kind of relay.
    Yes, but that's a different relay than the one you linked to before ... :)

    -Phil
  • CyrussCyruss Posts: 19
    edited 2014-07-30 14:26
    Yes, sorry about the wrong link posted.

    The relay is powered by DC24V and it switches on AC100V 0,3 Amp.
    Relay DC24V 650 Ohm.
    I think i will go with Optocouplers on all the I/O.
    Does anyone have a suggestion on what optocoupler to go with? And perhaps a simple drawing on resitors, diods and such from and to the prop.

    Many thanks!
    I´m a newbie on this stuff, more of a programmer/CNC operator.

    /Lars
    1024 x 768 - 89K
    1024 x 768 - 78K
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-31 00:32
    Ummmm...... on the switch side, I have Never seen a relay actually rated for 100VDC --- most are rated for something like 120VAC or 24VDC at a certain amperage.

    AC causes less wear to the contacts than DC. So that is the reasoning for the difference. If you are really planning to switch 100VDC, you should be sure to buy relays that have their contacts rated for this higher DC voltage, and be sure to add at least a 1000VDC diode for arc suppression. The diodes should be easy and cheap to buy, but will be important to preventing early relay failure.

    Here is a relay rated at 100VDC contacts.. not very inexpensive. Regarding the 100A capacity... this would be derated with an inductive motor load to either 40amps or 20amps, not sure which.

    http://pewa.panasonic.com/assets/pcsd/catalog/aej-catalog.pdf
    http://pewa.panasonic.com/components/relays/power-relays/high-capacity-dc-power-relays/aej/
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-07-31 08:00
    I would use this:

    http://se.mouser.com/ProductDetail/Crydom/CMX100D6/?qs=sGAEpiMZZMsEIsGLxVc9kJbWyMS8OSoE

    It's more expensive than the relay, but it's a one-piece, opto-isolated solution that directly interfaces the Prop to 100 VDC.

    -Phil
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-07-31 10:15
    @Phil
    That actually seems like a very good solution. Likely to be much cheaper, quieter, and smaller than a 100VDC rated mechanical relay.... especially if you require less than 10 amps and I suspect that is the case.

    10 amps x 100VDC would be 1000 watts of power. I believe 1 horsepower is 746 watts.

    What I mentioned are nearly $200 USD each via Mouser.
    http://se.mouser.com/Search/Refine.aspx?Keyword=relay+panasonic+aej

    What you mention are $40 USD each via Mouser
    http://se.mouser.com/ProductDetail/Crydom/CMX100D6/?Crydom/CMX100D6/&qs=sGAEpiMZZMsEIsGLxVc9kJbWyMS8OSoE
Sign In or Register to comment.