kyak changed the topic of #qi-hardware to: Copyleft hardware - http://qi-hardware.com | hardware hackers join here to discuss Ben NanoNote, atben/atusb 802.15.4 wireless, anelok and other community driven hw projects | public logging at http://en.qi-hardware.com/irclogs and http://irclog.whitequark.org/qi-hardware
Luke-Jr has quit [Remote host closed the connection]
Luke-Jr has joined #qi-hardware
Luke-Jr has quit [Ping timeout: 248 seconds]
Luke-Jr has joined #qi-hardware
wildlander has quit [Quit: Saliendo]
Luke-Jr has quit [Excess Flood]
Luke-Jr has joined #qi-hardware
Luke-Jr has quit [Excess Flood]
Luke-Jr has joined #qi-hardware
DocScrutinizer05 has quit [Disconnected by services]
DocScrutinizer05 has joined #qi-hardware
Luke-Jr has quit [Remote host closed the connection]
enyc has quit [Ping timeout: 250 seconds]
Luke-Jr has joined #qi-hardware
enyc has joined #qi-hardware
sandeepkr has quit [Ping timeout: 268 seconds]
<wpwrak> (writing to SD-card during system shutdown) you mean to save the time / cap state ? that would go to internal flash. SD would be way too slow and power-hungry
<wpwrak> (expensive components) please bear in mind that the BOM cost is something < USD 20
<wpwrak> (xtal sharing) i wish :) long ago i had just one xtal. alas, rfkill means that rf and MCUs each need their own set. maybe 32 kHz could be shared from MCU to RF.
<wpwrak> from sMCU that is
<wpwrak> (no alarm needed) true, for now there's nothing that actually needs to wake up after some time. but i'd rather keep that option, at least for a while. the idea is that anelok's functionality can evolve.
<wpwrak> an example: a common defense-in-depth feature would be to erase keys from memory as soon as they time out. so that would require a wakeup.
sandeepkr has joined #qi-hardware
sandeepkr has quit [Ping timeout: 244 seconds]
sandeepkr has joined #qi-hardware
wildlander has joined #qi-hardware
pcercuei has joined #qi-hardware
sandeepkr_ has joined #qi-hardware
sandeepkr has quit [Ping timeout: 240 seconds]
sandeepkr__ has joined #qi-hardware
sandeepkr_ has quit [Ping timeout: 246 seconds]
<DocScrutinizer05> yet to be seen if IRQ doesn't work at 1.3V
<DocScrutinizer05> INT actually
sandeepkr_ has joined #qi-hardware
sandeepkr__ has quit [Ping timeout: 276 seconds]
<DocScrutinizer05> I admit I didn't read the friggin datasheet too thoroughly - it was too fuzzy to be any fun to read
<DocScrutinizer05> a typical case of "get an evaluation board!"
<DocScrutinizer05> I don't see any special undervoltage circuit being mentioned anywhere in the datasheet, just a pretty clear "if Vbat >Vcc then Vbat will get directly switched to all the internal power rails of the chip"
<DocScrutinizer05> so the 1.8V is just a limit for the waranted electrical properties to be in specs
<DocScrutinizer05> IOW the chips are not tested&binned for any operation conditions outside those specs, but that doesn't mean the chip instantly stops working
<DocScrutinizer05> undervoltage anyway is inside ABSMAX still ;-)
<DocScrutinizer05> >> The device is fully accessible through the I2C interface whenever VCC is between 3.6V and 1.8V. I2C operation is not guaranteed when VCC is below 1.8V. The AS1801 maintains the time and date when VCC is as low as 0.9V.<<
<DocScrutinizer05> anyway watch out! >> The startup time is usually less than 1 second when using a crystal with the specified characteristics.<<
pcercuei has quit [Quit: beach time]
<DocScrutinizer05> relevant for cold startup
<DocScrutinizer05> ((BOM cost is something < USD 20)) yeah, I know about that BOM problem. A 1 buck more for a supercap is already quite hefty, but on the credit side of balance there are massively improved product specs
<DocScrutinizer05> anyway you're free to use a dual footprint here for 100uF standard X5R or a 11mF supercap. Possibly your customers will be happy to pay a 5 bucks more for having a decent bat-less grace time
<DocScrutinizer05> there's also another aspect that's also relevant for the original design with RTC in MCU: users regularly notice it's time for a bat swap only when device stops or already stopped working. With MCU RTC you already lost time when that happens. With CMOS RTC the time will stay accurate until battery voltage drops below 0.9V, and even then user has 1h minimum time to remove battery and find a fresh one to insert for one minute to
<DocScrutinizer05> recharge capacitor
<DocScrutinizer05> well, not exactly to the point. Should have rephrased "and even then", anyway you get the picture
<DocScrutinizer05> it's simple enough for hackers to swap the cap at home, DIY
<DocScrutinizer05> product variants seem feasible too
MistahDarcy has quit [Ping timeout: 260 seconds]
sandeepkr__ has joined #qi-hardware
sandeepkr_ has quit [Ping timeout: 252 seconds]
sandeepkr_ has joined #qi-hardware
<wpwrak> (bat swap) anelok can sense the battery voltage. so it can pretend that it needs replacing a little before it actually does :)
sandeepkr__ has quit [Read error: No route to host]
sandeepkr has joined #qi-hardware
<DocScrutinizer05> yes, that occurred to me too while writing
<DocScrutinizer05> the 1 to 10h bat-out time seem a pretty decent selling point to me though
sandeepkr_ has quit [Ping timeout: 244 seconds]
<DocScrutinizer05> also accuracy of the RTC, compared to any "embedded" solution which is commonly known to be inferior
<DocScrutinizer05> and last not least the massively less complex software requirements
<DocScrutinizer05> not even thinking about R&D verification and debugging effort
<DocScrutinizer05> it's almost impossible for me to list the set of test conditions that need to get verified for the embedded MCU clock design
<DocScrutinizer05> while for the RTC design such list comes natural since no housekeeping aka "shop closing" needed at all, as well as no time critical stuff during resume/power-up
<DocScrutinizer05> particularly for the MCU clock design you need to verify the software to be free of any race conditions or deadlocks or other flaws, which most probably can even be proven to be impossible to get done
<DocScrutinizer05> especially when you have other restrictions too, e.g. transactions that can't or must not get aborted by a NMI
<wpwrak> if it's power out, pretty much everything can get aborted ;-)
<wpwrak> anyway, the nice and simple RC solution looks quite sufficient for now. if it should turn out to be trouble, there'll always be time later to try something else. even better, the algorithm can be gradually improved, as needed.
<DocScrutinizer05> is it possible to abort NAND writes? communication to display?
<DocScrutinizer05> are NAND writes verified to work during massive Vcc fluctuations?
<DocScrutinizer05> even when a previous series of NAND writes had to get aborted?
<wpwrak> you mean the internal NOR ? no, not really. but they're fast. the display should be gently shut down, says the data sheet. but it doesn't seem to mind unclean shutdowns. otherwise, i'd probably have noticed by now ;-)
<DocScrutinizer05> what ebout a page erase in progreess? can you abort that and write to flash instead?
<DocScrutinizer05> are all the routines in your OS reentrant?
sandeepkr has quit [Quit: Leaving]
<DocScrutinizer05> none blocking IRQs?
<DocScrutinizer05> I prolly could go on ad infinitum
<wpwrak> sector erase needs high power for some 13 ms
<DocScrutinizer05> sure it *can* get done, the question is how reliable it is and how much effort you need to put in to make it reliable and even prove that it is
<wpwrak> and i try to do that as little as possible, to not wear out the flash. so this means that the probability of a concurrent flash erase at battery removal is basically zero. even if the battery removal results from a fall or such.
<DocScrutinizer05> when time keeping is of such paramount importance, I'd rather rely on a plain simple hw solution, even when it costs 1.50 more
<wpwrak> time can get lost. i mean, you can have a stroke while in the midst of battery removal. in fact, that's probably more likely than the scenarios you're dreaming up :)
<DocScrutinizer05> yes, exactly, and it will happen way more often than you are dreaming up, with a bat-out time of max 30s
<wpwrak> the current thing should be good for something like a minute, probably more
<DocScrutinizer05> I still think such a usage scheme is not feasible without a decent pre-fail signal made from sort of mechanical switch that detects battery removal before it happens
<wpwrak> and yes, if you don't manage to put in a new battery after all that time (or at least put back the old one), then you'll be greeted by the blinking 00:00 ;-)
<DocScrutinizer05> that's the minimum needed
<DocScrutinizer05> also:
<DocScrutinizer05> >>BATTERY EMPTY! Needs replacement
<DocScrutinizer05> You can't use the device for longer than one minute now, soon you can't use it at all.
<DocScrutinizer05> Please remove the two screws on bottom and open up case, swap battery for a new 1.5V AAA.
<DocScrutinizer05> **Do not leave device without battery (new or old one) for more than 30s!** <<
<DocScrutinizer05> also dim or shut down backlight when low battery
<DocScrutinizer05> ((put back old one)) good point I probably hadn't thought about if I was in such situation that the new battery slips away and falls under the desk while swappinng
<wpwrak> it's an OLED. there is no backlight :)
<DocScrutinizer05> aaah right
<wpwrak> i can dim it a little, but it's almost imperceptible
<DocScrutinizer05> the question is if it reduces power consumption
<DocScrutinizer05> imperceptable? good! :-)
<DocScrutinizer05> you also want to block all block erases and possibly all "normal" writes during bat-low state
<wpwrak> naw, a bit of regular nagging should do. most people will ignore it, and have anelok shut down on them, forcing them to get a new battery
<wpwrak> however, those who care are likely to pay attention, and not risk unplanned shutdowns
<wpwrak> it all depends on the use case. most people can get new batteries quickly, and have access to accurate time. so none of this troubles them overly. many of them will find having to set the time disproportionally inconvenient, though. that's why i'm making an effort to spare them this experience.
<wpwrak> but if they still don't cooperate, well, it's their loss :)
<wpwrak> and then you have the fringe cases. they're important due to their marketing value. if james bond would choose anelok, that gives you a good feeling about it, right ? even if the number of attempts on your life had been fairly low so far
<wpwrak> so the goal is to maximize that fringe utility without making the thing "expensive" for the rest
<DocScrutinizer05> makes sense
<DocScrutinizer05> but by same rationale you should request that users enter a battery change mode before removing battery
<DocScrutinizer05> btw how is battery change soved mechanically?
<DocScrutinizer05> solved even
<DocScrutinizer05> I guess my "two screws" approach above isn't close to reality?
<DocScrutinizer05> (if it was, it's simple enough to have a pre-fail that fires when case gets opened
<DocScrutinizer05> )
<wpwrak> yes, two screws :) if you look really carefully, you can see them: http://downloads.qi-hardware.com/people/werner/anelok/tmp/case-interim/case-20150714.png
<wpwrak> just a bit above the battery, pointing upwards
<DocScrutinizer05> then how about a button meander on PCB and a patch of cunducting foam on the lid?
<wpwrak> unproven materials. in any case, i expect power to ramp down slowly in comparison to MCU reaction time
<DocScrutinizer05> or the other way around: a spring lever (wire) soldered over a hole in PCB and when the notch from lid doesn't press that spring up from PCB surface anymore, it touches surface and closes a contact
<wpwrak> i'll have some 1.3+ V to clean up. even if the initial fall is very quick, the MCU can then shut down stuff and gain time. massively, going from tens of mA (worst case) to tens of uA
<DocScrutinizer05> or simply have a conductive painting or washer on the lid bolt that holds the screw, and a two patches of plain copper trace next to the hole in PCB. Those get shorted when lid is closed and screwed tight
<wpwrak> naw, let's keep things simple :) we have caps to give us a bit of time. all that needs to happen is to survive the initial drop, then establish control. after that it's smooth sailing
<DocScrutinizer05> how much simpler than two traces and a washer can it possibly get?
<whitequark> two patches of trace... that will corrode and become unreliable
<wpwrak> and chances are the initial drop will be gentle as well
<whitequark> like just ambient city air is enough, over a few years, not to mention more humid or more polluted places
<whitequark> or god forbid someone use something slightly corrosive nearby
<DocScrutinizer05> whitequark: I've seen washer and screw contacts to traces since ages, they seem to work reliably
<whitequark> I'm really doubtful of the idea, I've seen many purposebuilt connectors based on exposed copper fail
<whitequark> like cardedge
<DocScrutinizer05> tin coating
<whitequark> better but still bad
<whitequark> hm
<whitequark> if you do ENIG plating then the board side should be fine pretty much forever
<DocScrutinizer05> all sorts of AMP connectors are mounted to PCB exactly that way
<wpwrak> whitequark: except if there's that washer, scraping off the gold :)
<whitequark> I've never seen a cardedge connector with *tin* coating. I've seen ENIG and some crappier plating
<whitequark> and some really cheap ones using bare copper, almost always oxidized and/or corroded
<DocScrutinizer05> the tin is sufficiently immune to deep corrosion, and the steel washer pierces the surface oxide and makes decent contact
<whitequark> pierces it and exposes it to further corrosion?
<whitequark> and also puts force on the PCB?
<whitequark> I'm not fond of this idea at all
<DocScrutinizer05> errr
<DocScrutinizer05> well, it's a proven industry standard since ages
<wpwrak> there's almost no cost difference between gold and tin. so for the PCB i'd go for gold. though i'd definitely avoid mechanical interactions.
<whitequark> I would want a reference on that washer being "industry standard" :)
<whitequark> cardedge yes, but it doesn't use this sort of uncontrolled force
<DocScrutinizer05> when you go for gold plating, you need a flat washer, not one of those that have teeth
<whitequark> and it needs plating on both the contacts and the board
<whitequark> how does a flat washer 'pierce' the oxide?
<wpwrak> (no difference) as far as PCBs are concerned. of course, it you go by ccm, kilo, or such, then yes, there is ;-)
<DocScrutinizer05> uncontrolled force??
<DocScrutinizer05> seems you have a wrong idea of what I had in mind
<whitequark> yes. compared to e.g. the springs in a cardedge receptacle
<whitequark> springy contacts, I mean. those have a force that is limited by design
<whitequark> whereas if you have a screw, the force is only limited by impatience of whoever's screwing it down
<DocScrutinizer05> you're mixing up three things now, do you?
<whitequark> < DocScrutinizer05> or simply have a conductive painting or washer on the lid bolt that holds the screw, and a two patches of plain copper trace next to the hole in PCB. Those get shorted when lid is closed and screwed tight
<whitequark> going off just this one suggestion
<DocScrutinizer05> so what? this is pinching the PCB between two solid points, not bending it
<DocScrutinizer05> it can prolly withstand a ton of force like this, per cm^2
<whitequark> okay, that's true. but I still don't see how a flat washer would defeat the oxide layer
<DocScrutinizer05> which oxide layer? AuO2?
<whitequark> if we're going with ENIG then your idea works, yes
<whitequark> the washer should also have a good plating
<whitequark> nickel probably works, or even a pure nickel washer
<DocScrutinizer05> nickle will do
<DocScrutinizer05> which basically is all washers you ever seen
<wpwrak> i'll trust the caps :) i have some 60 uF sitting there. you can't empty that fast enough to make the low voltage interrupt come too late. then, a few us later, lots of things will get shut down and stop drawing power
<wpwrak> at that time the MCU will still be some ~1 V above minima. it could now calculate the remaining digits of Pi, find a cure for cancer, or whatever MCUs do when they're really bored and in absolutely no hurry :)
<DocScrutinizer05> frequently used on PCB with tin coating and tooth washer and screw+nut
<DocScrutinizer05> since literally a century almost
<DocScrutinizer05> often found integrated into standard PCB mounting: http://www.mikrocontroller.net/attachment/281300/zu-wenig-kleber.JPG
<DocScrutinizer05> https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSyd6fj30YOKEDmsTfA4rCQ78J8R_Z5dVP0396Wtg-IX393utcNf-bwCw washer
<DocScrutinizer05> with ENIG you want something like this https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQPyquu2W2XtDJ7ekZrlb-WuKqv7gwppGxz4BKLUbSprj5CYfTsSdDa6Q
wildlander has quit [Quit: Saliendo]
<DocScrutinizer05> or this https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS2aNedoP77wt18lquJjbp96Q6eeeGVEoYT8WXKKc72toIjeMJ8avCJng_KCg
<DocScrutinizer05> you could even have two simple contact rings around the two screw holes in PCB, paint a conductive trace from one screw holding bolt to the other on lid, and use two of those https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQVplFjWtXVFZgDeO8QfEs4q-5Pn-jf-B6MzKp4GY9M6FCRFic0uIDuNsdpOA
<DocScrutinizer05> maybe you want to spraypaint the lid resp lower part of case with conductive paint anyway, to improve shielding
<DocScrutinizer05> from inside
<DocScrutinizer05> I heard case is made of acrylic and painted from inside anyway. Graphite paint would come to mind
<DocScrutinizer05> since we're talking several 100s of kOhm here anyway, for a normally-closed sensor, any such graphite paint and plain flexible/spring washers on both mounting holes would do
<DocScrutinizer05> you want one anyway, for grounding the shielding ;-)
<DocScrutinizer05> use the second for sensor instead of yet another grounding point
<DocScrutinizer05> BOM: zilch
<DocScrutinizer05> well, maybe two washers a 0.3ct
<DocScrutinizer05> which you want anyway for grounding the shielding
<whitequark> graphite paint, for particles to flake off and introduce faults
<whitequark> planned obsolescence at its finest!
<DocScrutinizer05> there's different kinds of grapphite spray, the one without binder to deposit loose graphite, and the one with binder to stay and act as shielding, explicitly mentioned as one of the primary usecases
<DocScrutinizer05> if you don't like black graphite, use silver alu
<DocScrutinizer05> but yes, on *flexible* surfaces like rubber mats, all those sprays perform very poorly
<DocScrutinizer05> particularly when you apply too much of the spray
<DocScrutinizer05> ever wrote with a paint marker on a balloon? it's absolutely water and wipe resistent - until you deflate the balloon
<DocScrutinizer05> ((rubber mats)) I talk from own experience
<whitequark> ah, didn't know about the one with binder
<whitequark> those seem alright but labor intensive to apply
<DocScrutinizer05> when you're ever going to fix an appliance remote control rubber mat, use a bin or cup to spray the graphite in, then take a fine brush and only gently paint the contact spots on the mat
<DocScrutinizer05> ((labor intensive)) well, very similar to any spray paint
<DocScrutinizer05> OT: #panamapapers LOL
infobot has quit [Ping timeout: 244 seconds]
infobot has joined #qi-hardware
infobot has quit [Quit: cyal8r]
infobot has joined #qi-hardware