mova
New Member
Posts: 9
|
Post by mova on May 17, 2016 10:43:34 GMT
The following questions may be considered stupid by some but I have no experience with electrical components. I've spent days reading posts by all of you and i've built a gateway and DHT end node by using Computourist sketches (GW 2.4 and DHT 22). In that process I've burnt two RFM69HW's by not knowing that the SPI on my uno clone was still 5V though I was using the 3.3V output. Now, I've spotted a few things that make me wonder and I have been unable to find answers anywhere else. 1: Resistor value on Gateway LEDs. In Papas posts regarding the gateway he uses 100 Ohm resistors In Computourist's Github HERE he uses 1k Ohm resistors Both circuits seem to be running on 3.3v. Which is "correct" ? Can I use anything in between 100 and 1k ? 2: CapacitorsAre they necessary? Does size matter? in Computourist's Github (link above) he uses a capacitor on the 5V and two on the 3.3v circuit. There are two kinds of symbols but they're the same, right? 3: Power sourceThis may be part of the capacitor question. I've read that the Arduini Mini Pro 3.3v cannot supply enough current to an RFM69HW module so you'll need an external 5V > 3.3V converter to supply the components when using mini pro and RFM69HW. But can an Arduino Uno clone supply enough? I'm thinking about making a Gateway with a 5V Uno clone, W5100 shield on top and using Logic Level Converter for power and signal to/from the RFM69HW. Is it possible to power all this through the USB port on the Uno? OR should I hack the Uno to run on 3.3v? Can the W5100 shield run on 3.3v by doing this? Thank you all for your posts in this forum. They have been a great help and inspiration so far
|
|
|
Post by papa on May 17, 2016 21:01:40 GMT
Your questions are fine. We all start somewhere & this project has a lot to take in & a variety of ways to proceed. I believe you will find this forum very supportive & encouraging. 1) Resistors. Yes, in the range 100 to 1k ohm. I use the 100 ohm because it lets the LEDs shine bright & easier to see in a lighted area. 100 ohm has been safe for me & has not caused the LEDs to burn out. 2) I don't use the pro minis or the power supply with the capacitors. (See #3) My understanding is that the capacitors help filter & smooth the power produced by the voltage regulator. The difference in capacitor symbols: Looks like C2 is supposed to be a polarized electrolytic capacitor (a small canister with positive & negative indicated) whose negative pin connects to the GND line & the positive connects to the positive power line. 3) I use & recommend a Buono Uno Arduino clone like these or these with usb cables. The Buono is switchable from 5 volts to 3.3 volts (mostly, where it counts). Powered through USB or through an adapter with a barrel connector, they provide more current than a pro mini. AND the Buonos switched to 3.3 volts still have a 5 volt socket if that is needed. My Success... thread documents building Gateways & nodes with Buonos. If you already have 5 volt Arduinos, you could hack them. Yes, my understanding is that computourist added the power source to provide more needed current (at 3.3 volts) for the RFM69, DHT11 sensor, etc. Don't use a 5 volt Arduino clone alone which will damage your RFM69 radio which only works with 3+ volts. To a 5 volt Arduino I guess you could add logic level converters which seem to work for some, but are tricky for others. The w5100 ethernet shield works fine on top a 3.3 volt clone, in fact its RFM69 radio requires the 3.3 volts.
|
|
|
Post by computourist on May 18, 2016 10:46:36 GMT
My few cents.... 1) The resistor is there to limit the current through the output pin. This should be less than 20 mA for a 5 Volts operated Arduino (40 mA for a pro mini) , and less than 10 mA for a 3.3 Volts operated Arduino. The LED-voltage depends on the type (color) and is around 2 Volts. The resulting 1.3 volts will drop over the resistor. Using Ohms law you can calculate the resistor value. (or have a look at: ledcalc.com/ ) I just took a convenient value from my parts bin... 2) The capacitors are needed. In the Arduino boards they are present on the PCB. A large (electrolytic) capacitor acts as a buffer: for a short time extra current can be delivered without a voltage drop. Since the RFM transmits in bursts, its current needs are bursty, and a capacitor is needed. A second small capacitor acts as a short circuit for high frequencies, and prevents HF noise from propagating over the power supply lines. Both capacitors should be placed close to the RFM69. 3) The 3.3 V power supply on the Arduino delivers 50 mA (pro mini: 150 mA), and this is not sufficient to power and RFM69 (130 mA) and leds. The Buono can deliver 300 mA on the 3.3 Volt output. This should be sufficient for an RFM69, but could mean trouble if you connect additional peripherals.
|
|
|
Post by papa on May 18, 2016 12:44:44 GMT
Computourist, regarding the resistor question ... you said "The resistor is there to limit the current through the output pin." Is this only to avoid burning out the LED? Is using the resistor also to avoid damaging the Arduino output pin? Is it also to limit the current used by an LED circuit so more current can be available for other things connected to the Arduino (at some price, I believe, of the resistor "wasting" a bit of power generating heat)?
Again, my using 100 ohm resistors with LEDs has given brighter results with no problems that I know of. However, am I possibly paying (& recommending) a price that I don't realize yet.
|
|
|
Post by computourist on May 18, 2016 19:48:35 GMT
Hi papa , The resistor protects both Arduino output and LED from damage by overcurrent. The weakest part of the chain will suffer first, and in this case it will probably be the Arduino output. In determining the max current for an output pin, you also have to take into account: - whether the current is sourced (current flowing from output to ground) or sinked (current flowing from Vcc to output). - The total amount of current to be supplied by all active output pins summed together. Have a look at playground.arduino.cc/Main/ArduinoPinCurrentLimitationsThese values are for the Arduino; values for Buono could be different. To avoid operating in the danger zone I always try to keep output currents at a safe minimum. (hence the 1000 ohm resister to limit LED current ;-)
|
|
|
Post by papa on May 18, 2016 20:11:41 GMT
Thanks, computourist for the detailed response. These kind of technicals scramble my brain, but with your info, perhaps I understand better than I did. Sounds like my recommending just a 100 ohm resistor with a digital pin & LED were not the best idea. So I guess I'll update my posts.
mova & others , take note that using a 1000 (1k) ohm resistor with an LED on a digital pin is probably safer practice.
|
|
|
Post by computourist on May 19, 2016 6:36:02 GMT
Don't overdo it ;-) With 100 ohms the current will be around 15 mAmps, which is well within specs.
|
|
|
Post by papa on May 20, 2016 1:41:09 GMT
ok, thanks for the reassurance about 100 ohms with an LED
|
|