Sketch not saving in Arduino Uno r3

Hello,

I have uploaded a code to Arduino Uno r3 and it works while it is plugged into my laptop, but when I unplug it and power it using my external power source, the code doesn't work as if it wasn't saved.

Please help me.

1 Like

It sounds like your Arduino Uno is not properly saving the code to its memory when it's being powered by the external power source. Here are some steps you can try to troubleshoot the issue:

  1. Make sure that the external power source you're using is providing enough power to run the Arduino board and any other components connected to it. The recommended voltage range for the Arduino Uno is 7-12V, and it can draw up to 500mA of current.
  2. Check that the connections between the Arduino board and the external power source are secure and properly wired. Make sure that the positive and negative terminals of the power source are correctly connected to the Vin and GND pins on the Arduino board, respectively.
  3. Check that the power source you're using is capable of delivering a stable voltage and current. If the power source is not regulated or has a high ripple voltage, it may cause the Arduino board to malfunction.
  4. Try resetting the Arduino board by briefly shorting the RESET pin to the GND pin using a jumper wire. This will force the board to restart and may help it to properly save the code to its memory.
  5. Make sure that the code you're uploading to the Arduino board is error-free and does not contain any syntax errors or logical bugs. You can verify the code by compiling it in the Arduino IDE before uploading it to the board.
    and double-check for connections

If none of these steps work, you may need to replace the Arduino board or seek further assistance from the manufacturer or a technical support forum.

Does it work again immediately you plug it back into USB ?

yes it does

it does

How exactly do you connect it to your external power source and what voltage does it supply ?

I have mounted a microcontroller(L293D) and connected 4x1.5V batteries to +M and GND. The microcontroller and Arduino turn on (their LEDs) when I turn on the external power source.

The L293D is a motor controller, not a microcontroller. Presumably the +M connection is on the L293D board but where does it connect to on the Arduino ?

My bad, you are correct. I am still very new to this and I'm doing robotics for the first time for a school project. Yes, the +M connection is on the L293D board but I don't know where it connects on the Arduino because I have mounted the male pins under the motor controller on the digital pins and power pins.
image

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