<wolfspraul>
wpwrak: hmm. is it possible that that is just this greylisting stuff?
<wolfspraul>
where does this error msg come from - did you get a final "cannot be delivered" back into your mail client?
<wpwrak>
so far it's just trying to connect. is it MTA running ? on turandot, telnet localhost 25 -> telnet: Unable to connect to remote host: Connection refused
<wpwrak>
and the mail hasn't timed out yet on my side. don't remember what timeout i set. probably something relatively large
<wpwrak>
yeah, 5 days :)
<wpwrak>
but it'll start complaining after 4 hours
sulky has quit [Ping timeout: 260 seconds]
sulky has joined #qi-hardware
<DocScrutinizer05>
seems there's really stormy weather in the internets, eh?
<wpwrak>
looks more like some system upgrade at qi-hw, and the usual fallout such things produce
mth has quit [Ping timeout: 260 seconds]
mth has joined #qi-hardware
<wpwrak>
hmm, i wonder if AAA + diode + polyfuse would work for battery reversal protection
<wpwrak>
(as alternative to an "ideal diode")
fengling has joined #qi-hardware
<wpwrak>
the sub-question there is what the damage mechanism is for battery reversal. i.e., what sort of current has to flow through the reversed AAA battery to actually do damage to the circuit
<wpwrak>
but i suspect that relatively little may be sufficient, i.e., a few hundred mA
MistahDarcy has quit [Read error: Connection reset by peer]
fengling has quit [Ping timeout: 240 seconds]
doomlord has joined #qi-hardware
<wpwrak>
wolfspraul: thanks ! :)
fengling has joined #qi-hardware
archang has joined #qi-hardware
<whitequark>
wpwrak: there are ideal diodes.
<whitequark>
well, "diodes" with zero drop. they're available. it's actually a fet in a diode package
archang has quit [Ping timeout: 244 seconds]
<wpwrak>
got an example ?
<wpwrak>
looking for "ideal diodes" i found some parts, but usually stuff that's far out of the range we'd need here
doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wpwrak>
ti's data sheet is from 2012. so maybe around 2030, when the patents expire, we'll see more such smart diodes ...
<wpwrak>
the maxim circuit with boost converter is interesting. haven't thought of that.
<wpwrak>
the FET circuits all have the problem of low voltage. it's hard to find FETs that are happy to admit ~ 1 A with a low drop and Vgs <= 1 V
<wpwrak>
a radically different approach would be to block this mechanically
<wpwrak>
not sure how well that would work, though. the "nipple" of an AAA cell is supposed to stick out by >= 0.8 mm. so an obstacle of about 0.5 mm around the contact should work. however, i don't remember ever seeing such an arrangement in real life. there may be a reason for it.
<whitequark>
yeah, the voltage is troubling
<whitequark>
oh, I remember now the proper name for the device I was looking for
<whitequark>
"MOS Rectifier"
<whitequark>
they do have lower Vf than regular Schottky diodes but I think not lower enough
<wpwrak>
i found no p-FET that looked truly convincing
<wpwrak>
i found two n-FETs that may be okay
<whitequark>
oh right, you have an AAA battery, not li-ion
<wpwrak>
but i wonder if there may be an easier solution. that variant with providing the gate voltage from the boost converter looks interesting. not quite sure if it would actually work, though. the path of components that are borderline operational gets fairly long.
<wpwrak>
yup. if i had 3.7+ V to burn, there would be no worry at all ;-)
<wpwrak>
the big concern is to avoid choking the battery too early. e.g., when current demand is high, battery voltage drops in the battery and then again at the FET. the resulting lower boost Vin makes it draw even more current. worse, since that reduced voltage is also Vgs, the FET becomes more resistive, further increasing drop and current demand
archang has joined #qi-hardware
wej has quit [Ping timeout: 268 seconds]
wej has joined #qi-hardware
rjeffries has quit [Ping timeout: 276 seconds]
<eintopf>
mhh, I like smartphones which getting hot when I turn on GPS. Then I have something to heat me up at the bus station when its winter
<kyak>
it get hot because of GR effects. You phone travels in time and space, and it is quite hot there
<kyak>
while waiting for a bus, don't forget what's your phone is going through
sandeepkr has joined #qi-hardware
<xiangfu>
wpwrak: Hi
<xiangfu>
wpwrak: we got 15 N900. one of them is very bad. the others looks like ok. but all used devices. vc.cheng@can.... should be send one email to you. with pictures.
<xiangfu>
wpwrak: let me know what should I do next?
<xiangfu>
but it is not easy to get 200 of them. I buy them slowly...
<wpwrak>
are all 15 from the same source ? and have they been cleaned properly, i.e., are they of similar quality as the refurbished we looked at some months ago ? or are they worse ?
<wpwrak>
(not easy) the messier the sourcing, the greater the glory ;-)
pcercuei has joined #qi-hardware
<whitequark>
wpwrak: the boost circuit really shouldn't draw any current
<whitequark>
maybe microamps. it has to run the charge pump once, and afterwards its job is done
xiangfu has quit [Remote host closed the connection]
pcercuei has quit [Quit: bbl windows]
fengling has quit [Ping timeout: 240 seconds]
doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pcercuei has joined #qi-hardware
fengling has joined #qi-hardware
pcercuei has quit [Quit: brb]
pcercuei has joined #qi-hardware
<eintopf>
it's not a good idea to glue your usb hubs on your table with a velcro fastener powerband...
archang has quit [Ping timeout: 248 seconds]
dandon_ has joined #qi-hardware
enyc has quit [Ping timeout: 250 seconds]
dandon has quit [Ping timeout: 250 seconds]
dandon_ is now known as dandon
enyc has joined #qi-hardware
infobot has quit [Ping timeout: 250 seconds]
fengling has quit [Ping timeout: 240 seconds]
doomlord has joined #qi-hardware
<wpwrak>
eintopf: why not ?
<wpwrak>
whitequark: yes, it all should work. but i imagine that there could be little quirks like the boost regulator trying to pull significant current in startup or such, and cycling back if it can't (because the FET isn't fully open yet)
<wpwrak>
so such a circuit would need careful testing, to check that there aren't such quirks while in borderline conditions
<wpwrak>
but i still very much like the idea to increase the gate voltage this way. that solves a LOT of problems ;-)
fengling has joined #qi-hardware
fengling has quit [Ping timeout: 240 seconds]
<eintopf>
wpwrak: it's too strong
<eintopf>
I tried to remove it again and the whole case creaks in two pieces
<eintopf>
s/creaks/breaks/
<qi-bot>
eintopf meant: "I tried to remove it again and the whole case breaks in two pieces"
<eintopf>
but I have it now
<eintopf>
I need some knife to remove it :-)
<wpwrak>
ah, the idea is to make this permanent :)
fengling has joined #qi-hardware
<DocScrutinizer05>
hmmm >> At t2: When the voltage on the capacitor C1 reaches its predetermined lower level, the FET driver shuts off the FET. The bypass current will then begin to flow through the body diode of the FET, causing the FET body diode voltage drop of approximately 0.6V to appear across ANODE and CATHODE. The charge pump circuitry is re-activated and begins charging the capacitor C1. This cycle repeats until the shade on the panel is
<DocScrutinizer05>
removed and the string current begins to flow through the PV cells instead of the body diode of the FET.<<
<DocScrutinizer05>
wpwrak: why the heck you need 1A?
<wpwrak>
i need a bit less, something like 800 mA
<DocScrutinizer05>
ugh, that's much
<wpwrak>
Ibat(max) = 120 mA / Vbat * 3.3 V / efficiency / duty_cycle
<DocScrutinizer05>
which duty cycle?
fengling has quit [Ping timeout: 240 seconds]
<wpwrak>
the "charging" part of the inductor
<DocScrutinizer05>
there's capacitors for that
<wpwrak>
ah yes, that was the formula for inductor / switch current
<wpwrak>
so for the battery it's a bit less ...
<DocScrutinizer05>
I hope so, you won't find a AAA that behav4es under such conditions
<wpwrak>
~550 mA (assuming 80% efficiency)
<wpwrak>
check the AAA short-circuit curve ;-)
<DocScrutinizer05>
you need to check _all_ those curves, unless you specify an approved battery brand and type for your device
<DocScrutinizer05>
iirc a 500mA are about max to draw from a AAA
<DocScrutinizer05>
that diagram only mentions Ampere but no voltage
<DocScrutinizer05>
and it's Varta, a known semi-devcent cell manuf
<DocScrutinizer05>
actually you can read the diagram as "initial internal Z of cell: 100mOhm, after ~4 minutes 1 Ohm"
<DocScrutinizer05>
cells of slightly lower quality might already start with 1 Ohm out of the blister
<DocScrutinizer05>
particularly zink carbon cells
<DocScrutinizer05>
not every battery is alkaline even today
<DocScrutinizer05>
sorry I'm not on qi-hw ML
sandeepkr has quit [Quit: Leaving]
<DocScrutinizer05>
I still wonder what draws such huge amount of power in your device
<DocScrutinizer05>
you must have a power hog you should disable by default and only power up on user request
<DocScrutinizer05>
if it's backlight, it's prolly a good measure to only enable it when ambient light is low, and definitely keep it disabled during device ramp-up and when battery voltage is low
<DocScrutinizer05>
only 350mA but seemingly safe chemistry
<wpwrak>
(fet charged) yes, anelok can ramp up "nicely". but "setting up" the FET is actually something that happens even earlier, long before the MCU even begins to reset
<DocScrutinizer05>
toldya, use a pushbuttom to power up, it can even generate 2*Vbatt on gate
<wpwrak>
it's kinda funny that all three refer to fire, either directly in the name or in the logo ;-)
<DocScrutinizer05>
...for long enough to boot the MCU
<wpwrak>
pushbutton wouldn't really help. this is between battery, fet, and boost converter. there is no change in the configuration of the boost converter.
<DocScrutinizer05>
hm?
<wpwrak>
the boost converter starts enabled (unless there is usb power)
<wpwrak>
and only the presence of USB power can turn it off
<DocScrutinizer05>
so?
<DocScrutinizer05>
I don't get it
<wpwrak>
so such a hypothetical button wouldn't affect what happens at this early system bringup
<DocScrutinizer05>
errr
<DocScrutinizer05>
what for is tha FET then?
<wpwrak>
to protect against battery polarity reversal
<DocScrutinizer05>
ohmy
<wpwrak>
i was thinking of also using it to disconnect the battery, but it seems that this would get too complicated. in any case, even if i do this, it would be controlled by the presence of a good USB voltage.
<DocScrutinizer05>
you know each decent device doesn't allow to reverse AAA batteries since the button on plus is the only thing that can touch the battery contact?
<wpwrak>
i use a reset generator for detecting USB voltage. that way, i won't get funny things happening on connect / disconnect, when USB ramps through Vgs(th). had issues there in the CR2032 design, and it would only get worse in the AAA design
<DocScrutinizer05>
[2016-03-23 Wed 18:00:12] <DocScrutinizer05> besides that, a fuse plus reversal diode is the means of choice to protect from battery reversal
<wpwrak>
i'm not so sure about diode + fuse. it would seem that a partially spent battery may end up just producing enough reverse current to do damage, yet wouldn't trip the fuse
<DocScrutinizer05>
I think my last comment on all this was to recommend battery change only when attached to USB, to keep RTC running. When a user doesn't follow that recommendation, they will have to adjust date and time anew after battery inserted
<wpwrak>
(mechanical prevention) i wonder about that. i don't recall ever seeing that done in practice, though the mechanical design of the AAA (et al.) cells clearly suggests such a design
<wpwrak>
no, i don't want to require USB power
<DocScrutinizer05>
a schottky is supposed to be <0V5 which is well within allowable voltage range in every chip I know
<wpwrak>
you should be able to change batteries in the field, without preparation
<DocScrutinizer05>
well, you can do this
<DocScrutinizer05>
I honestly don't see how you want to keep RTC running without a decent power source
sandeepkr has joined #qi-hardware
<wpwrak>
(schottky) yes, but i also want to make sure the fuse trips. wouldn't be so nice if the battery merely fast-discharges through the schottky.
<DocScrutinizer05>
maybe get a Dallas chip ;-)
<wpwrak>
i have caps to hold power for a litte while
<DocScrutinizer05>
I don't want to have to cope with such worries you seem to have
<wpwrak>
and a FET before them, to isolate the MCU from the rest of the system
<wpwrak>
we'll get to this when debugging neo900 power ;-)
<DocScrutinizer05>
IF a battery has a button on minus (instead of flat plate) so it could make contact from minus pole to plus battery contact mechanically, AND the battery is already empty enough so it doesn't trip fuse, then you don't want that battery to get discharged
<DocScrutinizer05>
no, we won't get to this with Neo900 power
<DocScrutinizer05>
been there, done that
<DocScrutinizer05>
I'd be more worried about somebody inserting a 9V AAA than about discharging a weird mechanical nonstandard half-empty secondary 1.5V AAA
<DocScrutinizer05>
odds are the user completely depleted the battery anyway before even noticing she needs a new battery, so RTC is void in either case
<wpwrak>
(trip) let's see ... battery: Vinternal = 1.5 V, Rinternal = 1 Ohm; fuse: Ihold > 600 mA; diode: Vf@Ireversed = 0.5 V. so the short-circuit current through the diode would be (1.5 - 0.5 V) / Rinternal = 1 A.
<wpwrak>
so the difference between Itrip and Ihold would be only 400 mA. difficult to find a fuse that's that selective.
<DocScrutinizer05>
and when you want user to take care about not losing the date and time while battery swapping, provide a "swap battery" function user needs to activate before removing battery, which will store the current date and time to non volatile storage and recovers it from there during power-up after new battery inserted. will be off a minute maybe
<DocScrutinizer05>
the fuse is only to avoid damage to the device, not to protect a half-dead battery
<DocScrutinizer05>
keep in mind that with proper mechanical design it's virtually impossible to reverse battery
<DocScrutinizer05>
only needs a 10mm^3 of plastic to form a stopper that keeps minus plate of battery from touching the plus battery contact of device
<DocScrutinizer05>
unless you do extremely weird things, you _cannot_ reversa a AAA cell in device
<wpwrak>
one minute would be very long. e.g., TOTP has a default time increment of 30 s.
<DocScrutinizer05>
ohmy, then add a adjustable offset, let user guess
<DocScrutinizer05>
measure discharge of a capacitor and calculate the battery off time, simple as that
<wpwrak>
(mechanical prevention of battery polarity reversal) have you seen anything like this in real life ? even high-end equipment seems to have very reversal-friendly contacts. i wonder why
<DocScrutinizer05>
because they are fools? I've seen it in ~80% of my devices
<DocScrutinizer05>
you usually don't even notice it
<wpwrak>
(cap) hmm ! now that's an interesting idea ! i like that :)
<DocScrutinizer05>
yeah, a funny simple concept I just invented in a fraction of a second
<DocScrutinizer05>
actually best part of (18:31:57 - 18:31:31 ) taken by typing
<DocScrutinizer05>
you can start discharge at very moment you take the timestamp, before you write said timestamp to storage
<wpwrak>
something like 47 uF vs. 1 MOhm should do the trick for times in the order of 1 minute
<DocScrutinizer05>
I guess you could even use 10M
<DocScrutinizer05>
AD-inputs are high impedance, no?
<wpwrak>
i should probably only activate ADC briefly. lemme check ...
<wpwrak>
without ADC, input leakage is 1 uA or maybe 25 nA (25 C).
<DocScrutinizer05>
charge, measure voltage and stop charging, wait 2s and measure voltage again [1], then charge again, take timestamp from RTC [2] and stop charging, write [1] and [2] to storage
<DocScrutinizer05>
hmm, no, [1] needs to be a derived value from both voltage measurements
<DocScrutinizer05>
representing the percentage of discharge during 2s
pcercuei has quit [Quit: leaving]
<DocScrutinizer05>
and actually you need the absolute voltage too, in storage, to know a reference later on
<wpwrak>
spec also applies to ADC, so real-life leakage should not be much higher than 0.1 uA. so yes, maybe 2 or 3 MOhm should work fine.
<DocScrutinizer05>
so store both voltage at t0 and voltage at t2s as well as timstamp to storage
<wpwrak>
yes, the critter needs to recalibrate every once in a while. not a big deal, though.
<wpwrak>
the trickiest bit is avoiding messing up that cap when the system ramps up/down
<DocScrutinizer05>
hmm yes
<wpwrak>
but even if we don't take precautions, having a calibration happen while the rail changes dramatically should have a pretty low probability. prolly better than 1e-5
<wpwrak>
(all that assuming nothing nasty happens for too long when the MCU is below safe operating voltage)
<DocScrutinizer05>
you should spend a 2 GPIO, one for "power" and one for "gate", where the switch (FET) charges on power != gate
<wpwrak>
yes, that could be an option
<wpwrak>
in any case, a sufficiently large cap would also be immune to very brief GPIO upsets, given that Ron of the GPIOs is around 100 Ohm.
<DocScrutinizer05>
well, or you simply connect the AD/GPIO to capacitor via 3M and have a small capaicor (for glitches) and a 47kR from AD/GPIO to GND
<wpwrak>
but having an extra fet would also help to keep the "high" cap voltage from a powered-down MCU. it has no upper clamp diodes, but you never know what else may happen
<DocScrutinizer05>
err uh, that idea of mine would spoil the AD probing :-/
<wpwrak>
and it would make charging a lot of work :)
<DocScrutinizer05>
so use a GPIO with all that birdseed for charging/discharging and a separate AD input to capacitor via 10M for measuring
<DocScrutinizer05>
aah yes, chatging takes a while then, but then, who cares
<DocScrutinizer05>
keep capacitor charged all the time
<wpwrak>
seems easier and safer with one measure/charge pin and one to switch a FET
<wpwrak>
also, i'm pretty limited when it comes to IO pins
<DocScrutinizer05>
maybe not
<DocScrutinizer05>
you need two pins for both concepts
<wpwrak>
if i have a direct charging pin, then i could use that as well for measuring
<DocScrutinizer05>
that's the initial idea
<wpwrak>
so if separating the two, that's ADC + charge + switch(FET). not so nice
<DocScrutinizer05>
you don't need a FET when charging takes "ages"
<DocScrutinizer05>
short glitches will be irrelevant then
<wpwrak>
ah, i see what you mean
<DocScrutinizer05>
3 resistors (the 47k from charging GPIO to GND for proper discharging during MCU down) and 2 pins is all you need
<DocScrutinizer05>
add a small capacitor in parallel to the 47k for even better glitch immunity
<DocScrutinizer05>
hmm maybe that's a bad idea, it will buffer any glitch and extend its duration
<DocScrutinizer05>
so no small capacitor in parallel to 47k
<DocScrutinizer05>
if you could make sure the GPIO is tied to GND via a strong pulldown in all MCU glitch resp reset situations, you can even leave out that 47k
<DocScrutinizer05>
and use one pin only
<wpwrak>
after reset, gpios are high-Z. so, no
<wpwrak>
but yes, the rest should work
<wpwrak>
on power loss, the MCU needs to save the whole data set to a pre-erased flash page. takes some 70 us per longword on average. the usual optimizations apply.
<wpwrak>
so that doesn't look too bad
<wpwrak>
nice idea, thanks !
<DocScrutinizer05>
yw
<DocScrutinizer05>
CC by attribution
<DocScrutinizer05>
;-))
<wpwrak>
in the post where i explain the part ? alas, there's no document explaining the whole system. not enough hours in a night :(
fengling has quit [Ping timeout: 240 seconds]
<DocScrutinizer05>
wherever you feel it's appropriate
<DocScrutinizer05>
it's just a ;-) thing
pcercuei has joined #qi-hardware
<DocScrutinizer05>
do you have a power-good signal which tells you when battery removed, by getting drawn to GND? If yes, you might want to connect the 47k pulldown to that signal instead of GND, so you don't get quiescent currents during normal operation (battery inserted)
infobot has joined #qi-hardware
<wpwrak>
yes, i thought of that, too. the boost converter i'm considering has a "battery good" signal. i think it may be used for something like this, but need to check some more.