I've designed and built a remote sensor node for a weather station project I've built that uses an nRF24L01+ module connected to an Arduino Pro Mini to communicate with the base station.
I first tried using the 3.3V version of the Pro Mini, because the nRF24L01+ requires 3.3Vin and this made the circuitry simpler, but the readouts from the DHT22 temperature/humidity sensor module ended up being way too low. So I'm going to use a 5V Pro Mini instead.
But to get it to work with the nRF24L01+, I need to step the voltage down to 3.3V (the Pro Mini doesn't have a 3.3v out like the Uno).
I'm thinking of using an L78L33 voltage regulator for this. However, I'm not sure whether to connect its Vin to the Pro Mini's 5V Vcc, or to its RAW voltage input, that will probably be fed by a 9V battery.
Can I connect it to either voltage source, or is one preferable to the other? The L78L33's dropout voltage is 1.7v, so it can just barely be used with the 5V Vcc.
The advantage there is that with less voltage reduction I'll consume less battery power and keep the regulator cooler, which will be less likely to drive the temperature readings higher. But I'm not sure if it'll work, or if there are other disadvantages to this approach.
Suggestions? Is there a better way to step down the voltage? I like the L78L33 because it's small and cheap and easy to fit into my design. Could I use a resistor as a voltage divider instead, or would that be hugely inefficient?
The Pro-Mini's on-board 5V is a modest voltage source (good for 150mA or so). Running the nRF from it, or running the nRF on something running from it, is expecting too much (as I see it.)
You should power your 3V regulator from "RAW", assuming it's reasonable. What's the situation?
I don't think a "9V battery" is going to work out either.
> > > Depending on the TOTAL current budget (not stated), running the 3V reg from the Pro-Mini 5V, and all ultimately from a 9V battery, may be 'OK'. Wouldn't hurt to try.
Haven't researched these nRF+ jobs, but are their signal inputs "5V tolerant"? (Just thought to mention.)
All pins on the nRF24L01+ are 5V tolerant except Vcc, which has to be 3.3V. So I'm ok there. I've tested them in a bunch of configurations and they're fine that way, and the datasheet verifies this.
They're don't use much current, especially compared to the more versatile ESP8266, which I'd considered using since it has much better range and has its own MCU so I wouldn't need a Pro Mini, but it uses much more current, 15mA compared to up to 400mA, and thus wouldn't be a good candidate for a standalone remote sensor node running on batteries (plus the underlying code would be more complex as the nRF24L01+ is really easy to program).
Which is why I thought that a 9V battery would work with the nRF24L01+. Although, given that it would also be powering the Pro Mini and some circuitry, it might be insufficient. For testing purposes it'll work, as I've verified this with a Nano. The main issue might be that it only lasts a few days, tops. Ideally I'd only need to replace the batteries once a month. If so, I'd just use 6 AA batteries in a holder, same voltage, much more juice.
Anyway, back to stepping the voltage down to 3.3V. Given that the nRF24L01+ uses no more than 15mA (if I'm reading the datasheet right), I should be able to connect the L78L33 to either the Pro Mini's 5V or RAW. Assuming this is true, which is preferable, and why?
"I should be able to connect the L78L33 to either the Pro Mini's 5V or RAW. Assuming this is true, which is preferable, and why?"
Regulating linear regulators {"pre-regulating") just results two spots of linear loss ((V_IN - V_out) * I), two places that get warm instead of one place that gets hot.
In your case, probably no big difference, but only crunching numbers will tell.
In their infinite wisdom, the Uno designers source its 3V from its 5V.
Well, if the Uno's 3.3V regulator feeds off its regulated 5V power, then I guess it's ok to do this in my circuit, especially since the 3.3V device draws relatively little power.
Since it appears ok to draw its power from either source, the real question then is which power source is more optimal, in terms of least total heat generated and least current drawn.
Are there standard equations for this and are they linear or do they involve higher math? I did well in calculus in HS & college but that was some time ago and I'm quite rusty.
I meant the relative or absolute internal power loss/draw and heat generated by the L78L33 VR depending on which power source it draws upon.
I.e. will more net power be drawn and heat be generated by connecting its Vin to 5V or RAW or will it be the same either way?
I thought that VRs aren't linear in power draw and heat generated over their suggested Vin range.
I realize that you're trying to get me to figure out the answer by myself with helpful hints, but this goes beyond basic electronics, with a VR in the circuit. Two, actually.
I think that, for first-order approximation, it really is basic electronics, basic math.
I'm not figuring in idle currents, assumptions highly idealized, but calculations going past that become an exercise in splitting hairs and don't invalidate the basic premise - distributing the device dissipations has its plusses and minuses.
I ended up connecting the VR's Vin to RAW. It worked, but then I realized a basic problem with this.
When the entire node is powered via the Pro Mini's RAW Vin, there's no way to debug it and make necessary code changes. And when it's powered by an FTDI-like serial-USB cable, in order to debug and program it, the RF module remains unpowered, making it impossible to debug the full node.
I can keep swapping the two power sources, but that makes for some clumsy debugging. I suppose that I could connect both power sources at the same time, one for debugging and the other to power the RF module, but that could lead to some indeterminate outcomes that complicate things.
I think that what I'll do is rewire the node so that the VR's Vin is connected to the 5V pin of the Pro Mini. Even if that's less optimal in terms of power drain and heat generation (but not necessarily so), it's really the only setup that makes sense from a functional point of view.
Ok, more confirmation that connecting the L78L33's Vin to the Pro Micro's Vcc is the preferred solution. I took a look at the Uno's schematic and it uses an L78L33 to power its 3.3V pin, with the L78L33's Vin connected to the Uno's 5V Vcc. So, this not only works, but it's how the Uno does it. If that's not an answer, I don't know what is.
DrAzzy:
I have serial adapters with the vcc pin (that normally connects to the board to power it) clipped for cases like this.
Most pro minis have a less capable 5v regulator than the unos do.
I guess I could have done that too, but I've already rewired the node so that the L78L33 Vin is connected to the Pro Mini's Vcc. It works just fine, which makes sense given the RF+'s low current draw (<15mA). Were it an ESP8266, which draws a lot more power, it might not have worked.
[quote author=Runaway Pancake link=msg=2748338 date=1462838065]
I posted that in Reply #3, which you acknowledged in Reply #4.[/quote]
One other thing to note. Although the solution I settled on worked, electronically, I was still getting somewhat off readings. Relocating the humidity and temperature sensor module (DHT22) away from the node on a mini breadboard via jumpers fixed that.
As I feared, the node generated enough heat to raise the temperature and lower the humidity readings by several points each. Not sure how much was through radiant heat and how much through the wiring, but it definitely skewed the readings.
One thing I've re-learned from this project is that what looks good on paper isn't necessarily what works best in practice (and when is that ever not true). There are electronic, mechanical and in this instance thermal considerations to take into account. I have a new-found respect for people who design and build real-world electronics devices, based on my own (admittedly simplistic) experience.