Pages: [1]   Go Down
Author Topic: write to multiple chips..  (Read 473 times)
0 Members and 1 Guest are viewing this topic.
Rhode Island - USA
Offline Offline
Full Member
***
Karma: 0
Posts: 157
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok, as stated before.. my son and i are new to arduino... i bought an arduino for my son for x-mas (so he hasn't opened it yet, nor the books he's getting)..


some facts before questions..

A.) i will be using a multi coin acceptor: https://www.adafruit.com/products/787
B.) it will be used for a more enhanced project of: http://www.youtube.com/watch?v=0BjU2Hy5Yrw

that project does not use a backup battery power supply, but i will add that..
that project does not save dollar amt to the eeprom.. but i will add that too..
that project uses a single coin acceptor (based on quarters only).. i will be using the one i stated above..

so, for conversation sake, we will be talking about the one they are using in the video (the single coin, based on quarters).. and base our savings amount at $1,000,000.00

the eeprom can handle 100,000 write/delete runs.. so, if you 400,000 quarters - that's 400,000 writes.. and only $25,000 with 4 chips - but our goal is $1,000,000.00 - so in this case we would need 130 atmega chips.

Questions:
1.) how to you save data to the eeprom (like say a dollar amt) every time a quarter is inserted?
2.) how do you save to multiple chips.. so when the first chips reaches 100,000 writes - it moves onto the next chip?

3.) is there a better way for saving than having 130 chips?
« Last Edit: November 21, 2012, 09:29:25 am by Ruffsta » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 45982
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the eeprom can handle 100,000 write/delete runs.
A minimum of...

Quote
but our goal is $1,000,000.00
I don't know anyone who has saved a million dollars 25 cents at a time. Realistic goals might be better.

Quote
1.) how to you save data to the eeprom (like say a dollar amt) every time a quarter is inserted?
EEPROM.write().

Of course, the 100,000 cycles applies to each cell. So, write 100,000 to each (collection of cells), then move to the next set. How many are in each set depends on the size of the value you are storing. You'd have one (set) to record where you were currently writing, updated only when that value changed.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24298
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
and base our savings amount at $1,000,000.00
Twenty two and a half tonnes of quarters?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

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

That's a solution with a very high 'kluge' factor. Simply use one external I2C memory chip that has the read/write endurance you require wired to one arduino chip/controller.

Here are some I2C serial F-ram serial I2C chips that would work nicely, I am sure there are many other brands and models available to choose from.
 
http://www.ramtron.com/products/nonvolatile-memory/serial.aspx?AspxAutoDetectCookieSupport=1

Quote
F-RAM experiences 1E12 read/write cycles or greater.

As you only require 4E6 'quarter counts' read/writes that should work nicely.

As far as how to save the 'value' in the non-volatile ram, just define and use a single unsigned long variable and just have it increment with each new quarter entered and rewrite the value into the f-ram chip, so it's a variable that contains the total quarter count at any given time. Then in software you can later if required divide by four to print out or display the dollar value at any given time.

Keep it simple and affordable. 130 avr mega chips indeed!  smiley-grin

Lefty
« Last Edit: November 21, 2012, 10:09:26 am by retrolefty » Logged

Rhode Island - USA
Offline Offline
Full Member
***
Karma: 0
Posts: 157
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't know anyone who has saved a million dollars 25 cents at a time. Realistic goals might be better.
there are 6 of us in my house and we have TONS of coins here.. we have been saving all of our change for a couple of years - we don't know how much we have at the moment but we don't want to cash it all in yet - hence this project. but again, not just quarters in my project, that was basing it on their video.. we have all 4 coins (quarters, nickles, dimes and pennies) that's why we will be using the 4 coin acceptor.

also please explain about "cells", still confused about that.. all i can tell you is that i want something that can handle 9 digits.. is each digit a cell? i don't know anything about cells and chips.. please explain it all.

Quote
Of course, the 100,000 cycles applies to each cell. So, write 100,000 to each (collection of cells), then move to the next set. How many are in each set depends on the size of the value you are storing. You'd have one (set) to record where you were currently writing, updated only when that value changed.

please explain.. i don't have the books or the arduino in front of me until after he opens it all for x-mas.. i do have the arduino software installed on my pc. i think there would be more to the code than just eerpom.write();

@lefty..
all this is new to me, so i don't know anything about f-ram
« Last Edit: November 21, 2012, 10:19:10 am by Ruffsta » Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Questions:

The solutoin to your problems ranges from simple to complex:

1) ignore the endurance ratings: those ratings are minimum and many chips can do far more than that. 500k is what I have tried on some mcu chips, without failure and I have heard people doing more.
2) reminimize eeprom uses: you don't have to write to eeprom everytime a coin is inserted. You can have the data held in ram and written to eeprom only when a brown-out is detected. You can use a diode / cap to isolate the mcu and outboard eeprom from the main rails to help sustain power supply for this purposes.
3) use lots of outboard eeprom and hash to distribute eeprom writes.
4) use better algorithm in eeprom writes: each write is then read back to make sure no failure is detected; multiple writes for the same data for redundance, etc. Google "high reliability computing" if you wish to learn more. nxp has an application note + library describing this whole thing.

I am sure there are other ways but this should get you started.
Logged

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

Quote
@lefty..
all this new to me, so i don't know anything about f-ram

Time to learn then . It's about adding a properly selected small IC memory chip to your project that will allow you to save the data you need for the time and read/write cycles you require. Just like adding a small real time clock chip to a arduino project if you need to have a program be able to track time and or dates.

  
Logged

UK
Offline Offline
Shannon Member
****
Karma: 183
Posts: 11138
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

there are 6 of us in my house and we have TONS of coins here.. we have been saving all of our change for a couple of years

I think it's safe to assume that you have not collected a million dollars worth of small change and it seems inconceivable that you would reach anywhere near that sum unless you set up a specific project with substantial funding to support it. Realistically, who would leave tens or hundreds of thousands of dollars of capital piled in the corner of the room, and who has space (and strong enough flooring) to make that practical even if they could afford to leave that much cash unused?

If this is just to be a smarter piggy bank then I suggest you start with a technology that is sufficient for your needs in the forseeable future, and not worry at this stage about something that will scale up to thousands of times bigger than you need. How many cubic feet of coins do you have so far?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Rhode Island - USA
Offline Offline
Full Member
***
Karma: 0
Posts: 157
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how much cubic feet? i don't know.. how much does 4 huge poland spring jugs take up and how much do they hold? lol

ofcourse in reality we would not be saving all that in change - eventually cash it in as we see fit.. it's all about the display and saving to memory.. i would like to see it say $1,000.000.00 on the screen.

ok, here's a simplified version of what i could deal with..
reach a goal.. say $500.00 per run.. empty a smaller jug and hit the reset button to start the process all over again.. but again, no matter how you do it it's all about the memory and power outage... how does it detect a "brown out" as that was mentioned before? and how long would that chip last? lol
« Last Edit: November 21, 2012, 12:27:32 pm by Ruffsta » Logged

Pages: [1]   Go Up
Jump to: