#1
Posted 29 May 2013 - 06:41 AM
#2
Posted 29 May 2013 - 08:27 AM
I've got one of these: DS1338 (DS1307 compatible, 3.3-5v I2C)
http://www.ebay.co.u...e-/270762577188
#3
Posted 29 May 2013 - 08:57 AM
Thanks, nice and cheap board there.
I know pretty much which ICs are out there, I was thinking more of the backup method itself when creating ones own circuit.
Sorry for being unclear about that.
#4
Posted 29 May 2013 - 09:59 AM
I'm currently using a cr1220
#5
Posted 29 May 2013 - 11:32 AM
I'm just wondering what you guys use to backup your RTCs, are you using coin cells, super capacitors or what?
With our Mountaineer boards (STM32F4) we have tried to use a super cap, with the built-in RTC of the microcontroller. Worked just fine for at least two weeks without external power to the board. Maybe it would have lasted even longer. We used a capacitor with 0.5 Farad. It must be one that is designed for minimal self-discharge.
Cuno
#6
Posted 29 May 2013 - 12:09 PM
Two weeks is pretty good, especially if the intention (like mine) is merely being able to survive a reboot due to watchdog timeout or a temporary power shortage.
#7
Posted 29 May 2013 - 01:54 PM
normally,a coin cell is enough to powe the rtc for several years.
#8
Posted 29 May 2013 - 02:09 PM
#9
Posted 29 May 2013 - 05:13 PM
I have used a polyacene battery/capacitor with a Ds3232MZ+ RTC,
http://www.goldmine-...p?number=G13133
It has a rating of 0.6 Farad.
#10
Posted 29 May 2013 - 06:05 PM
Hmm...those small re-charging cells seem nice and 15 pieces for less than 1 USD is within my budget too!
Seems to be like a combination of battery and super capacitor?
#11
Posted 29 May 2013 - 06:12 PM
I have used a polyacene battery/capacitor with a Ds3232MZ+ RTC,
http://www.goldmine-...p?number=G13133
It has a rating of 0.6 Farad.
Note the "these batteries will discharge over a period of time (even if not connected to a circuit)" remark. I'd try to avoid that. I wonder how long this would work in practice with an STM32?
Cuno
#12
Posted 29 May 2013 - 07:16 PM
As I understand, it is being charged when your board is powered the normal way but if power is lost, the cell will power the RTC chip for a certain amount of time depending on its current draw and the minimum voltage it requires to maintain time keeping (usually ~1.8V). The cell is not supposed to power the whole board, just the RTC chip.Note the "these batteries will discharge over a period of time (even if not connected to a circuit)" remark. I'd try to avoid that. I wonder how long this would work in practice with an STM32?
#13
Posted 29 May 2013 - 10:36 PM
More on these polyacene devices here,
http://www.yuden.co....-SP1_101013.pdf
The RTC that I cited has a timekeeping battery current (I2C inactive) of 3uA. I have an experiment running on my desk using a Picaxe 20x2 that sleeps for 10 sec, wakes up and reads a 24LC256 EEPROM and the time from the DS3232MZ+ and then goes to sleep again in an endless loop. Power comes from 2 AA cells and the Picaxe is hooked up to an inverted serial USB FTDI adapter for readout.
Cheap cells run about 2 months. The strange thing, however, is that when I change the cells the RTC clock never loses the time and it is not connected to a battery backup. I think it is getting phantom power through the FTDI adapter. I have asked about this on the Yahoo Electronics 101 forum and the answer was that this is not uncommon with TX/RX lines coming in to the circuit. The only way to prevent it is to explicitly switch them off.
So, hanzibal, maybe you do not even need a battery if your project is using serial interacing.
P.S. The DS1904 iButton has a built-in battery. Also, the Thermochron DS1921G.
#14
Posted 30 May 2013 - 07:55 AM
#15
Posted 30 May 2013 - 08:08 AM
...P.S. The DS1904 iButton has a built-in battery. Also, the Thermochron DS1921G.
Thanks, I really would prefer something with both crystal and battery inside the chip but it never occurred to me that some "Dallas keys" have that.
Those coins are really great but what about one wire support - is that doable on Netduino with latest firmware?
I recall seeing other devices with integrated battery but I can't seem to find any know. Do you know of any besides the Dallas keys?
#16
Posted 30 May 2013 - 10:48 AM
Found this "CAPHAT" device from ST in a DIP24 package and I2C interface:
http://www.st.com/we...ferrer=70071840
It has an integrated crystal and battery with automatic switch-over circuitry. It seems rather old and its very big due to the integrated battery (only 5 of 24 pins are used) and draws some 300uA which is quite a lot these days. On the other hand, it's a single chip breadboard friendly solution and it is in fact still active.
What you guys think about that one?
EDIT: ST also has these more advanced RTC chips with an optional SNAPHAT containing a battery (replaceable) and crystal that you snap on as a cover on top of the chip. A special version of the chip is then required that has SNAPHAT mounting pads on its top.
http://www.st.com/st.../CD00002304.pdf
#17
Posted 30 May 2013 - 08:26 PM
How about a really old one (IBM AT computer), the DS1287, DS1643 is similar
http://www.jameco.co...time-clock.html
and for more pricey ones,
http://para.maximint...ock&tree=timers
However, none of these can substitute for the outstanding temperature compensated stability and accuracy of the DS3232M; with of course the necessity for battery backup.
Regarding 1-wire support for the iButton, I just use the Picaxe 20X2 as a smart peripheral. 1-wire has been fully functional on these chips for years and they take a lot of the pain out of 1-wire. For example,
READOWSN - This command retrieves 1-Wire Slave device serial number. The command is available for virtually all PICAXE parts.
OWIN - This command reads data from a device on the 1-Wire network. The command is only available for X1 and X2 PICAXE parts.
OWOUT - This commands writes data to a device on the 1-Wire network. The command is only available for X1 and X2 PICAXE parts.
OWIN----Syntax:owin pin,mode,(variable, variable...)- Pin is a variable/constant which specifies input pin to use.- Mode is a variable/ constant which selects the mode.Each bit of ‘mode’ has a separate function:bit 0 - reset pulse sent before databit 1 - reset pulse sent after databit 2 - bit mode (receive 1 bit rather than 8 bits (1 byte))bit 3 - apply strong pullup after dataFor convenience these predefined constants may be used:0 ownoreset 1 owresetbefore 2 owresetafter 3 owresetboth 4 ownoreset_bit5 owresetbefore_bit6 owresetafter_bit7 owresetboth_bit- Variables(s) receives the data.code example------------; Read raw temperature value from DS18B20; (this achieves a similar function to the readtemp12 command)main:owout C.1,%1001,($CC,$44); send ‘reset’ then ‘skip ROM’; then ‘convert’ then apply ‘pullup’pause 750 ; wait 750ms with strong pullupowout C.1,%0001,($CC,$BE); send ‘reset’ then ‘skip ROM’; then ‘read temp’ commandowin C.1,%0000,(b0,b1) ; read in resultsertxd (#w0,CR,LF) ; transmit valuegoto main
The Picaxe suffers from a lack of ram, string handling and arithmetic power so I just hand off these tasks to a Netduino after getting the raw data. Here is a 1-wire tutorial, http://www.picaxefor...-Networks/page5. A lot of the convoluted coding in the tutorial is due to the aforementioned
limitations.
#18
Posted 02 June 2013 - 02:34 AM
#19
Posted 02 June 2013 - 08:11 AM
Yes, that's what I do. I am waiting for the SMD version of the 20X2 and plan to tuck it away in the in the upper left area of this proto shield,
http://openmicros.or...6-protox-shield
The 20X2 has a RS232 programming interface like the Mini, but without the MAX232 (or equivalent). It will accept TX/RX inputs from a regular USB to serial adapter, but they need to be inverted. The 20x2 hardware serial port connects directly to the Netduino. My current version of this is reading a pair of I2C devices (DS3232M clock and a 24LC256 EEPROM) in a loop on the Picaxe which outputs to Netduino,
12:41:08 AM -- 06/02/13
abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz 1234567891
Taking notice of the time, I must go to bed.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users