Questions regarding Arduino UNO & ESP8266

Hello, I am pretty beginner to Arduino UNO and ESP8266. I have a few questions for which I think this community may help.
My questions:

  1. How can I power my Arduino UNO board other than using the USB? I know that the black color power jack needs 7-12 V power. I also know about the ViN pin but I don't know how to use it. Can anyone help?

  2. If I use the ViN pin or the Black color power jack does the board gives 5V and 3.3V output from the +5V and 3V3 pins?

  3. I have an L298N Motor driver and created a circuit like this:


    I read on the net that when we connect less than 12V to this motor driver the last 5V pin can be used as Output. Now does the UNO power up if I use that output from the 5V pin of the motor driver to power on the Arduino UNO Board using the ViN pin(as shown in the picture)?

    Basically, I want to ask that will the circuit shown in picture work perfectly without destroying any of my component/board?

  4. What is the Input voltage required to power on the ESP8266? Can I create the same circuit as shown in the Fritzing diagram above with the ESP8266?

  5. If I consider to buy an Arduino Clone with a CH340G driver do I need to install that driver into my computer separately or will it come pre-installed with Arduino IDE?

This is the pinout of the L298N for reference: L298N Pinout

I know this topic is pretty long, but please consider helping a beginner...

Regards.

Answers:

  1. Yes. USB can provide a maximum of 500mA at 5V. The Uno will need around 50mA of that and the esp needs around 80mA. I don't think there would be enough left to drive your motors. 7-12V can be connected to the barrel socket or the Vin pin. At 7V input you might get up to 1000mA at 5V but the Uno's regulator might overheat and shut down or be damaged. At 12V input, you don't get much current at all at 5V without overheating, enough to run the Uno but probably not the esp and certainly not enough for motors. I would not recommend using the barrel socket/Vin pin for that reason. The third and probably best way is to connect an external 5V supply directly to the 5V pin of the Uno. This power supply can be as powerful as you like. Take separate wires from the 5V power supply directly to the Uno, motor driver etc so that all that power does not need to pass through the Uno.
  1. Yes, you will get 5V and 3.3V out from the Uno. The next question should be how much current at those voltages? Too much and the Uno's 5V and 3.3V regulators will overheat, shut down or burn. Also, if you provide 5V from an external PSU to the 5V pin, the Uno will provide 3.3V output. I think that might be enough for the esp but not sure.
  1. Maybe your motor driver board also contains a regulator? Post a link to the specs of that board and we can advise.

  2. Some esp boards contain a regulator and can be powered with 5V or perhaps more. Others do not and must be provided with a 3.3V supply. Post a link to the specs of the board you plan to use. Also please clarify if you intend to connect the esp to the Uno or replace the Uno with the esp.

  3. Not if you use a good operating system based on Unix/Linux. If using a poorer os like windows, I don't know, maybe you will need a driver.

I hope you are not genuinely planning to power the circuit with a PP3 size 9V battery! They are only suitable for smoke alarms really.

Ok, So what I can understand from your answers is that the voltage and the current both matters. I have a few doubt but most of them cleared..

From what I understand using Ohm's Law (V=IR) when we increase current should increase right? But you have written that at 6V regulator get overheated and at 12V the voltage regulator is fine...Why is that so?

I read the Arduino UNO power pins documentation and they don't advice to input power from the 5V pin. Are you talking about the output?

Sure. This is the board: https://images.app.goo.gl/UcqWBTzLmYfRzqKK8
NodeMCU ESP8266 Pinout, Specifications, Features & Datasheet

I want to use the NodeMCU Esp 8266 board instead of the Arduino UNO (because it increases the cost of my project if I buy the board and the wifi module seperately)

Windows 7 OS I'm using. I figured it out that I would need to download the CH340G driver and that is a easy process.

I was thinking that only, what do you recommend? How should I power my board? Note I cannot use the USB power from laptop because I'm creating a WiFi car basically that moves when I give command from my app. This is also why I prefer to use the ESP 8266...

Thank you.

If it's a nodeMCU it has a 3.3v regulator onboard.

welll the 9v block is not going to provide enough current for the nodeMCU or the motors. i would use a powerpack made out of several AA rechargeables or go for LiPo batteries, which opf course will have the complication of safe charging and discharging.

