[Nathan]’s son really loves numbers and counting, and one of his favorite things to do is add 1 to a calculator over and over again. Being the awesome dad that he is, [Nathan] built his son a counting box that has a 10-digit rotary switch and two arcade buttons to add and subtract.
One goal of the project was to have the counting box retain memory of the display while being powered off. The easiest way to do this is to write the display data to the ATmega’s EEPROM. This EEPROM is only rated for 100,000 write cycles (although in practice it’s much higher), so [Nathan] included a 24LC256 in a little spasm of over-engineering. All the electronics are laid out on perf board, and the case is constructed from bamboo that was laser cut by Ponoko. The quality of the case itself is fairly remarkable – we’re really impressed with the finish and the magnetic battery access door.
From experience, we know that playing with an HP-15C eventually leads to a broken calculator and having our Nintendo taken away. We’re really happy for [Nathan]’s son, and wish we had our own counting box at his age.
The Atmel can use micro- or nano- amps when not doing something – if the switch only controlled the display’s power, a coin cell could keep the state until the child was ready for college. Probably longer if it was a rechargeable lithium cell.
In fact, you just covered it:
http://hackaday.com/2011/07/26/a-study-in-avr-power-saving-techniques/
Of course if it used LCD and had solar cells…
What a nice case! I wish I could make things that looked that good.
You can. It is called a box joint or finger joint. All you need is a table saw and a little time to make a two dollar jig.
Alternatively you can go for hardmode and use a backsaw and paring chisel.
This reminds me of when my friends and I would have calculator races in elementary school. With the buttons that are meant to be pressed rapidly on this box, this kid would have run circles around us.
I really like that case. I have had a few simple things made by Ponoko but I think Nathan’s hand finishing of the rounded edges really makes it a work of art.
100,000 cycles is a lot if you only write to the EEPROM when the box is turned off.
Add a small capacitor, and measure the voltage. If it drops below a threshold, write the current number to the EEPROM.
This is a great, great looking build!
Like!
Good Daddy!
or just add a line of code that counts to 99,999 and then moves to next eeprom domain (cell), it`s the Cells that fail, not the addressing support logic for them ;)
Nice work btw!
But wouldn’t you wear out the memory cell that stores the counter?
i believe the AVR has a seperate ‘cell’ for each byte of the EEPROM
its the flash that is in larger pages
however, i have seen another method for saving the eeprom
have an array of struct’s in the eeprom, with a serial# at the start of each one
and rotate thru the array, updating only one entry each time
when you start up, read the one with the highest serial#
if you can fit 10 copies of the config in eeprom, you just extended the life *10
A great build, with an absolutely far out finished product. I can’t recall at what age we learned to count, but I’m sure the technology at the time was paper,and a fat pencil. Writing down 1-2-3…98-99-100 would have certainly been seen as a waste of paper, and probably discouraged, unless the parent got tired of the child continuously verbally counting out the numbers.
what happened to the old Speak and Spell? they had a math one that was fun.. (i guess i really am a geek if the math one was fun!)
I have the math (gray one) and the reading one (yellow). the reading one really isn’t so fun without the books it came with, since it references them. both were only a few bucks at garage and estate sales. cool.
I’d love to take the speech chip out and build my own talking box like what those with disabling diseases use– but I can’t find any documentation on it. just instructions on how to circuit bend.
This box is cool though. I messed around with 7-segment LED modules and various ICs designed for them: 4026, 429+4511…
I’ve been wanting to build a similar box like this but avoiding use of any kind of micro controller.. using the above listed ICs, I could build a box that counts up and down at the push of a button, but the rotary dial would be tricky, as well as power-off memory. it would also use a lot more chips and power than necessary.
Does this help, Timmy? http://sites.google.com/site/analogvocoderinfo/speak-spell
I have the math (gray one) and the reading one (yellow). the reading one really isn’t so fun without the books it came with, since it references them. both were only a few bucks at garage and estate sales. cool.
I’d love to take the speech chip out and build my own talking box like what those with disabling diseases use– but I can’t find any documentation on it. just instructions on how to circuit bend.
This box is cool though. I messed around with 7-segment LED modules and various ICs designed for them: 4026, 4029+4511…
I’ve been wanting to build a similar box like this but avoiding use of any kind of micro controller.. using the above listed ICs, I could build a box that counts up and down at the push of a button, but the rotary dial would be tricky, as well as power-off memory. it would also use a lot more chips and power than necessary.
@RunnerPack
yes, that is probably everything I would ever need to know, and more!
much of it is over my head, though I DO have a Timex machine, Like-New In Box, in the garage, I COULD try and fire it up and see if I can get this project going.
but seeing that link you posted made me give google another go and so I changed my search terms a little and found this:
http://highlyliquid.com/kits/midispeak/
absolutely perfect, as my intended uses for a properly modded speak’n’spell unit were musical in nature. circuit bending is neat, but I want exact control, not random glitches. I will be getting this kit and seeing how that works, probably apply it to my Speak’n’Math, and maybe if I get inspired to work a little harder, fit my Speak’n’Read to work with the Timex computer (or at least build the interface and find a way to attach it to a newer PC– maybe whenever I finally give in to Aurduino)
Thanks!
–and on a side note, it’d be nice to be able to delete double-posts, or edit comments to prevent double posting. or at the least, report comments and be able to enter a reason it needs to be removed.
It can count up to 99.999.999, so you would need 27 bits to store the count. The ATMEGA328 used has 1k of EEPROM. Using 4 bytes at a time to store the count, progressing through the EEPROM memory space, using the most significant bit to mark the previous value as invalid (bits can be cleared without erasing). This would provide space for 256 counter values before wrapping back to the first byte in the EEPROM, to make the whole thing last at least 25.600.000 cycles.
I seriously doubt the on/off switch would last that long.
Pretty neat toy though, it’ll be a nice anecdote many years from now.
dont forget to include a spring loaded snake in a can which is servo actuated when you hit 99,999,999 …
“also saves calculators from small children”
you can get calculators very cheap now a days.
i had seen watch sized calculators (non printing) for $10 at staples at one time
and many computers have calculator software you can do simple math.
google also has online calculators
http://www.google.com/search?hl=us&source=hp&q=1%2B1&aq=f&aqi=g10&aql=&oq=
When I was a kid I saw a box about the size of a 1960’s TV, with a telephone dial and 10 lights. When you dialed, a stepper relay incremented once for each pulse and the next light lit up, so it added.
You could also lump in a huge capacitor on its power and write EEPROM only when the brownout detector fires an interrupt (or a/d converter sees power drop below a threshold). Saves many write cycles I think.
oh yeah.. not as cheap and simple but probably safer: you could also implement the on/off switch as a soft switch that either powers on a transistor that provides power from the battery or signals the mcu to power down (and the mcu itself could ground that transistors base). That way the MCU has all the time it wants to shut down. Further improvement could be a capacitor timing circuit in its base that cuts off power anyway if you hold the button for too long – to prevent lockups.
hmm sorry, no I didn’t mean to say to ‘prevent’ lockups.. I meant to provide means to force it to shut down in case of a lockup
Very nice build…but it would take forever to spell “80085”.
Thanks for the feedback, all! These are some good ideas I can explore next time I deal with similar issues in memory and power consumption.
By the way, the tracking I built into it shows that after one week of use so far the max number he’s reached is 2161 and the minimum is -93, with 1416 pushes of the plus and 642 pushes of the minus.
given this data, it appears to be reasonably safe to assume that adding is indeed of greater entertainment value than that of subtracting.
that said, I have a thing for counting devices as well. odometers, turnstiles, utility meters… not like OCD, but I find it’s neat to look at the numbers, especially when the various milestones are reached (888888, 123456, 101010, etc..)
I have a general event counter project in the works, the end result will be a set of 7-segmented LED modules like this project, but instead of a + and – button, I’ll have jacks for plugging in remote triggers such as reed switches, micro switches, laser path break switch, mercury switch, dB level switch, etc… and also a clock to trigger it by the second or fraction of a second or minute, hour, etc.
it’s been on hold, but after seeing this, I think I will get to it sooner rather than later.
thanks.