Anyone try driving a relay with two output pins. - General Discussion - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Anyone try driving a relay with two output pins.


  • Please log in to reply
12 replies to this topic

#1 perkunas

perkunas

    Advanced Member

  • Members
  • PipPipPip
  • 108 posts

Posted 19 October 2012 - 01:56 PM

I tried driving an optical relay with 2 output pins firing at different times into the same relay. No such luck, I solved the problem by using two relays and tie them together on the output side. That cost me an extra relay but not a bad trade off if it works. The other thing I still cant figure out is why its 3.3v output, when the industry uses 5v makes it harder to work with.

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 October 2012 - 02:03 PM

Hi perkunas,

The other thing I still cant figure out is why its 3.3v output, when the industry uses 5v makes it harder to work with.

ARM-based microcontrollers generally run at 3V3 and output 3V3 logic.

If you need 5V output, I'd recommend adding a transistor to your circuit (although I'm guessing you've already done this).

Glad to hear that your optical relay solution is working. Cool.

Chris

#3 neslekkim

neslekkim

    Advanced Member

  • Members
  • PipPipPip
  • 350 posts
  • LocationOslo, Norway

Posted 19 October 2012 - 02:09 PM

If you still are not using transistors, you could look at this: http://www.w9xt.com/..._switching.html http://www.w9xt.com/..._switching.html I guess it exists some easier solutions, but atleast this explains a good deal about why and how. Not only the ARM based microcontrollers are using 3v3 today, arduinos, raspberry, fpga's, and so on, many are also lover voltages than this. But 3v3 or 5v, anyhow you should use the transistorway, there are just that much current you can take from an mcu, if you use more than one pin on the cpu to drive load you will easily exhaust it.. Edit: Yes, those two urls are different, but the forum shorten them so they look the same :)

Edited by neslekkim, 19 October 2012 - 02:10 PM.

--
Asbjørn


#4 perkunas

perkunas

    Advanced Member

  • Members
  • PipPipPip
  • 108 posts

Posted 19 October 2012 - 03:11 PM

"Not only the ARM based microcontrollers are using 3v3 today, arduinos, raspberry, fpga's, and so on, many are also lover voltages than this."
Arduino digital pins are 5v from what I understand, I don't know about the other ones. Either way the 3.3 or 5 its very low to work with.I have looked at the ULN2003V12 7-Channel Relay and Inductive Load Sink Driver it a nice chip does all the work for you, and if you get real lazy zzzzzzzz There is a real nice 16-Channel 12V Relay Module. For PIC ARM AVR DSP Arduino MSP430 TTL Logic
P.S.
Thanks for the info on the transistor going to build my own board someday

Posted Image

#5 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 19 October 2012 - 03:36 PM

I use 3-32vdc Optical relays and they work direct however, I would be repeating everyone if I said use transistors, but that may help with the 5vdc+ ones, plus some diodes if you are tying them together. I control several opticals for Halloween props and I have controlled one optical from two pins although it wasn't necessary after some programming enhancements and went back to one pin.

#6 neslekkim

neslekkim

    Advanced Member

  • Members
  • PipPipPip
  • 350 posts
  • LocationOslo, Norway

Posted 19 October 2012 - 03:36 PM

the uln2003 and uln2803 are chips that helps you with this, if you look at the datasheet, you will see that it's built the same way, except when you need more than one, they are easier to work with. (7 and 8 gates)

--
Asbjørn


#7 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 19 October 2012 - 03:37 PM

Arduino digital pins are 5v from what I understand, I don't know about the other ones.

They're also moving towards 3.3V. Some products are already 3.3V, and they added the IORef pin so they can switch voltages later too.
Arduino boards that already run on 3.3V: Arduino Fio, Arduino Pro and Arduino Pro Mini.

Also, if a relay works on 5V, there's the maximum of amperes a pin can handle. Relays often pull quite some amps. That's why a transistor circuit can be very useful.

The board you're showing looks very complete. Including transistors. So I think it'll be fine. To be sure, I recommend to check the datasheet of the board.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#8 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 19 October 2012 - 04:02 PM

The faster has to be the logic, the lower has to be the operating voltage. Please, note that the Netduino core works at 1.8V. Cheers
Biggest fault of Netduino? It runs by electricity.

#9 Geancarlo2

Geancarlo2

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts

Posted 19 October 2012 - 04:29 PM

Instead of using 2 relays, you can use transistors to build a simple logic gate http://www.electroni...ic/logic_2.html http://www.electroni...ic/logic_6.html

#10 perkunas

perkunas

    Advanced Member

  • Members
  • PipPipPip
  • 108 posts

Posted 19 October 2012 - 07:43 PM

Thanks for the logic gate, to tell you the truth, I used an extra 3 relays in my project, The logic gate makes more sense. Although the project is up and running, In time after some testing, I plan on making a PC board.(never built one that's going to be fun) Going to read up on them, they sounds a little complicated.

#11 boez52

boez52

    Member

  • Members
  • PipPip
  • 15 posts

Posted 13 November 2012 - 09:05 PM

If I'm using a dual coil latching relay with voltage of 3V (with coil resistance 129 ohms), do I need to use the transistor ??

#12 Nobby

Nobby

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts

Posted 13 November 2012 - 09:48 PM

If I'm using a dual coil latching relay with voltage of 3V (with coil resistance 129 ohms), do I need to use the transistor ??


It's a bit touch & go with your situation. When they say 129 ohms, they mean total impedance. Part of it is reactive and the other is purely resistive. 129ohms at 3.3V from the CPU pin will draw up to 23mA which is borderline. If you intend on driving the relay in short bursts then it would possibly be acceptable but otherwise you wouldn't.

Once the transient behaviour dies away from switching the relay on, the effective impedance of the relay will be less and you'll exceed the maximum continuous current draw from the CPU pin and smoke the poor thing.

If it was me, I'd use a transistor.

#13 boez52

boez52

    Member

  • Members
  • PipPip
  • 15 posts

Posted 14 November 2012 - 03:22 PM

It's a bit touch & go with your situation. When they say 129 ohms, they mean total impedance. Part of it is reactive and the other is purely resistive. 129ohms at 3.3V from the CPU pin will draw up to 23mA which is borderline. If you intend on driving the relay in short bursts then it would possibly be acceptable but otherwise you wouldn't.

Once the transient behaviour dies away from switching the relay on, the effective impedance of the relay will be less and you'll exceed the maximum continuous current draw from the CPU pin and smoke the poor thing.

If it was me, I'd use a transistor.



Is there any example code for using a relay?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.