L LED Blinking while standalone

Hi Everyone,

Running an Arduino R4 Wifi to control a servo.
When connected to the Ccomputer trought USB, Everything works well.
But when disconnect USB and powering with external supply, The L Light is blinking (1sec on, 1 sec off) And the programm is not running.

Please help.

Welcome to the forum

How exactly are you powering the board when it is not connected using USB ?

Please post the sketch that you are testing, using code tags when you do

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

It is also helpful to post error messages in code tags as it makes it easier to scroll through them and copy them for examination

Thanks for you fast reply !

I do power my board with an external 12V Power supply.
No error message while uploading the code in "USB Mode". everything works well while connected to the PC. but When i disconnect USB en plug the power supply, nothing happens and the L Led is blinking.

Here is the code.

#include <Servo.h>
#include <pins_arduino.h>

Servo Servo1;

int potPin = A5;
int servoPin = 9;

void setup() {
  // put your setup code here, to run once:
  Servo1.attach(servoPin);
}

void loop() {
  // put your main code here, to run repeatedly:
  int reading = analogRead(potPin);
  int angle = map(reading, 0, 1023, 0, 180);
  Servo1.write(angle);
}

Which board are you using and how is the 12V supply connected to it ?

Sorry, but the line above say nothing about your connection.

Please post a schematic illustrating all lines - including a power & GND lines of the board and of the servo

If you are using the above items and you have connected them together, then check with a multimeter that the GND-pin of Servo is shorted with GND-pin of UNOR4Wifi and the negative terminal of the Battery.

board is a Arduino UNO R4 Wifi
12v power supply is a kind of laptop charger (12VDC, 3.0A)

the power supply is connected to the integrated Jack plug on the board.

understood thanks for reply. i’ll try to draw a sketch tommorrow.

Here it is

Hi
The schematic is not complete. I asked you to show ALL connections, including GND wires. The only servo shown in full, with all it's three wires.

But even from this incomplete diagram we can see a source of problem. You trying to power the servo from the board 5v pin while the board itself is powered via VIN input. It can't work this way.
The VIN pin is an input of on-board voltage regulator that not designed to provide a current for anything except a board itself.
The rule of thumb - the board is not a power supply.

You need an external 5V PSU at least for your servo. I can't say about your another modules, because your diagram is not finished.

Hi
Thanks for your fast reply. i think the problem was misunderstood.

I understand that this is not complete and optimal situation, But as i said, the problem is not that my servo is not working properly.

As long as the Arduino is connected to my PC trought USB, ALL is working good. i can control my servo with the external Signal.

When i disconnect the USB an Power up the Arduino with the 12VDC power supply, nothing work and the Orange L Led on the board is blinking.

Something not work properly only when the board is disconnected from the PC.

Something, indeed.

You haven't said what servo you are using. So I'll assume a generic servo with a stall current of 1000mA.

Can the 5V buck converter on an R4, in addition to running the R4, supply 1000mA fast enough to keep the servo happy every time it starts moving? Or will the servo load the buck converter sufficiently to cause it brown out enough to reset the R4? Maybe. Maybe not. I can't imagine the buck converter was designed to accommodate the current requirements of a servo. That would cost extra and not many companies would go to the added expense, especially when the unwritten rule is that "the Arduino is not a power source."

What does the 5V line look like on a scope when the problem occurs? I'm sure you've looked at that, as it's a basic thing to check out and be sure there are no issues. What did you see?

Try printing something in setup() to see whether the board is resetting

It would be a shame to fry a board like that Uno R4.

Apart from very low current accessories that can be connected directly to board pins, it's always best to protect the board from things like servos.

One split second error on external wiring can take out the Arduino and ripple through to any connected computer. A good way to lose USB ports.

one more time, thanks to everyone for your kind reply.

i connected my servo as it is described on the following link and it works well as long as th board is connected to my PC.

https://docs.arduino.cc/tutorials/generic/basic-servo-control/

So you still fail to run your schematic when you disconnect it from PC?

Exact, but after some test, i found that the problem should come from the VIN trought the Jack. If i power up my Arduino Trought USB-C Phone charger, it run correctly.

I found in the R4 documentation that the VIN is limited to 1000mA of current, as the USB-C Powering to 2000mA.

Next step, i'll try to power the Arduino and the Servo with a 5V industrial power supply, merging the ground wire for this two devices.

i'll keep you up !

That does not make sense because VIN is an input pin and it is connected directly to the DC input jack. Please post a link to where you read you saw thi

Not OP, but what they meant was that the power draw from the 5V pin is limited to 1200 mA (including current consumed by the board components themselves) when the board is powered from the VIN pin, but 2000 mA when the board is powered by USB (using a USB power supply capable of delivering at least this amount of current). The source for this information is here:

https://docs.arduino.cc/tutorials/uno-r4-wifi/cheat-sheet/#power-supply

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.