Production Line
I started getting my act together as I assembled the first watch. Like there's a lot of random small work that needs to be done for the watch to come together fully and I finally serialized all the boards and batteries, and I made a log that acts like both a test procedure and rework log of each serial number. This will help me keep track of the units as I assemble them and also make it easier to see trends. On the software side I finally got svn too so I can comment my commits and know exactly what code is deployed to which watch. This comes in handy as I'm testing the last little bits of functionality but it'll mainly be needed since each code is specific to each watch thanks to my dependency on the 3v3 line's exactly voltage. Below you'll also see pics of the first serial number coming together. I'm trying out a thin acrylic sheet instead of the gorilla glass but the acrylic is 0.01" thicker than the glass so I got worried about tolerance. Seems like we're ok down to about half a millimeter but even that I think is merely squishing of the power coil on the back against the ferrite sheet. Anyway, I'm not worried about it, glad the tubes are not being stressed like SN00.
I started getting my act together as I assembled the first watch. Like there's a lot of random small work that needs to be done for the watch to come together fully and I finally serialized all the boards and batteries, and I made a log that acts like both a test procedure and rework log of each serial number. This will help me keep track of the units as I assemble them and also make it easier to see trends. On the software side I finally got svn too so I can comment my commits and know exactly what code is deployed to which watch. This comes in handy as I'm testing the last little bits of functionality but it'll mainly be needed since each code is specific to each watch thanks to my dependency on the 3v3 line's exactly voltage. Below you'll also see pics of the first serial number coming together. I'm trying out a thin acrylic sheet instead of the gorilla glass but the acrylic is 0.01" thicker than the glass so I got worried about tolerance. Seems like we're ok down to about half a millimeter but even that I think is merely squishing of the power coil on the back against the ferrite sheet. Anyway, I'm not worried about it, glad the tubes are not being stressed like SN00.
ADC Reading
I had been worried about the battsense line and the weird blip I noticed last time. The 4 scope shots below are the battsense line off of a 33/43 voltage divider going to the ADC. This line measures the battery level so it needs to be pretty accurate. The micro's datasheet says that it can read 10-100k of impedance with an ADC clock set to anywhere between 50-200khz but as you can see below, the voltage does not settle all the way before the reading happens if I use an ADC clock of 125khz so I've slowed it to 62.5khz. This has has made each ADC read half as fast which means reading each axes of the accel + battery now takes like 1.6ms. This is really slow considering I do a accel read between each round of tube firings but whatever, the brightness hasn't taken too much of a hit and the up time on the micro is not the worst. I still don't get the big gulp of current at the beginning causing the voltage to droop (guessing first cap to fill for SAR, not sure) but I had to move on.
I had been worried about the battsense line and the weird blip I noticed last time. The 4 scope shots below are the battsense line off of a 33/43 voltage divider going to the ADC. This line measures the battery level so it needs to be pretty accurate. The micro's datasheet says that it can read 10-100k of impedance with an ADC clock set to anywhere between 50-200khz but as you can see below, the voltage does not settle all the way before the reading happens if I use an ADC clock of 125khz so I've slowed it to 62.5khz. This has has made each ADC read half as fast which means reading each axes of the accel + battery now takes like 1.6ms. This is really slow considering I do a accel read between each round of tube firings but whatever, the brightness hasn't taken too much of a hit and the up time on the micro is not the worst. I still don't get the big gulp of current at the beginning causing the voltage to droop (guessing first cap to fill for SAR, not sure) but I had to move on.
I was getting annoyed at why the ADC signal took so long to settle from it's approximately 1.8v starting point. It turns out that's what the successive approximation circuit does, starts around Vref/2 (so like 1.65v I guess, whatever) and asymptotically approaches the real signal. Below you can see the X axis channel of the accel responding differently depending on its orientation. Either way it takes about 15ms to settle down so we'll have to wait that long each time we turn on and do a reading. Honestly I'm not 100% on this phenomenon but I'm getting tired of these side quests with the watch. It works, I know how to build it, just finish it up man.
Oh I also had the idea of using the internal 1.1v bandgap voltage for Vref since using the 3v3 rail has been a bit unreliable but holly cow the 1.1v rail is crap. The spec sheet says it can have a +/-100mV swing... no thanks.
Oh I also had the idea of using the internal 1.1v bandgap voltage for Vref since using the 3v3 rail has been a bit unreliable but holly cow the 1.1v rail is crap. The spec sheet says it can have a +/-100mV swing... no thanks.
Power Draw
While I had the whole "slow down the ADC clock" idea I got worried that the power draw and the sleep time vs sense time vs tube time. Per the below empirical readings I got this:
Sense = ~17ms or so every 250ms. During this time we are awake, waiting for the accel to settle (15ms) and reading the ADC (~1.2ms). This draws 1.55mA
Sleep = 233ms of every 250ms. During this time the accel is off and micro is asleep. This draws about 56uA.
Tube = This means the tubes are lit which happens for about 2.5s when we show the time/date. Depends on the input voltage as you can see below but we'll take the midpoint case of 105mA. For battery life purposes I assume the tubes lite 30 times per day.
Charing = This isn't part of the calculation but I wanted to make sure the watch is good inside the case...turns out it is happy as a clam charging at ~50mA.
So we take a nominal background level of (17/250)*1.55mA + (233/250)*0.056mA = 0.157mA quiescent current. In one day you'll have 24 hours of that so 0.157*24 = 3.78mAh/day. Each date/time showing is 105mA for 2.5s at 30 times a day. so 105mA * 75s=2.187mAh/day. Add em up you get about 6mAh per day average. Our battery has about 120mAh overall so our estimated battery life comes out to 120mAh/6mAh per day = 20 days! This is a back of envelope calc since there's heat loss when we pull 105mA plus the battery life isn't really 120mAh every time, and blah blah blah. In general, you should be good for 20 days.
While I had the whole "slow down the ADC clock" idea I got worried that the power draw and the sleep time vs sense time vs tube time. Per the below empirical readings I got this:
Sense = ~17ms or so every 250ms. During this time we are awake, waiting for the accel to settle (15ms) and reading the ADC (~1.2ms). This draws 1.55mA
Sleep = 233ms of every 250ms. During this time the accel is off and micro is asleep. This draws about 56uA.
Tube = This means the tubes are lit which happens for about 2.5s when we show the time/date. Depends on the input voltage as you can see below but we'll take the midpoint case of 105mA. For battery life purposes I assume the tubes lite 30 times per day.
Charing = This isn't part of the calculation but I wanted to make sure the watch is good inside the case...turns out it is happy as a clam charging at ~50mA.
So we take a nominal background level of (17/250)*1.55mA + (233/250)*0.056mA = 0.157mA quiescent current. In one day you'll have 24 hours of that so 0.157*24 = 3.78mAh/day. Each date/time showing is 105mA for 2.5s at 30 times a day. so 105mA * 75s=2.187mAh/day. Add em up you get about 6mAh per day average. Our battery has about 120mAh overall so our estimated battery life comes out to 120mAh/6mAh per day = 20 days! This is a back of envelope calc since there's heat loss when we pull 105mA plus the battery life isn't really 120mAh every time, and blah blah blah. In general, you should be good for 20 days.
Next Steps:
- Case and Acrylic Story
- Tube Misfiring and gas ionization
- Dark and Light tubes look different