Go Down

Topic: A newbie who doesnt want to break his new arduino uno (Read 1 time) previous topic - next topic

houpsi

Hello everyone!

Im getting my first ever arduino tomorrow. Im pretty excited about it and been watching lots of tutorials from youtube etc.

But then i came to up to something i couldnt find an answer to.

Suppose i make a circuit to my breadboard and upload my sketch in my arduino. Everything is working well. Then i want to make an another project. I disconnect the arduino board from my pc to get the power out. Then i remove the components from the breadboard. After that i will put my new projects circuit on the breadboard and make my sketch at the arduino software. I plug the board to my pc via the usb for e upload. Now what happens: arduinoboard gets power and starts to go throu my last projects software which is planned for the previous circuit and not intended for the current one.

Is there a change something could break before i get my current sketch uploaded.

Im going to use the arduino uno. (r3 i think...).

Thanks for the help in advance... Cant wait for tomorrow.

kd7eir

I have never had a problem with this, but for absolute safety, I would say the simple solution is to download the new sketch before you hook anything up to your Arduino.

James C4S


Is there a change something could break before i get my current sketch uploaded.

Yes it is possible.  There are lots of combinations where a pin could be configured one way in the old sketch and not configured the same way in your new sketch.

As kd7eir says, you should reprogram the board before attaching the new hardware.  This is a good common sense step anyway.  If you take a moment to plan out the hardware and software before diving in, you'll realize the board needs to be reprogrammed anyway.

The worst time to pick which pins you are going to use are a few seconds before you apply power.

Another good practice is reprogramming the board with Blink or no sketch at all.  Before I start every project, I flash with Blink before connecting to any hardware.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

retrolefty


Hello everyone!

Im getting my first ever arduino tomorrow. Im pretty excited about it and been watching lots of tutorials from youtube etc.

But then i came to up to something i couldnt find an answer to.

Suppose i make a circuit to my breadboard and upload my sketch in my arduino. Everything is working well. Then i want to make an another project. I disconnect the arduino board from my pc to get the power out. Then i remove the components from the breadboard. After that i will put my new projects circuit on the breadboard and make my sketch at the arduino software. I plug the board to my pc via the usb for e upload. Now what happens: arduinoboard gets power and starts to go throu my last projects software which is planned for the previous circuit and not intended for the current one.

Is there a change something could break before i get my current sketch uploaded.

Im going to use the arduino uno. (r3 i think...).

Thanks for the help in advance... Cant wait for tomorrow.


Actually that is a very good question, especially from a beginner. There are two issues that can bite you and possibly cause damage to your arduino is such a situation.

1. If your external circuit is externally powered rather then getting it's power from the arduino, and you then power off the arduino board but the external circuit still has power and wired to arduino I/O pins there is a risk from current trying to flow back through through the arduino I/O pins. In such a case one should always remove power from the external circuitry first before powering off the arduino.

2. In cases where there is external circuitry wired to a arduino is not proper for the sketch that will be running when you start up the arduino there is risk to I/O pin damage depending on the external circuitry and the mode of the arduino I/O pins. There is an example sketch in the arduino IDE called BareMinimum that if loaded into the chip will insure that all arduino I/O pins are input mode only, thus not likely to have any effect nor be effected by external circuitry.

BareMinimum
Code: [Select]
void setup() {
 // put your setup code here, to run once:

}

void loop() {
 // put your main code here, to run repeatedly:
 
}


Lefty

CrossRoads

You could also add a wire (or switch) to keep reset low until you are ready to start downloading.
Remove the wire when the IDE shows "Compiled xxx of 32xxx bytes".
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up