I have an Arduino Nano that I am using to power a bunch of LEDs and some other components. Since there are a lot of LEDs and the total current may exceed the 500mA of USB, I am thinking of powering the whole thing with a 9V power supply like this and a voltage converter like this to step it down to 5V.
Here is the schematic of what I am planning on doing.
I have colour coded the wires so that yellow-orange is 5V, red-orange is 9V and blue is ground.
The bits in the dotted rectangles are PCBs that I already got made. I tested them on a breadboard to make sure they work, and I have tested that the LEDs currently work when powered only by USB, but I didn't turn all of them on at once.
My question is what to do about ground when I am using multiple different voltages.
Should the negative side of the 9V circuit (the wire leading to the "IN-" pin) be connected to the Arduino GND pin. Does it have to be the one next to the "VIN" pin?
Can 3.3V and 5V share same ground? Can converter and TCRT5000 circuits (both 5V) share the same ground?
How many grounds do you see in that schematic? One. So, Vin, 5V, VUSB, and 3.3V must share the ground.
Answer - connect all grounds together - Negative side of 9V supply, negative side of Buck converter, GND of Arduino. There are techniques that will yield better, or worse, results, but as a first approximation, just tie them together.
Yes, I was thinking that shared ground was ok, but I had to ask as I don't want to blow up my Arduino :)
So my schematic is essentially correct then? I just don't need to have IN- connected to GND2 and OUT- connected to GND, they can both be connected to GND. Like this?
Describe your concept of ‘back voltage’ in more detail, please. A diode placed as you have described(e.g. between IN+/IN-) must be reverse-biased, else it’s a short circuit; if it’s reverse-biased, then what back-voltage is it protecting against?
OTOH, if it’s in series with any one of those pins, it would prevent back-voltage. But what circuit element is creating the back-voltage we need to protect against?
Interesting, @PaulRB . What browser? On DDG I can click to open, then click again(zoom) and I get a legible, complete schematic. Painful to scroll around, granted, but there’s no resolution issue once the original image is opened; the pathetically low resolution thumbnail the forum software reduces it to, I agree, is less than useless.
Anyway, I throw this in only because I wouldn’t want our newbie OP to think he’s being castigated, or has done something wrong, if the problem is more a browser presentation issue.
On your buck converter be sure the ground passes through, I had some that actually controlled the - output not the +. The schematic image is very hard to read, it is extremely light.
I always hated the light colour scheme of EagleCAD.
Try this.
Also, Firefox is not always showing the full resolution.
Right-clicking the image and "Open image in a new tab" fixed that.
Leo..
Reading that page, it seems to happen more for motors (which is where I first learned about it in a previous project). So I guess it doesn't really apply here.
Are you referring to using the Arduino's 5V pin as input? The documentation states multiple times that this is not recommended and dangerous, so I have a few questions on this.
If I provide 5V as input to the 5V pin, can I still get 3.3V out of the 3.3V pin? i.e. where does the 3.3 volts come from?
Is it safe to connect the Arduino to my computer using USB while powering via the 5V pin? Since I would still need to upload code and test things, I need to at least use USB to transfer data even if it's not powering the board.
They are IR diodes and sensors, to detect when an object (i.e. my hand) is close to it. I didn't want to waste power having the LEDs on all the time, hence why I connected them to the digital pins. I will turn them on only when I am about to take an analogue reading.
The code will look something like this:
#define IR_IN_PIN A2
#define IR_OUT_PIN 7
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
pinMode(IR_OUT_PIN, OUTPUT);
}
void loop() {
while (true) {
digitalWrite(IR_OUT_PIN, HIGH); // Turn on LED
int value = analogRead(IR_IN_PIN); // Read brightness level
digitalWrite(IR_OUT_PIN, LOW); // Turn off LED
// Do something with 'value'
delay(200);
}
}
In one sentence they say it’s OK under certain conditions and in a following sentence they say it’s not OK under the same conditions. Clearly that webpage need some review as it contains many errors.
If you are not yet comfortable with your electronic skills and understanding of circuits, I also don’t recommend powering the Nano via the 5V pin, so ignore the rest of this post (I know you will read it anyway).
For the Arduino Nanoonly you can supply power via the 5V pin if you do the following:
Power supply must be well regulated with little voltage ripple.
Connect the 5V supply through a diode (see diagram).
Do not connect anything to Vin either on purpose or accidentally.
The 3.3V is an outputonly . The voltage comes from the FT232 IC (not a dedicated regulator) with very limited current capability.
Don’t use a phone charger as a 5V power supply, buy a good quality 5V power supply.
FYI: A USB-C port can supply up to 900mA of current.
I want to try to use as little power as possible for this project, but with all LEDs turned on I have calculated that the instantaneous current may be as high as 800mA so maybe I should get the 3A one just to be sure. What do you recommend?
Does the diode have to be a 1N5802, or will a 1N4007 work just as well? (It looks like the 4007 can handle up to 1A, so I guess it won't be good enough if I get the 3A supply, yes?)
What is the 10uF capacitor for?
Strange statement, since a 5volt cellphone charger is just a 5volt supply.
I just plug the USB lead of the Arduino into the USB socket of a cellphone/tablet supply.
Have done that for years, also with my ESP32 projects.
Some are running 24/7 this way.
No need to buy an over-priced supply from Jaycar.
Make sure you don't draw more than about 400mA through the Arduino.
Anything more has to go around.
Leo..
I didn't realise Jaycar's ones were overpriced. That's all they have so if I want to buy something cheaper I'd have to look elsewhere, but then I don't know how to pick a "good quality" one.
A classic Nano ordered through eBay from China is about about NZ$10 incl freight.
The same clone board, imported by Jaycar from China, costs NZ$55.90 in the shop.
Yes, the website says "compatible" (not Arduino original, which you expect for that price).
I got a bunch of Apple chargers from a second hand store for a couple of dollars.
Look for a charger with USB-A socket, so you can plug the lead of your Nano directly in it.
Mitre10 (NZ) or Bunnings (AU+NZ) has USB plugpacks for NZ$7.49.
Ok but as I said, I need to draw more than 500mA. jim-p said earlier that USB-C can supply up to 900mA, but unfortunately the Nano I got has a Mini-B type.