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

Relay module 5V to Netduino IORef


  • Please log in to reply
5 replies to this topic

#1 David Karlas

David Karlas

    New Member

  • Members
  • Pip
  • 9 posts

Posted 06 January 2014 - 06:27 PM

Hi all,

 

first I would like to thank you for this awesome piece of hardware.

 

I wanted to control 10 Relays from my Netduino so I bought http://www.sainsmart...-ttl-logic.html. Already at time of buying I was very sceptical about 3.3v and 5v TTL... But after no reply from sellers I went ahead and bougth it...

 

So after recieving it I connected Relay module to external 12v power and then Netduino ground to module ground, pin D0- pin 1,D1-2,D2-3...(signals) and then 5v to 5v... And my setting of pins had no effect... Because when D0 was put in high it was 3.3v and not enough to trigger 5v listening on relay module.

 

So I do first ask later... Connected 5v from module to IORef in hope that Netduino would tell Module we are working with 3.3v and not 5v. And thing started working... But at same time USB debugging stopped.

 

Later I realized that Relay module pulled whole Netduino to 5v working and probably PC USB protection disconnected Netduino. So now(not atm) whole board is running on 5v which is good for me because I need to listen to analog input which is 0-5V so I don't have to do anything special for that to work aswel. But debuing isn't working while this is connected. Plus Relay module is powering Netduino even after USB is physiclly disconnected.

 

So obvious questions for me total amature in electricity/hardware waters is.

  • How lucky I was to get away with this without destroying Netduino?
  • Can I run this configuration 24/7?
  • Will this reduce lifetime of Netduiono and for how much?
  • If this is damaging my Netduino what should I do/how components should I add to connection?

Thank you in advance,

David



#2 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 07 January 2014 - 08:49 PM

Hello and welcome!

 

I don't know too much about the internal hardware and the limitations of the Netduino, but I'm fairly certain that the analog pins are not 5V tolerant, so I wouldn't put 5V into one of those anyway if it's being used for analog readings.

 

If you can't get it to work with 3.3V, then I'd suggest using either logic-level shifters or transistors to switch the 3.3V logic to 5V, as that seems like it would be safest.

 

I'm sure someone with more technical knowledge of the Netduino can weigh in on the potential dangers here.

 

Best of luck!



#3 David Karlas

David Karlas

    New Member

  • Members
  • Pip
  • 9 posts

Posted 08 January 2014 - 06:13 AM

About AnalogInput... My assumption that it's now 5v based is because reading went down for aproximatly 40% which would mean that maximum is not anymore 3.3v but 5v. I didnt try to go over 3.3v on reader so I don't know what would happend if I would it could fry something...



#4 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 08 January 2014 - 03:26 PM

Connecting IOREF to something shouldn't change the operating voltage of the Netduino, as it's really just tied to the 3.3V power header:

 

http://forums.netdui...ain/#entry44184

 

If your trying to power the relay off of the IOREF it would be the same as plugging it into the 3.3V header. Since the relay is not designed to be powered by 3.3V, and IOREF is not intended as a power source, this could be causing your problems. I'm not sure how you're measuring and comparing the readings for your analog input, so there may be something else going on there as well.

 

In any case, it seems trying to run the relay module at 3.3V is causing a lot of problems, and putting more than 3.3V into an analog input would likely cause damage. I still think your best option if the relay powered at 5V can't be controlled with 3.3V signals is to use a logic level shifter or use transistors to switch the 5V signals with the Netduinos 3.3V signals.



#5 David Karlas

David Karlas

    New Member

  • Members
  • Pip
  • 9 posts

Posted 08 January 2014 - 04:39 PM

Maybe I was not clear that Relay Module has to be powered from external with 12V power supply otherwise Relays won't switch at all because they are 12V relays at same time this 12V is converted to 5V inside Relay module.

When I connect Netduino IORef to this 5V on Relay Module and I measure GND-3.3v on Netduino with Voltmeter it shows 5V instead of 3.3V.

 

Is my Netduino Plus 2 "frying" in process?



#6 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 08 January 2014 - 04:51 PM

My mistake, now I understand. You've basically hooked the Netduino's 3.3V power rail to an external 5V power rail. I don't know if your Netduino is being damaged or not--I've personally found them to be pretty hardy and forgiving of my wiring mistakes--but that's definitely not a good way to connect things.

 

If you want to check, I'd disconnect the relay module and measure the voltages on the digital pins (set a few of them to True, then False), and verify that it's ~3.3V and 0V respectively. You can then check a few of the analog inputs by connecting them to ground and then connecting them to 3.3V through a resistor; you should be able to measure ~0 and ~4095 respectively (be sure to use ReadRaw). You should also be able to debug again.

 

If all that checks out, I think you're probably okay, otherwise you may be out of luck.






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.