How do I control an output of 5V?
#1
Posted 30 December 2011 - 10:06 AM
#2
Posted 30 December 2011 - 10:11 AM
#3
Posted 30 December 2011 - 10:51 AM
#4
Posted 30 December 2011 - 04:22 PM
That's a good first step right there. As you have specific questions that are unanswered by online tutorials, let us all know and we can help provide answers that many people can use in their own projects.I haven't used a transistor - but I've got a few SparkFun tutorials I can read up on. What's the easiest approach?
Chris
#5
Posted 01 January 2012 - 08:03 AM
Hi,
Oops! I thought the digital outputs provided 5V, not 3.3V, and I have a 5V relay. Is there a way I can provide 5V to the relay as an output? (since I need to turn it on and off)...
The Arduino relay schematic will show you how to wire up a relay to the Netduino. It consists of a resistor, transistor, anti-feedback diode (very important when using an inductive load like a relay or motor).
The resistor limits the current to the transistor, when the pin is switched on the transistor conducts 5v to the relay causing it to engage. Make sure you either configure the port as using a pull_down resistor, or (my preferred route) put a 4k7 ohm resistor between the base of the transistor and ground to pull-down the transistor to ground. That way, the relay is transistor is always in a known state.
-dan
#6
Posted 01 January 2012 - 02:31 PM
Hi,
Oops! I thought the digital outputs provided 5V, not 3.3V, and I have a 5V relay. Is there a way I can provide 5V to the relay as an output? (since I need to turn it on and off)...
Reactive,
I am using relays that also call for a 5V input with 3.3V. They work great. I power them with the 5V from the ND but I trigger them with the Digital IO (3.3V). Here are the ones I am using: http://www.ebay.com/...#ht_6578wt_1241 These boards already have the transistor and diode that others have mentioned... plus they're inexpensive!
#7
Posted 03 January 2012 - 10:26 AM
Reactive,
I am using relays that also call for a 5V input with 3.3V. They work great. I power them with the 5V from the ND but I trigger them with the Digital IO (3.3V). Here are the ones I am using: http://www.ebay.com/...#ht_6578wt_1241 These boards already have the transistor and diode that others have mentioned... plus they're inexpensive!
Hi seascan,
Thanks for the info. I wasn't aware that the transistor mentioned in the arduino relay schematic actually assumed a 3.3V output and would convert it to 5V!
As for your relays - those look perfect. Just another question though... how do I trigger them with the digital pins? I have no clue how to wire it up with the 5V and the 3.3V digital pin?
#8
Posted 03 January 2012 - 11:31 AM
This is a great tutorial on very basic electronic shematics and useage.
I also worked with transistors the first time and after reading the transistor example, everything seemed clear to me (especially the difference between NPN and PNP tranistors)
Greets, Markus
NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and down - and upload files
If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
#9
Posted 03 January 2012 - 03:01 PM
Hi seascan,
Thanks for the info. I wasn't aware that the transistor mentioned in the arduino relay schematic actually assumed a 3.3V output and would convert it to 5V!
As for your relays - those look perfect. Just another question though... how do I trigger them with the digital pins? I have no clue how to wire it up with the 5V and the 3.3V digital pin?
Reactive,
The 3.3V is not converted to 5V... The Netduino 5V output is connected to the screw terminal labeled 5V on the relay. A ground wire is also connected between the ND and the screw terminal on the relay board.
For each relay one digital pin from the ND is connected to the IN screw terminal on the relay board. In the case of the board I referenced above, it has two relays so two separate output pins can be used. The output pin high is 3.3V which is enough for the relay board to trigger the relay to 'turn on' (contacts are closed). Also, the relay board has a diode for each relay which prevent a voltage spike from harming the ND when the relay is turned off (contacts are opened).
The best part is that there are no calculations and no things to stuff into your head (unless you want to)... simply attach the four wires and start turning on and off whatever you want. I am using a number of relays to turn on and off AC lights, Fans and Pumps depending on sensor input to the ND.
Hope this helps!
#10
Posted 03 January 2012 - 03:12 PM
#11
Posted 03 January 2012 - 03:50 PM
Just to clarify...the MCU can only deliver 200mA max current from its pins...but you can draw a bit more than that from the power headers. Technically you can go up to 400mA or so...although that will result in very warm power regulatorsThe board I mentioned draws 200mA from the 5V pin on the ND. This is the combined maximum that the ND can deliver... so I wouldn't try to power anything else (even from the 3.3V pin) unless they draw micro-amps.
Chris
#12
Posted 03 January 2012 - 04:48 PM
Just to clarify...the MCU can only deliver 200mA max current from its pins...but you can draw a bit more than that from the power headers. Technically you can go up to 400mA or so...although that will result in very warm power regulators
Chris
That's great news! Thanks Chris.
#13
Posted 04 January 2012 - 04:40 AM
That's great news! Thanks Chris.
I'm glad my inexperience has brought enlightenment to others, even if indirectly
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users