That is not what I wrote at all. Sorry if it confused you. The higher the input voltage, the less current can be drawn before the regulator overheats. At 12V, only a small current can be drawn, enough for the Uno but little else.

The 5V pin can be used as either input or output. If you power the Uno with USB or the barrel socket or Vin pin, then the 5V pin is an output. If you do not power by those other ways then the 5V pin can be the power input.

You could have been much clearer about this in your original post.

I think replacing the Uno with the NodeMCU is a much better idea than using an Uno combined with any kind of esp board.

A PP3 9V battery is far too weak and low capacity for such a project. It cannot provide sufficient current. If you try to use it, the 9V will quickly fall to a much lower voltage because of the battery's high internal resistance.

The most important component in your project, when deciding on battery choice, is the motors. What voltage and current do they require? What run-time do you need between recharges?

Best avoid "Vin" and the "barrel jack" completely, the on-board regulator is severely limited by having almost no heatsinking.

Nothing to do with the Arduino IDE. If you were using Linux, the drivers would always be there. On Windoze you have to install the CH340 driver from the Chinese source.

The documentation from the Arduino project is very unhelpful and misleading on this point. The "5V" pin is the proper way to power the Arduino but you do need to disconnect external 5 V from this pin when connecting to a PC by the USB port on a UNO or Mega 2560. (Not a problem on a Nano/ Pro Mini.) Always have ground conencted to the power supply and your other devices.

That is not the reason. You use the ESP8266 board if you want to use WiFi and when you have an ESP you do not need an Arduino as the ESP is substantially more capable. Trying to use them together introduces annoying problems of communication between the two.

The WeMOS D1 Mini is somewhat cheaper (and smaller) than the NodeMCU with the same functionality. :grin:

Thanks everyone for your reply. I have got my answers. I'll be using a 6 x 1.5V AA Duracell battery pack with the ViN pin and anyways I wouldn't be using that bot 24/7.

LiPO and Li-ion batteries are highly risky that's why I don't prefer to use them. (In my home). Lead acid batteries also have a chance to leak. That's why I'm preferring to use Alkaline battery.

Also I'm thinking to use either the Wemos D1 R1/R2 or the ESP8266 as they are cheaper and give more features.

Regarding the motors, I'll use a motor driver and use another battery pack or an PP3. I'm using 5V DC motors.

In my area , PP3 batteries are available just for 20Rs ($0.27) that's why I like them.

Regards.

Very bad choice. Very impractical design.

Did you perhaps mean the WeMOS D1 Mini?

No I think the Wemos D1 Mini is overpriced on Amazon. Also it is too small. This is also why I didn't chose the Arduino Nano though it has a very nice price. I have decided, I'll use the NodeMCU Esp 8266 or the NodeMCU ESP 32 ( the latter has the preference)

I saw that Wemos D1 R1/R2 is difficult to program also. Pins are confusing a bit.

Regards.

P.S. : I'm using Amazon.in not Amazon.com

Well, I do not use Amazon so I can't really pontificate but generally the NodeMCU is significantly more expensive than the D1 Mini.

That really makes no sense! :astonished:

Again, the WeMOS D1 R2 is something of a "dead duck" - it is not even listed on the WeMOS website - so to me, that is neither here nor there. The pins may be confusing because many of them do nothing!

The WeMOS D1 Mini however works just fine on the Arduino IDE. :+1:

Well, that may be a problem. I can't say. :confused:

Small means it has less number of GPIO pins. I would need more that's why I'm buying the ESP8266/ESP32.

More pins, means I can connect more sensors, components etc (for individual control, if in future I need) :slight_smile: . I know I can use a breadboard too...

One Last Que:

Do I need to keep a multimeter handy when doing these type of electronic projects? I see it being used everywhere.

Two completely different processors.
Only the first one is ok for beginners.
Leo..

Might be handy, should be in the standard sort of toolkit. If not for trouble shooting, it can serve an educational purpose.
I mean when working with batteries, you will want to measure voltage levels, you may want to check if the current of certain elements is within range etc. And if something is not working the way you expect, you will want one.

The WeMOS D1 Mini has exactly the same number of usable GPIO pins as the NodeMCU, if you were comparing the two.

If you want more GPIO, you use a port expander.

