Nitrox/Trimix & CO analyzer

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

To prevent commercial exploitation, I've added the Scubaboard logo. Next to that, the firmware file requires a license to prevent unlimited copying

[Disclaimer: I am not a lawyer]
The Scubaboard logo is copyrighted by it's creator and/or the owner of Scubaboard, so it's unusual that you're somehow using that logo to "prevent commercial exploitation", and you might be exposing yourself to unintended liability, particularly if you're introducing confusion that the analyzer is somehow a "Scubaboard product".

I haven't looked at the firmware, or license, or anything else about this project beyond the posts here, so you may already have a good statement of ownership and allowable use (text of the license, as distinct from a "license key" that you send to users).

I'd suggest using the Creative Commons non-commercial license: Creative Commons — Attribution-NonCommercial-NoDerivatives 4.0 International — CC BY-NC-ND 4.0
[/Disclaimer]

This project looks great -- sharing the circuit designs and code is terrific. I look forward to some time to improve my electronics skills and to play with this.
 
I followed the guide and uploaded the file for ILI9341 display, then I rebooted but only the word DEEPDOWN comes out, is it right or wrong something, thanks
 
I have experienced that behaviour with the 36-pins version of the ESP32. For some reason (which I haven't figured out), the display driver and the I2C bus cause problems.
It does work with the 30-pin version of the ESP32. Check if the pictured board is exactly the same.

A minimal test setup requires the display and one ADS1115 connected, and the two buttons to operate the menu.
I've updated the boot image, try again please.
 
I am using this card, it is the same as the one you used at 30 pin, I tried to load again but nothing always DEEPDOWN

and I also have the two buttons and the two ADS connected
 
Looks good,
previously built an O2 using a nano but thinking about tinkering along the lines of a fully integrated analyser..
Just one question..why is this not all put on github instead of pasting code in a forum ? :wink:
 
Looks good,
previously built an O2 using a nano but thinking about tinkering along the lines of a fully integrated analyser..
Just one question..why is this not all put on github instead of pasting code in a forum ? :wink:
The basics are on Github. I just improved the code and calibration, which are described in this thread.
That's the open source part. The display presentation, menu structure and multicore processing won't be open source but can be downloaded and upgraded as firmware. It's still do-it-yourself.
 
Hi Miyaru,

Congrats to you that this project of yours has turned out successfully and fruition.

I have 2 questions in regards with the new changes and I quote:

Changes in the layout:
  • Two color screen options: ST7789 (1.3" 240x240) and ILI9431 (2.2" or 2.4" 320x240). The ST7789 display has no CS pin, in that case no connection from pin D5 is required.
  • Lithium ion battery powered. Layout will get an update once the wireless charging option has been tested.

Questions:

1) Somehow my ST7789 LCD do have CS pin, should I proceed to make connection from pin D5 on ESP32?
2) Is 18650 3.7v Li-ION battery be ok to use? If not, what sort of battery should I need be getting? And, I assume the battery connection will be made straight to both ESP32's VIN & GND pin, and as well as the input port of LM2596, as like before?

Thank you.
CW
 
Questions:

1) Somehow my ST7789 LCD do have CS pin, should I proceed to make connection from pin D5 on ESP32?
2) Is 18650 3.7v Li-ION battery be ok to use? If not, what sort of battery should I need be getting? And, I assume the battery connection will be made straight to both ESP32's VIN & GND pin, and as well as the input port of LM2596, as like before?

Thank you.
CW
1. No need for a connection to D5 in case of a ST7789 display without CS. The screen I use (240x240) has no chip select either.
2. A single 18650 unfortunately drains too fast, because the MD62 is really power hungry. So I ended up with 2x18650 in series.

Drawback is that you can't use a simple USB charger. Power supply options:

The easy one: take out the batteries to charge them. In that case, the LM2596 is connected straight to the batteries and turns the voltage down to 3.00V. For powering the circuit, I used a MINI360 buck converter that provides 3.3V straight to the 3.3V pin of the ESP32. This is more power efficient than using the Vin pin of the ESP32, since it only converts the excess voltage to heat. Using the Vin port with the output from 2 batteries uses 1.5 times as much power, compared to using a MINI360.

The slightly more complicated one:

Batteries stay inside, and this requires a 8.4V charger; make a connector in the housing that enables you to plug it in.
Since there are 2 batteries, a 2S BMS (battery management system) is connected to the batteries, so they charge even.
Use an on/off button in the battery circuit just before the buck converters are powered. When charging the batteries, turn the switch to off so the circuit doesn't charge and load the batteries at the same time (which is a bad idea and a fire hazard!).

The really complicated one (no drawing yet!):

Instead of using a power on/off button, it's also possible to turn the analyser off in the menu. The ESP32 goes in standby mode.
In this case, the LM2596 has to be turned off. This can be done by de-soldering pin 5 of the chip (lift the pin from the circuit board while heating it) and connect it straight to pin 13.
A p-channel mosfet, transistor, schottky diode and a resistor are required to prevent using and charging the battery at the same time. The circuit will switch to the power supply when plugged in, and switches the battery again when unplugged. Not tested yet with 2 batteries, I'm waiting for parts to arrive (and I'm spending more time on another project). Google it, if anyone has the perfect combination with minimal power consumption: I'm interested!

Add-ons for DIY during surface intervals:

If you want to know if the sensor is warm enough, put a DS18B20 sensor against the MD62. Connect to vcc and gnd pin to the 3.3V circuit, connect the data pin of the sensor to ESP32 pin 14. And add a 10k resistor between pin14 and 3.3V.

If you want a battery icon in the display, add an INA219 to the I2C bus, connect a new wire from the + of the battery to Vin+ and connect the old wire to Vin- of the INA219.

More battery saving options: de-solder all the tiny LEDs from all the components. You don't see them anyway when everything is in a nice housing and they're just draining battery life.
 
Thank you for your detailed reply, I would love to look into the battery charging option (would love to have wireless charging receiver incorporated) while waiting for my ESP32 getting delivered. I already had a waterproof push power button and 2 other buttons installed onto my pelican 1050 casing, thus, I will maintain going down that route on top of your latest schematic.

Anyway, I'll come back to you again if I have encounter any problem, and as well as the license activation.

Thanks, Miyaru.

CW.
 
https://www.shearwater.com/products/peregrine/

Back
Top Bottom