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

Electrical component compatibility.


  • Please log in to reply
6 replies to this topic

#1 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 03 October 2010 - 01:41 AM

Would this relay work with the netduino?
http://www.alliedele...spx?SKU=8862250

I want to use it with 5 to 12V.

#2 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 03 October 2010 - 02:45 AM

Hi oz,
The part you linked to requires 12Volts control voltage, so you must use it with a 12V power supply.
They didn't sell the 3V version, but here is a 5V version that we can also use with Netduino.
http://www.alliedele...spx?SKU=8862249

At any rate, you should not drive the coil directly, use a transistor and protective diode. Something like this:
http://www.arduino.c...Main/relays.pdf

#3 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 03 October 2010 - 03:24 AM

Hi oz,
The part you linked to requires 12Volts control voltage, so you must use it with a 12V power supply.
They didn't sell the 3V version, but here is a 5V version that we can also use with Netduino.
http://www.alliedele...spx?SKU=8862249

At any rate, you should not drive the coil directly, use a transistor and protective diode. Something like this:
http://www.arduino.c...Main/relays.pdf

to expand my knowledge of electronics could you explain why I need to do that? I can't wait for college so I can study this stuff, right now I'm dumb >.>

#4 muyinteresting

muyinteresting

    Member

  • Members
  • PipPip
  • 19 posts

Posted 03 October 2010 - 03:40 AM

The transistor is used to effectively isolate the netduino from powering the relay from its own power. You can use your 5V power supply (ie. 5v 500mA wallwart) to trigger the relay instead. It is much much much more friendly and much less demanding on the MCU to do it that way. Plus, if you have a capable supply, you will be able to use it to trigger as many relays as it allows. The only thing the netduino is doing is flipping the transistor that completes the path to ground. HOWEVER Fair warning, the transistor provides a path that connects high and low voltage components. This is risky if you are using the relay to switch heavier circuits like 120v. if something were to go wrong, it provides a nice path that can send a lethal dose towards your nice shiny netduino. As far as I am aware, this is against electrical code at least in Canada, for safety and electronic component concerns. Well, only if you are switching 120v or higher, and want to stuff this in your walls, etc. The best option is to use an optoisolator. If you are switching only one relay, look for a 4 pin version. Sparkfun carries them I think.

#5 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 03 October 2010 - 03:41 AM

to expand my knowledge of electronics could you explain why I need to do that? I can't wait for college so I can study this stuff, right now I'm dumb >.>

Reasons:

  • Netduino or any other microcontroller for that matter has very limited current handling capability (16ma) in Netduino's case.
    Chances are the relays require more than 16ma. The transistor gives you leverage. Only a small current from Netduino into the transistor base is needed to drive higher currents through the transistor's Emitter and collector pins.
  • Relay coils and motors generates current when they're going from on to off state. Without the protective diode, that current may damage the transistor.
BTW, I did not learn this in college. I learned from others in the Internet, and tinkering on my own. Think how you learned the basics of programming before you delved into multi-threading, the same with electronics. IMO digital electronics is simpler than programming. Other branches of electronics is another story. Posted Image

#6 muyinteresting

muyinteresting

    Member

  • Members
  • PipPip
  • 19 posts

Posted 03 October 2010 - 03:52 AM

Reasons:

  • Netduino or any other microcontroller for that matter has very limited current handling capability (16ma) in Netduino's case.
    Chances are the relays require more than 16ma. The transistor gives you leverage. Only a small current from Netduino into the transistor base is needed to drive higher currents through the transistor's Emitter and collector pins.
  • Relay coils and motors generates current when they're going from on to off state. Without the protective diode, that current may damage the transistor.
BTW, I did not learn this in college. I learned from others in the Internet, and tinkering on my own. Think how you learned the basics of programming before you delved into multi-threading, the same with electronics. IMO digital electronics is simpler than programming. Other branches of electronics is another story. Posted Image


Limited current that won't be able to trigger or sustain the relay, combined with the prospect of having a useless blue lump the next moment.. I'd say it's cause enough to use an external power supply.

Also, wow, I didn't know the netduino was so current limited. The arduino at least can move 40mA. Those are the trade offs I guess. :3

Side note: Even small relays can draw a good 50-100mA on their own, and thats just a small Tyco Electronics one that can switch 15A @ 120v.

Also, it's common and best practice to only use a relay up to 70% of it's rated max load. That is even being generous in some cases. These ratings are for regular resistive loads, they don't incorporate anything inductive, etc. So the relay can take 15A resistive, but you are guaranteed to pop it if you connect something that takes 30A to start up.

Perfect example: A vacuum cleaner. That electric motor can easily pull 2-10x it's usual load to start up. The draw is very very quick, but it is nonetheless large. Notice that the standard North American plug pins seem ridiculously large? There's a reason for that. Safety, Safety, Safety.

tl;dr oversize your relays. It doesn't cost that much more and is more of a guarantee that you won't burn your house down.

I figured this out after getting 10 15A 120v relays from Mouser ($1CAD/each) and taking a look at them. They looked way too tiny to handle anything bigger than a 100w lightbulb in a desk lamp. Now I know, even if my circuit is only 15A, oversize like mad. 30A relays are a bit more $ but the difference between that and burning my house down and the insurance company saying its my own fault... I'll take the extra hit.

#7 ajcg1973

ajcg1973

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts

Posted 09 October 2010 - 07:36 AM

Would this relay work with the netduino?
http://www.alliedele...spx?SKU=8862250

I want to use it with 5 to 12V.


What specifically are you trying to control? There are a variety of products/technologies available on the Internet that are specifically designed to switch 120v household current using a 5v source (at little or no current). I would advise against playing with AC current unless you really know what you are doing or you could fry a lot more than the Netduino!! Posted Image

If you are just trying to switch on and off a higher voltage/current of DC there are a variety of products that are available (once again depending on the loads).




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.