Is it safe to abruptly remove Arduino power? [closed]
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
If I have an Arduino, can I abruptly turn the power on and off without corrupting it? If I am designing a product that has an on/off switch, do I need to incorporate a delay before turning off the power so that the microcontroller can do a clean turn off of some sort? Or is it okay to just connect an SPST switch to the Arduino's power line?
(By designing a product, I mean using an ATmega with Arduino code independently on a custom board with other components.)
Edit:
By Arduino I just mean flashing the Arduino bootloader so I can program in Arduino instead of AVR.
The chip I want to use is Atmel atmega328P
I do not need any EEPROM usage.
arduino power avr
$endgroup$
closed as off-topic by Dmitry Grigoryev, RoyC, StainlessSteelRat, Sparky256, Bimpelrekkie Mar 15 at 9:17
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on the use of electronic devices are off-topic as this site is intended specifically for questions on electronics design." – Dmitry Grigoryev, Sparky256, Bimpelrekkie
add a comment |
$begingroup$
If I have an Arduino, can I abruptly turn the power on and off without corrupting it? If I am designing a product that has an on/off switch, do I need to incorporate a delay before turning off the power so that the microcontroller can do a clean turn off of some sort? Or is it okay to just connect an SPST switch to the Arduino's power line?
(By designing a product, I mean using an ATmega with Arduino code independently on a custom board with other components.)
Edit:
By Arduino I just mean flashing the Arduino bootloader so I can program in Arduino instead of AVR.
The chip I want to use is Atmel atmega328P
I do not need any EEPROM usage.
arduino power avr
$endgroup$
closed as off-topic by Dmitry Grigoryev, RoyC, StainlessSteelRat, Sparky256, Bimpelrekkie Mar 15 at 9:17
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on the use of electronic devices are off-topic as this site is intended specifically for questions on electronics design." – Dmitry Grigoryev, Sparky256, Bimpelrekkie
3
$begingroup$
Note that "Arduino" is a brand name so it gets a capital 'A'. Capitals matter.
$endgroup$
– Transistor
Mar 10 at 8:35
3
$begingroup$
Perhaps if it is actually an "Arduino", but the question is actually about an ATmega on a custom board which would be more of an "arduino". As for the actual topic, in addition to the ATmega one should also consider any other components which may have state, especially external memories - for example, if there's an SD card that needs a large amount of thought and concern. Finally, some power supplies do nasty things at turn on/off.
$endgroup$
– Chris Stratton
Mar 10 at 17:14
1
$begingroup$
Can we assume you're not using an SD card either?
$endgroup$
– UKMonkey
Mar 11 at 12:57
$begingroup$
It is your product. Do you need to save something if the power turns off? The answer to that question answers your question.
$endgroup$
– StainlessSteelRat
Mar 13 at 17:26
add a comment |
$begingroup$
If I have an Arduino, can I abruptly turn the power on and off without corrupting it? If I am designing a product that has an on/off switch, do I need to incorporate a delay before turning off the power so that the microcontroller can do a clean turn off of some sort? Or is it okay to just connect an SPST switch to the Arduino's power line?
(By designing a product, I mean using an ATmega with Arduino code independently on a custom board with other components.)
Edit:
By Arduino I just mean flashing the Arduino bootloader so I can program in Arduino instead of AVR.
The chip I want to use is Atmel atmega328P
I do not need any EEPROM usage.
arduino power avr
$endgroup$
If I have an Arduino, can I abruptly turn the power on and off without corrupting it? If I am designing a product that has an on/off switch, do I need to incorporate a delay before turning off the power so that the microcontroller can do a clean turn off of some sort? Or is it okay to just connect an SPST switch to the Arduino's power line?
(By designing a product, I mean using an ATmega with Arduino code independently on a custom board with other components.)
Edit:
By Arduino I just mean flashing the Arduino bootloader so I can program in Arduino instead of AVR.
The chip I want to use is Atmel atmega328P
I do not need any EEPROM usage.
arduino power avr
arduino power avr
edited Mar 11 at 16:06
JimmyB
2,8881314
2,8881314
asked Mar 10 at 8:00
Michael SohnenMichael Sohnen
674
674
closed as off-topic by Dmitry Grigoryev, RoyC, StainlessSteelRat, Sparky256, Bimpelrekkie Mar 15 at 9:17
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on the use of electronic devices are off-topic as this site is intended specifically for questions on electronics design." – Dmitry Grigoryev, Sparky256, Bimpelrekkie
closed as off-topic by Dmitry Grigoryev, RoyC, StainlessSteelRat, Sparky256, Bimpelrekkie Mar 15 at 9:17
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on the use of electronic devices are off-topic as this site is intended specifically for questions on electronics design." – Dmitry Grigoryev, Sparky256, Bimpelrekkie
3
$begingroup$
Note that "Arduino" is a brand name so it gets a capital 'A'. Capitals matter.
$endgroup$
– Transistor
Mar 10 at 8:35
3
$begingroup$
Perhaps if it is actually an "Arduino", but the question is actually about an ATmega on a custom board which would be more of an "arduino". As for the actual topic, in addition to the ATmega one should also consider any other components which may have state, especially external memories - for example, if there's an SD card that needs a large amount of thought and concern. Finally, some power supplies do nasty things at turn on/off.
$endgroup$
– Chris Stratton
Mar 10 at 17:14
1
$begingroup$
Can we assume you're not using an SD card either?
$endgroup$
– UKMonkey
Mar 11 at 12:57
$begingroup$
It is your product. Do you need to save something if the power turns off? The answer to that question answers your question.
$endgroup$
– StainlessSteelRat
Mar 13 at 17:26
add a comment |
3
$begingroup$
Note that "Arduino" is a brand name so it gets a capital 'A'. Capitals matter.
$endgroup$
– Transistor
Mar 10 at 8:35
3
$begingroup$
Perhaps if it is actually an "Arduino", but the question is actually about an ATmega on a custom board which would be more of an "arduino". As for the actual topic, in addition to the ATmega one should also consider any other components which may have state, especially external memories - for example, if there's an SD card that needs a large amount of thought and concern. Finally, some power supplies do nasty things at turn on/off.
$endgroup$
– Chris Stratton
Mar 10 at 17:14
1
$begingroup$
Can we assume you're not using an SD card either?
$endgroup$
– UKMonkey
Mar 11 at 12:57
$begingroup$
It is your product. Do you need to save something if the power turns off? The answer to that question answers your question.
$endgroup$
– StainlessSteelRat
Mar 13 at 17:26
3
3
$begingroup$
Note that "Arduino" is a brand name so it gets a capital 'A'. Capitals matter.
$endgroup$
– Transistor
Mar 10 at 8:35
$begingroup$
Note that "Arduino" is a brand name so it gets a capital 'A'. Capitals matter.
$endgroup$
– Transistor
Mar 10 at 8:35
3
3
$begingroup$
Perhaps if it is actually an "Arduino", but the question is actually about an ATmega on a custom board which would be more of an "arduino". As for the actual topic, in addition to the ATmega one should also consider any other components which may have state, especially external memories - for example, if there's an SD card that needs a large amount of thought and concern. Finally, some power supplies do nasty things at turn on/off.
$endgroup$
– Chris Stratton
Mar 10 at 17:14
$begingroup$
Perhaps if it is actually an "Arduino", but the question is actually about an ATmega on a custom board which would be more of an "arduino". As for the actual topic, in addition to the ATmega one should also consider any other components which may have state, especially external memories - for example, if there's an SD card that needs a large amount of thought and concern. Finally, some power supplies do nasty things at turn on/off.
$endgroup$
– Chris Stratton
Mar 10 at 17:14
1
1
$begingroup$
Can we assume you're not using an SD card either?
$endgroup$
– UKMonkey
Mar 11 at 12:57
$begingroup$
Can we assume you're not using an SD card either?
$endgroup$
– UKMonkey
Mar 11 at 12:57
$begingroup$
It is your product. Do you need to save something if the power turns off? The answer to that question answers your question.
$endgroup$
– StainlessSteelRat
Mar 13 at 17:26
$begingroup$
It is your product. Do you need to save something if the power turns off? The answer to that question answers your question.
$endgroup$
– StainlessSteelRat
Mar 13 at 17:26
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Yes, it is safe to abruptly shut off an Arduino.
Well, mostly safe.
The processors used in the various Arduinos have three types of memory:
Flash - Where your program is stored. Your program can read stuff from here, but cannot write it.
RAM - Where your program variables are kept while the program in running. The data here disappear when you turn the Arduino off. Your program reads and writes here constantly.
EEPROM - Where your program can store stuff it will need the next time it runs. Usually stuff that changes rarely, but is needed anytime the program runs. Like calibration data for a sensor.
Most programs only use Flash and RAM. You can switch the Arduino on and off any time you like with those programs.
If your program writes to EEPROM, then shutting off the power while writing to the EEPROM could corrupt the data there.
How that affects your program depends on what the data is.
If it corrupts the calibration data for a sensor, you would get bad measurements for whatever the sensor is detecting.
If you write checksums with your EEPROM data, then you could detect the corruption and your program could shut down instead of using bad data.
You, of course, would know if your program writes to the EEPROM - you have to load a seperate library and use special commands to read and write to the EEPROM area.
The danger is really only in that short moment when you write to the EEPROM. Since that happens rarely (and usually only under controlled conditions) it will also be rare to corrupt the EEPROM data.
Summary:
You can turn an Arduino on and off at will with no danger, unless you are using the EEPROM - and even then you will get away with it most of the time.
$endgroup$
8
$begingroup$
"Flash - Where your program is stored. Your program can read stuff from here, but cannot write it." - Many AVR chips (the 328P definitely included) can self-program the flash. In fact, this is how the Arduino programming cycle works; the bootloader, running on the 328P, programs the 328P itself. It's pretty unlikely the OP will be doing that, but it is possible.
$endgroup$
– marcelm
Mar 10 at 14:02
2
$begingroup$
Also, if you use an Arduino with extra hardware on it, (like a sensor), you might as well add a capacitor and spend a portpin to measure the external power, so that when if disappears, you can safely save to eeprom whatever you want. On an ATmega an EEPROM write cycle is typically 3.4 ms. So if your capacitor can keep the processor alive for 5 ms, and before each eeprom writing operation you check the external power, you are safe.
$endgroup$
– vsz
Mar 11 at 5:07
add a comment |
$begingroup$
Yes, you can turn the power off quickly without corrupting it.
The only reason I can see for putting a delay into the power down of the circuit would be for safety or functional reasons of your external peripherals.
E.g. on power off, need to save data to non-volatile memory.
Or on power off, need to ensure a mechanism is in a safe position at power off.
This would require monitoring of the supply and having sufficient hold-up capacity to run the processor and what ever function that was required to be performed.
$endgroup$
add a comment |
$begingroup$
The term Arduino refers to a very broad spectrum of microcontroller boards that have various different chips, and the effect of power loss thus varies. So, I would recommend you put the exact part number of the ATmega chip being used. But, in a general way for chips like ATmega328, the following holds good.
Yes, you can remove power from an Arduino without corrupting or damaging anything but do keep in mind the following things:
If your code utilizes EEPROM then the flash might get corrupted or the data may not get stored accurately when the device is flashing data and power is removed.
The only-way a sudden power loss can do harm apart from EEPROM is to the devices being used with Arduino (e.g. an SD card).
$endgroup$
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Yes, it is safe to abruptly shut off an Arduino.
Well, mostly safe.
The processors used in the various Arduinos have three types of memory:
Flash - Where your program is stored. Your program can read stuff from here, but cannot write it.
RAM - Where your program variables are kept while the program in running. The data here disappear when you turn the Arduino off. Your program reads and writes here constantly.
EEPROM - Where your program can store stuff it will need the next time it runs. Usually stuff that changes rarely, but is needed anytime the program runs. Like calibration data for a sensor.
Most programs only use Flash and RAM. You can switch the Arduino on and off any time you like with those programs.
If your program writes to EEPROM, then shutting off the power while writing to the EEPROM could corrupt the data there.
How that affects your program depends on what the data is.
If it corrupts the calibration data for a sensor, you would get bad measurements for whatever the sensor is detecting.
If you write checksums with your EEPROM data, then you could detect the corruption and your program could shut down instead of using bad data.
You, of course, would know if your program writes to the EEPROM - you have to load a seperate library and use special commands to read and write to the EEPROM area.
The danger is really only in that short moment when you write to the EEPROM. Since that happens rarely (and usually only under controlled conditions) it will also be rare to corrupt the EEPROM data.
Summary:
You can turn an Arduino on and off at will with no danger, unless you are using the EEPROM - and even then you will get away with it most of the time.
$endgroup$
8
$begingroup$
"Flash - Where your program is stored. Your program can read stuff from here, but cannot write it." - Many AVR chips (the 328P definitely included) can self-program the flash. In fact, this is how the Arduino programming cycle works; the bootloader, running on the 328P, programs the 328P itself. It's pretty unlikely the OP will be doing that, but it is possible.
$endgroup$
– marcelm
Mar 10 at 14:02
2
$begingroup$
Also, if you use an Arduino with extra hardware on it, (like a sensor), you might as well add a capacitor and spend a portpin to measure the external power, so that when if disappears, you can safely save to eeprom whatever you want. On an ATmega an EEPROM write cycle is typically 3.4 ms. So if your capacitor can keep the processor alive for 5 ms, and before each eeprom writing operation you check the external power, you are safe.
$endgroup$
– vsz
Mar 11 at 5:07
add a comment |
$begingroup$
Yes, it is safe to abruptly shut off an Arduino.
Well, mostly safe.
The processors used in the various Arduinos have three types of memory:
Flash - Where your program is stored. Your program can read stuff from here, but cannot write it.
RAM - Where your program variables are kept while the program in running. The data here disappear when you turn the Arduino off. Your program reads and writes here constantly.
EEPROM - Where your program can store stuff it will need the next time it runs. Usually stuff that changes rarely, but is needed anytime the program runs. Like calibration data for a sensor.
Most programs only use Flash and RAM. You can switch the Arduino on and off any time you like with those programs.
If your program writes to EEPROM, then shutting off the power while writing to the EEPROM could corrupt the data there.
How that affects your program depends on what the data is.
If it corrupts the calibration data for a sensor, you would get bad measurements for whatever the sensor is detecting.
If you write checksums with your EEPROM data, then you could detect the corruption and your program could shut down instead of using bad data.
You, of course, would know if your program writes to the EEPROM - you have to load a seperate library and use special commands to read and write to the EEPROM area.
The danger is really only in that short moment when you write to the EEPROM. Since that happens rarely (and usually only under controlled conditions) it will also be rare to corrupt the EEPROM data.
Summary:
You can turn an Arduino on and off at will with no danger, unless you are using the EEPROM - and even then you will get away with it most of the time.
$endgroup$
8
$begingroup$
"Flash - Where your program is stored. Your program can read stuff from here, but cannot write it." - Many AVR chips (the 328P definitely included) can self-program the flash. In fact, this is how the Arduino programming cycle works; the bootloader, running on the 328P, programs the 328P itself. It's pretty unlikely the OP will be doing that, but it is possible.
$endgroup$
– marcelm
Mar 10 at 14:02
2
$begingroup$
Also, if you use an Arduino with extra hardware on it, (like a sensor), you might as well add a capacitor and spend a portpin to measure the external power, so that when if disappears, you can safely save to eeprom whatever you want. On an ATmega an EEPROM write cycle is typically 3.4 ms. So if your capacitor can keep the processor alive for 5 ms, and before each eeprom writing operation you check the external power, you are safe.
$endgroup$
– vsz
Mar 11 at 5:07
add a comment |
$begingroup$
Yes, it is safe to abruptly shut off an Arduino.
Well, mostly safe.
The processors used in the various Arduinos have three types of memory:
Flash - Where your program is stored. Your program can read stuff from here, but cannot write it.
RAM - Where your program variables are kept while the program in running. The data here disappear when you turn the Arduino off. Your program reads and writes here constantly.
EEPROM - Where your program can store stuff it will need the next time it runs. Usually stuff that changes rarely, but is needed anytime the program runs. Like calibration data for a sensor.
Most programs only use Flash and RAM. You can switch the Arduino on and off any time you like with those programs.
If your program writes to EEPROM, then shutting off the power while writing to the EEPROM could corrupt the data there.
How that affects your program depends on what the data is.
If it corrupts the calibration data for a sensor, you would get bad measurements for whatever the sensor is detecting.
If you write checksums with your EEPROM data, then you could detect the corruption and your program could shut down instead of using bad data.
You, of course, would know if your program writes to the EEPROM - you have to load a seperate library and use special commands to read and write to the EEPROM area.
The danger is really only in that short moment when you write to the EEPROM. Since that happens rarely (and usually only under controlled conditions) it will also be rare to corrupt the EEPROM data.
Summary:
You can turn an Arduino on and off at will with no danger, unless you are using the EEPROM - and even then you will get away with it most of the time.
$endgroup$
Yes, it is safe to abruptly shut off an Arduino.
Well, mostly safe.
The processors used in the various Arduinos have three types of memory:
Flash - Where your program is stored. Your program can read stuff from here, but cannot write it.
RAM - Where your program variables are kept while the program in running. The data here disappear when you turn the Arduino off. Your program reads and writes here constantly.
EEPROM - Where your program can store stuff it will need the next time it runs. Usually stuff that changes rarely, but is needed anytime the program runs. Like calibration data for a sensor.
Most programs only use Flash and RAM. You can switch the Arduino on and off any time you like with those programs.
If your program writes to EEPROM, then shutting off the power while writing to the EEPROM could corrupt the data there.
How that affects your program depends on what the data is.
If it corrupts the calibration data for a sensor, you would get bad measurements for whatever the sensor is detecting.
If you write checksums with your EEPROM data, then you could detect the corruption and your program could shut down instead of using bad data.
You, of course, would know if your program writes to the EEPROM - you have to load a seperate library and use special commands to read and write to the EEPROM area.
The danger is really only in that short moment when you write to the EEPROM. Since that happens rarely (and usually only under controlled conditions) it will also be rare to corrupt the EEPROM data.
Summary:
You can turn an Arduino on and off at will with no danger, unless you are using the EEPROM - and even then you will get away with it most of the time.
answered Mar 10 at 10:02
JREJRE
23.3k54178
23.3k54178
8
$begingroup$
"Flash - Where your program is stored. Your program can read stuff from here, but cannot write it." - Many AVR chips (the 328P definitely included) can self-program the flash. In fact, this is how the Arduino programming cycle works; the bootloader, running on the 328P, programs the 328P itself. It's pretty unlikely the OP will be doing that, but it is possible.
$endgroup$
– marcelm
Mar 10 at 14:02
2
$begingroup$
Also, if you use an Arduino with extra hardware on it, (like a sensor), you might as well add a capacitor and spend a portpin to measure the external power, so that when if disappears, you can safely save to eeprom whatever you want. On an ATmega an EEPROM write cycle is typically 3.4 ms. So if your capacitor can keep the processor alive for 5 ms, and before each eeprom writing operation you check the external power, you are safe.
$endgroup$
– vsz
Mar 11 at 5:07
add a comment |
8
$begingroup$
"Flash - Where your program is stored. Your program can read stuff from here, but cannot write it." - Many AVR chips (the 328P definitely included) can self-program the flash. In fact, this is how the Arduino programming cycle works; the bootloader, running on the 328P, programs the 328P itself. It's pretty unlikely the OP will be doing that, but it is possible.
$endgroup$
– marcelm
Mar 10 at 14:02
2
$begingroup$
Also, if you use an Arduino with extra hardware on it, (like a sensor), you might as well add a capacitor and spend a portpin to measure the external power, so that when if disappears, you can safely save to eeprom whatever you want. On an ATmega an EEPROM write cycle is typically 3.4 ms. So if your capacitor can keep the processor alive for 5 ms, and before each eeprom writing operation you check the external power, you are safe.
$endgroup$
– vsz
Mar 11 at 5:07
8
8
$begingroup$
"Flash - Where your program is stored. Your program can read stuff from here, but cannot write it." - Many AVR chips (the 328P definitely included) can self-program the flash. In fact, this is how the Arduino programming cycle works; the bootloader, running on the 328P, programs the 328P itself. It's pretty unlikely the OP will be doing that, but it is possible.
$endgroup$
– marcelm
Mar 10 at 14:02
$begingroup$
"Flash - Where your program is stored. Your program can read stuff from here, but cannot write it." - Many AVR chips (the 328P definitely included) can self-program the flash. In fact, this is how the Arduino programming cycle works; the bootloader, running on the 328P, programs the 328P itself. It's pretty unlikely the OP will be doing that, but it is possible.
$endgroup$
– marcelm
Mar 10 at 14:02
2
2
$begingroup$
Also, if you use an Arduino with extra hardware on it, (like a sensor), you might as well add a capacitor and spend a portpin to measure the external power, so that when if disappears, you can safely save to eeprom whatever you want. On an ATmega an EEPROM write cycle is typically 3.4 ms. So if your capacitor can keep the processor alive for 5 ms, and before each eeprom writing operation you check the external power, you are safe.
$endgroup$
– vsz
Mar 11 at 5:07
$begingroup$
Also, if you use an Arduino with extra hardware on it, (like a sensor), you might as well add a capacitor and spend a portpin to measure the external power, so that when if disappears, you can safely save to eeprom whatever you want. On an ATmega an EEPROM write cycle is typically 3.4 ms. So if your capacitor can keep the processor alive for 5 ms, and before each eeprom writing operation you check the external power, you are safe.
$endgroup$
– vsz
Mar 11 at 5:07
add a comment |
$begingroup$
Yes, you can turn the power off quickly without corrupting it.
The only reason I can see for putting a delay into the power down of the circuit would be for safety or functional reasons of your external peripherals.
E.g. on power off, need to save data to non-volatile memory.
Or on power off, need to ensure a mechanism is in a safe position at power off.
This would require monitoring of the supply and having sufficient hold-up capacity to run the processor and what ever function that was required to be performed.
$endgroup$
add a comment |
$begingroup$
Yes, you can turn the power off quickly without corrupting it.
The only reason I can see for putting a delay into the power down of the circuit would be for safety or functional reasons of your external peripherals.
E.g. on power off, need to save data to non-volatile memory.
Or on power off, need to ensure a mechanism is in a safe position at power off.
This would require monitoring of the supply and having sufficient hold-up capacity to run the processor and what ever function that was required to be performed.
$endgroup$
add a comment |
$begingroup$
Yes, you can turn the power off quickly without corrupting it.
The only reason I can see for putting a delay into the power down of the circuit would be for safety or functional reasons of your external peripherals.
E.g. on power off, need to save data to non-volatile memory.
Or on power off, need to ensure a mechanism is in a safe position at power off.
This would require monitoring of the supply and having sufficient hold-up capacity to run the processor and what ever function that was required to be performed.
$endgroup$
Yes, you can turn the power off quickly without corrupting it.
The only reason I can see for putting a delay into the power down of the circuit would be for safety or functional reasons of your external peripherals.
E.g. on power off, need to save data to non-volatile memory.
Or on power off, need to ensure a mechanism is in a safe position at power off.
This would require monitoring of the supply and having sufficient hold-up capacity to run the processor and what ever function that was required to be performed.
answered Mar 10 at 8:24
JCollinsJCollins
38416
38416
add a comment |
add a comment |
$begingroup$
The term Arduino refers to a very broad spectrum of microcontroller boards that have various different chips, and the effect of power loss thus varies. So, I would recommend you put the exact part number of the ATmega chip being used. But, in a general way for chips like ATmega328, the following holds good.
Yes, you can remove power from an Arduino without corrupting or damaging anything but do keep in mind the following things:
If your code utilizes EEPROM then the flash might get corrupted or the data may not get stored accurately when the device is flashing data and power is removed.
The only-way a sudden power loss can do harm apart from EEPROM is to the devices being used with Arduino (e.g. an SD card).
$endgroup$
add a comment |
$begingroup$
The term Arduino refers to a very broad spectrum of microcontroller boards that have various different chips, and the effect of power loss thus varies. So, I would recommend you put the exact part number of the ATmega chip being used. But, in a general way for chips like ATmega328, the following holds good.
Yes, you can remove power from an Arduino without corrupting or damaging anything but do keep in mind the following things:
If your code utilizes EEPROM then the flash might get corrupted or the data may not get stored accurately when the device is flashing data and power is removed.
The only-way a sudden power loss can do harm apart from EEPROM is to the devices being used with Arduino (e.g. an SD card).
$endgroup$
add a comment |
$begingroup$
The term Arduino refers to a very broad spectrum of microcontroller boards that have various different chips, and the effect of power loss thus varies. So, I would recommend you put the exact part number of the ATmega chip being used. But, in a general way for chips like ATmega328, the following holds good.
Yes, you can remove power from an Arduino without corrupting or damaging anything but do keep in mind the following things:
If your code utilizes EEPROM then the flash might get corrupted or the data may not get stored accurately when the device is flashing data and power is removed.
The only-way a sudden power loss can do harm apart from EEPROM is to the devices being used with Arduino (e.g. an SD card).
$endgroup$
The term Arduino refers to a very broad spectrum of microcontroller boards that have various different chips, and the effect of power loss thus varies. So, I would recommend you put the exact part number of the ATmega chip being used. But, in a general way for chips like ATmega328, the following holds good.
Yes, you can remove power from an Arduino without corrupting or damaging anything but do keep in mind the following things:
If your code utilizes EEPROM then the flash might get corrupted or the data may not get stored accurately when the device is flashing data and power is removed.
The only-way a sudden power loss can do harm apart from EEPROM is to the devices being used with Arduino (e.g. an SD card).
edited Mar 11 at 14:37
Peter Mortensen
1,60031422
1,60031422
answered Mar 10 at 12:31
Electric_90Electric_90
1,585519
1,585519
add a comment |
add a comment |
3
$begingroup$
Note that "Arduino" is a brand name so it gets a capital 'A'. Capitals matter.
$endgroup$
– Transistor
Mar 10 at 8:35
3
$begingroup$
Perhaps if it is actually an "Arduino", but the question is actually about an ATmega on a custom board which would be more of an "arduino". As for the actual topic, in addition to the ATmega one should also consider any other components which may have state, especially external memories - for example, if there's an SD card that needs a large amount of thought and concern. Finally, some power supplies do nasty things at turn on/off.
$endgroup$
– Chris Stratton
Mar 10 at 17:14
1
$begingroup$
Can we assume you're not using an SD card either?
$endgroup$
– UKMonkey
Mar 11 at 12:57
$begingroup$
It is your product. Do you need to save something if the power turns off? The answer to that question answers your question.
$endgroup$
– StainlessSteelRat
Mar 13 at 17:26