This week I will go diving to the Krk island in Croatia. Of course I will bring DiveIno with me to give it another test dive!
No, I didn’t have leakage. Instead I faced with these problems:
- The water detection was always active - even out of the water
- After 10 minutes, around 22 meters depth, DiveIno became frozen and restarted itself around 10 meters
I didn’t know what is going on, because it worked before like I wrote in the Dive season start in 2017 post. I performed those dives with the DiveIno PCB version based on the Arduino Mega 2560 microcontroller board. For my last dive of this trip I switched back to this version and it also worked prefectly!
For the DiveIno Arduino Shield version I used an Arduino Due microcontroller board. It was a Chinese clone, which does not start after power off. Reset has to be performed. This is a well known problem documented on the Arduino forum. The original board doesn’t have this issue, so it is another reason why you should use original parts…
Besides this hardware change, I updated all of the third party Arduino libraries mentioned in the Development environment setup guide post to the latest version.
After the fourth dive, I noticed that no dive log JSON file was saved onto the SD card. What could be the problem? I think it was a software issue around these updated libraries.
I checked the libraries again and turned out that two libraries version was different from the previous setup:
Actually the previous SdFat library version was quite outdated, but the latest should work without any modification.
In the 5.10.0 version of the ArduinoJson library the author introduced a breaking change about how double decimal places were handled! I used this - now outdated - code to print out the log JSON files to the SD card! The code compiled, but I guess there were issues in its operation. I had to update the DiveIno codebase to support these changes. It was done in the 1.5.1 software version.
I mentioned earlier that the blue LED was turned on all the time, as an indication that the water contact is active. I thought it is a hardware problem. I measured the resistors related to the Water Module on the PCB. The 220k resistor seemed to be broken. I replaced it, but the issue wasn’t disappeared!
As a last resort I also replaced the BC548C NPN transistor with a new one. It solved the problem! Somehow this transistor went out of order during the lof of board resets.
I also noticed that the blue LED is not really visible in direct sunlight, so I added a new progress bar onto the Main Menu. When it reaches at the end of the screen, DiveIno switches into dive mode. It was introduced in the 1.5.2 software version.
I also improved a bit on the PCB design. The DS3231 Precision RTC Breakout moved above the LiPo Fuel Gauge, just to make the battery replacement even more convinient. The Water Module wires are also reordered.
Now I hopefully solved all the hardware and software issues. Over the weekend I assembled a new instance of the DiveIno Arduino Shield version based on the Rev 04 design. Now it only works with Arduino Mega 2560, but if I solder the SPI headers it supports Arduino Due as well.
I also replaced my Chinese Arduino Due clone with an original version. Actually it is the Arduino Due without headers version, which is a bit special. It doesn’t have pre-soldered headers, so only the required ones can be soldered onto it. It is much better, if the Lithium Ion Polymer Battery - 3.7v 1200mAh has to be placed between the microcontroller board and the shield PCB.
As a result of the preparation, now I have four DiveIno versions to try out!
- DiveIno PCB version based on Arduino Mega 2560
- DiveIno PCB version based on Arduino Due without headers
- DiveIno Arduino Shield version Rev 03 with the replaced transistor based on Arduino Due without headers
- DiveIno Arduino Shield version Rev 04 based on Arduino Mega 2560 for now, but can be upgraded to Arduino Due
What a variety! Now the single point of failure is the case. I have a replacement, but it wasn’t transformed to host DiveIno parts.
I hope that during the test week, I am able to avoid the flood and all versions can be tested! Wish me good luck!