Pages: [1]   Go Down
Author Topic: How long does a sketch last?  (Read 8371 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Once I upload a sketch to the board, how long can I expect it to stay working? I would like to use my seeeduino mega to get inputs from my house and send some sort of message to my computer. So if I program it to do this, and unplug from the compiler, how long can I expect it to run that sketch? is it burned into the eeprom or do I need to do that to make it work like that forever. . .  or will the sketch disappear if left unplugged for a few weeks?

Thanks. Didnt know how to search for this answer on Google.
Logged

Hyderabad , India
Offline Offline
God Member
*****
Karma: 6
Posts: 621
can't help not to think arduinaizing something !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

well the arduino dosent loose the program if you power if off and the eeprom has nothing to do with storing the progam it is used to log data and it dosent loose data for a million times ( Is it ? ) well i dont remember exactly check it out   smiley-wink
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The flash memory where your sketch is saved on as a data retention time of around 10 years if unplugged/arduino off, forever if arduino on.
Logged

UK
Offline Offline
Faraday Member
**
Karma: 17
Posts: 2884
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From memory (no pun intended) the data retention figures are one of the headline features of the AVR datasheet.

Edit: Yup, there it is: 20 years @ 85 celsius, 100 years @ 25 celsius.
« Last Edit: December 15, 2010, 04:38:29 am by GrooveFlotilla » Logged

Per Arduino ad Astra

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Edit: Yup, there it is: 20 years @ 85 celsius, 100 years @ 25 celsius.

I guess that means that archaeologist in 10,000 years won't have a clue what my Arduino projects actually do/did. Oh the loss to humanity. smiley-wink Maybe I should switch my hobby to pyramid building? Maybe pottery?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks.  I plan to program it and mount it on the home automation wall.  Once there, I was hoping it would just run the sketch for a long time.  I found something you guys might be interested in. To protect the inputs I was going to use optoisolators.  I was pricing them and they were going to be pretty expensive, and then I found these:
http://www.futurlec.com/Mini_Opto_Isolator.shtml
8 channels for only $4.90.  But you have to wait about 3 weeks to get them in.  However, I have been using 3 boards for about a year and they work well.  You might have to change the resistor values or remove them like I did and use external pullup resistors, but at this price, I could not even buy the parts much less have it all made for me.  Hope someone else gets some use out of this.

Thanks again,
Scott.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

opto-isolators are nice and have there use. However keep in mind and perspective that the replacement cost for a AVR 328 chip with bootloader is only around $6.

« Last Edit: December 15, 2010, 10:19:58 am by retrolefty » Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6792
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
archaeologist in 10,000 years won't have a clue
There is some real concern in academic and philosophical circles about the fragility of our digital information, when it comes to "history."  Already, over small amounts of time, it requires "active maintenance" to keep your digital photos from decaying off of their media, and your heirs may be faced with an anonymous, encrypted, lump of technology that they don't know what to do with, rather than a drawer full of memory-stirring faded photographs...

(And I have a bunch of software from highschool and college that is essentially unreadable just because the media it is on is now hard to find readers for, even if it hasn't decayed.  DECTape?)
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
8 channels for only $4.90.  But you have to wait about 3 weeks to get them in.
You may want to check other sources, this company has a reputation of being extremely slow at shipping (3 weeks would be like winning the lottery and only accounts for time in transit).

It does however put your question in perspective (flash retention time) as it becomes relevant considering the time you have to wait for parts.  smiley-wink
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, my point in sharing the opto link was that I am using this to monitor gates outside the house and doors and motion sensors. so running the wire to the board would get me lots of noise and bad readings.  So I needed a way to isolate the circuit so radio waves dont cause spurious inputs to the board.  You guys might be just reading a switch on the circuit board near the chip, but I am running my wires 200 feet sometimes. So I thought I would share the great find. Use it if you find it useful.  I have bought 4 of these boards and are using them now with another circuit and they do ship slow.  I just ordered 8 more boards today so will probably get them after the first of the year.
Logged

Chester, UK
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Erm I'm not sure opto-isolators are what you need for your purposes.......
Logged

If your system involves lethal voltages/life critical/flamable elements - you probably shouldn't need to ask.
The Arduino != PC.

Georgia, US
Offline Offline
Sr. Member
****
Karma: 5
Posts: 371
Arduino makes my head hurt :(
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not to mention we're changing media types every 5-6 years, our ancestors are going to need 50 different media players to figure our shit out
Logged

Pennsylvania
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a quick question sorta related to the original.  

I recently received my 1st Arduino Uno, smd edition.

When I upload a sketch like Blink, run it, unplug my Usb cord, and plug it back in, it doesn't start the blink sketch over again.

At this point I need to reload the sketch over Usb.

Is this normal?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is this normal?

No, that is not proper behaviour. Once the board is powered up by either usb power or external power it should start running once the bootloader times out and jumps to the preloaded sketch.

Not sure what would cause your symptom.

Lefty
Logged

Pennsylvania
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From what I read on the Sparkfun forum, other people are having the same problem with the SMD edition.

Logged

Pages: [1]   Go Up
Jump to: