In The Ever lasting Chain Of Experiments The Next Project, ultrasonic anti-fouling for boats.
Part 7
Made a change in the circuit diagram, changed pin 16 to pin 15 on the PIC:
Changed the OLED display update so it fits in the 100 ms timer tick, added some stuff, just screen layout, tested the clock accuracy overnight, good to within a few seconds (depends on PIC's internal oscillator, good enough for an hour counter. I chose days and time over 'hours' as you may want to know how many days you have been on the ocean and dividing by 24 becomes difficult with lack of sleep and food and water.. And it is good to report over the radio: been adrift for 100 days... Hours means nothing to nobody
So display now looks like this if battery is still full at the start of the journey:
And once the battery is flat:
I automagically switch down OLED display contrast, as OLED then needs less power. this is an interesting thing, I measured it in the OLED +Vcc last night, and measured 6.4 mA max. Then I removed the meter and OLED kept working via it's reset line, SCL line, and SDA pullup... So its more than 6.4 mA, on an other project I measured 10 mA, but anyways for 1 Ah left in the battery it is good for a hundred hours. I could blank the display, but because of above mentioned metal state of single handed long distance sailors it is better to use big font LOW BATTERY, perhaps it will ring a bell. Maybe add a beeper? LOL
I'm optimist, and that is why I think of these things And here is the code so far:
Note that this is GPL (license) and it is entirely possible you will be eaten by sea monsters if you use it and you do not release source, But there is a lot of stuff there that you could use to learn how to progrum.
For now, gonna do some-sing elze while waiting for the parts.