DS1307 Battery Backed GPIO (optocoupler then relay)

it's my way to use the DS1307 OUT pin in battery backed mode, the original problem was drawing just microcurrent, i used a custom optocoupler made with a green waterclear LED and a photoresistor then a Hi-V circuit to drive a mains powered relay (that is the expensive piece, the higher the coil voltage the more expensive is the relay)

of course you need to read the "overwhelmingly complex" :slight_smile: datasheet to know how to use that pin in static mode

is this useful? i don't know, it may be used to "configure" a mains powered apparatus in standby mode,
of course the pin cannot be toggled while in battery backed mode... it must stay on or off
(you can also use a bistable relay instead :smiley: )

the Hi-V circuit draws some negligible current, it would be nice to use a TRIAC but they don't like that much relays

anyways the DS1307 sucks!! it's so unprecise that even if fitting 100pF caps on the crystal pins it will still run hell fast, without caps it will error up to something like 1 minute per day (use a DS3231 instead)

details on video