And we will all consider it absolutely essential. Indeed, one in every work area, including one in each car! :grin:

Hello everyone I have a question that might seem a bit off-topic but as It was regarding powering my UNO board, I'm asking it here.

So I was thinking yesterday to use 2 Li-ION 18650 cells to power my UNO board through the ViN pin. I did some research and found out about how to deal with those batteries and how to safely charge them. This also left me few questions in my mind.

I thought of using these batteries: Samsung ICR18650-26JM 2600mAH 2C

I was searching in Amazon and found this 2-cell holder : 2x18650 battery holder which probably holds the 2 cells in series.

Now my questions:

  1. Do you recommend me using these Li-ion rechargeable batteries? Why/Why not?

  2. If I consider using the holder, do I need to use a 2S BMS like this :arrow_right: 2S BMS protection board (Because I think BMS is used when you create a battery pack by your own which I'm not going to do-maybe I'm wrong).

  3. Time is not my problem, so I have thought to use the TP4056 module to charge my cells one at a time seperately. Do you have any other advice?

  4. Can I charge my batteries using the BMS of which I had posted the link? If yes then how?

Also I can get LiFePO4 and cells which I think are more safer than the 18650s You can suggest me your opinions too. They are pretty cheap too. But the problem is that I don't know how to charge them? Can I use the same TP4056 module?
Datasheet of Samsung ICR18650-26JM 2600mAH 2C: Datasheet
Datasheet of TP4056 charger: TP4056 IC

Please keep in mind that I'm a beginner so please advise the safest option.
Regards.

In combination with a charging circuit like the TP4056 circuit that you intent to use and the BMS circuit. I think you will manage a safe option.

Yes ! You need to make sure that the batteries do not discharge below their safe limit, and do not discharge with to much current.

Well the cells have a standard charging current of 1300mA, and a TP4056 has a max charging current of 1000mA. There is no harm in charging the cells a bit slower, but if you can find a 2S BMS unit that includes a charging circuit that might be even better.
like this one

No i don't think that one has a charging circuit included.

Main thing to keep in mind with any of the charging circuits is to either make sure that you do not do any load sharing (powering while charging) unless you are certain that the charging circuit can handle it.
The TP4056 circuit can not ! But since you intent to charge the batteries one at a time this is not the plan and not a problem.
I suspect that the combo unit also does not allow load sharing, and in case of doubt, make sure you don't ! When powering from the batteries while charging, the charging circuit can not determine if the batteries are full, and may therefore over-charge them which can result in all sorts of terrible things.

Thanks, you cleared most of my doubts but I'm left with a few:

  1. The link of the 2-cell holder I posted has only 2 wires --> 1 Red +Ve and 1 black -ve. To attach A BMS with that I think I need to use a 1S BMS which I think is not correct.

So should I go for a 2S BMS board with this--> holder (I will use the single cell holder in place of direct battery connection) like this:

  1. Unfortunately the link you posted, I can't view the pic of the product. Can you post the pic please?

  2. Regarding the charging, The Internet says that TP4056 module has a blue/green LED that starts glowing when the battery has fully charged. Maybe when you post the pic of that product, I'll know which thing I need to use. Also I have a multimeter So I can check the voltage of each cell because the module I posted does not support balance charging.(the diagram is only for the discharging!!)

  3. I do not believe this but are Lead-Acid batteries really safe for use at home (for arduino)?

I think you can use the holder you have with a 2S BMS, but you will need to solder a wire to the point that connects the batteries.

2S-15A-20A-Mobiele-7-4V-8-4V-18650-Lithium-Batterij-Bescherming-Boord-Met-Balans-Bms.jpg_50x50.jpg_
Sorry this is the best i can do for the picture.

The unit i have lights up red during charging and a green led lights up when the battery is fully charged. The colors may vary per particular model, but the TP4056 has 2 output pins of which 1 goes 'LOW' in 1 or the other condition. The LED's are connected to these pins. One could even connect a bi-color led.

Their weight is what makes it unpractical, but lead-acid batteries are safe if mounted in a safe way. They need to be upright at all times. They are safe to use in a caravan or a boat, so in a home it should be ok, During charging some H2 and O2 can be generated on either pole through electrolyses. So ventilation during charging is important.