+ Reply to Thread
Page 4 of 11 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 LastLast
Results 31 to 40 of 106

Thread: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

  1. #31
    RBW Member david_1 is an unknown quantity at this point david_1's Avatar
    Join Date
    Jul 2006
    Location
    uk
    Posts
    52

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    nice...

  2. #32
    Darlene Starr - DIY Diva Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen's Avatar
    Join Date
    May 2005
    Location
    St. Croix USVI
    Posts
    1,119

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    Quote Originally Posted by plazma  View Original Post
    Do you have any schematics?

    What op-amp do you use? How is it connected?

    What is the digital potentiometer model? Looks like there is 10-bit models with easy control. Nice idea to use these for calibration.

    The op amp is a Burr Brown (now owned by Ti) OPA2340 dual op amp. It's one of the best available in the DIY friendly DIP 8 package.

    The pot is a Dallas Maxim DS1867. It's the memory version of the DS1267.

    It's 8 bit (256 steps) which translates to having each half set with low byte / high byte of one word sized variable. And coincidentally is available in a DIY friendly DIP 14 package

    Data sheet here: http://datasheets.maxim-ic.com/en/ds/DS1867.pdf
    Power supply setup to insure memory write when power down is here: DS1867 Power Supply Conditioning for EEPROM Wiper Storage - Maxim

    There's kind of a double protection using the memory pot.
    With current programming, the MCU writes cal data to its eeprom as primary display calibration is completed and then as secondary cal is completed. Then at startup, it reads that last primary cal data from its eeprom at the start of the primary display cal routine, and the same at the start of the secondary display cal routine. It helps the user monitor their cell's condition by how much they need to bump up with successive calibrations as the cells age. I'm using a cell simulator for testing, (so no aging) and I've restarted this a hundred times at least as I work on code changes etc, and I can skip right thru the calibration steps, and get exactly the same numbers on the display every time, so repeatability is excellent.

    With the pots having a memory as well, even if the program locks up or the MCU fails after calibration, the pots hold their value, and the secondary display can still be relied on, since it's essentially a standalone digital voltmeter that reads 0 to 1.999 V or for our purpose, 0 to 1.999 PO2.



    The cell input circuitry schematic is below. Each cell has an iteration of the same circuit.

    With the values shown, and the pot at midpoint, (~5k) the gain is [(120k +180k) / (5k + 10K)] + 1 which comes out to ~21. So a nominal 10mV in air cell input produces a .210 V output that can be directly read as PO2 since each step of a 12 ADC (4096 steps) with a 4.096 reference voltage equalls 1 mV.

    With the 180k jumped out for HO cells, the gain becomes (120k / 15k) + 1 which is 9. So a 25mV in air cell would show .225 V with the pot at midpoint, pretty close to the .209 center we want to be able to calibrate to. A couple bumps on the down button during calibration to lower the gain just a tad, and ~.209 will be in the display.


    Darlene
    Attached Images
    Last edited by Scuba_Vixen; 30th June 2010 at 03:00.

  3. #33
    RBW Member moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund's Avatar
    Join Date
    Sep 2008
    Location
    Texas
    Posts
    406
    Oxygen Rebreather

    RG/U-FM mCCR

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    Quote Originally Posted by Scuba_Vixen  View Original Post
    There's kind of a double protection using the memory pot.
    ...
    Darlene
    Brilliant! But, unless I missed something earlier, why the dual op-amp sets? One to the ADC and one to a display. Redundancy? How can you be sure that the ADC agrees with the displayed value?

  4. #34
    RBW Member M_Bipartitus will become famous soon enough M_Bipartitus will become famous soon enough M_Bipartitus will become famous soon enough M_Bipartitus's Avatar
    Join Date
    Apr 2009
    Location
    Seattle, Washington
    Posts
    57

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    The two opamps allow for better isolation between the primary and secondary displays (greater fault-resistnce.) The primary controller can set independent calibrations for each opamp by way of the separate digital potentiometer channels.

  5. #35
    Darlene Starr - DIY Diva Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen's Avatar
    Join Date
    May 2005
    Location
    St. Croix USVI
    Posts
    1,119

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    Quote Originally Posted by M_Bipartitus  View Original Post
    The two opamps allow for better isolation between the primary and secondary displays (greater fault-resistnce.) The primary controller can set independent calibrations for each opamp by way of the separate digital potentiometer channels.

    This is exactly the case.

    If you were to flood the primary or damage the cable, you'd loose the primary display and posibly lock up the MCU. With the secondary being directly driven by its own op amp set, it'll keep on working.

    Keep in mind also that each module that plugs back to the main unit, (and has a power connection) has its own voltage regulator, so that a flood in one module, (even salt water) can, at worst, cause only that reg to shut down so that everything else stays powered up.

    At startup, the calibration routine goes thru cells 1 to 3 on the primary display, and then 1 to 3 on the secondary display. You have an "up" and a "down" button; if the displayed value is low, (compared to what it should read for the known calibration gas) bump the up button etc. It increments a couple tenths of a percent per bump. Calibration of the primary and secondary are independant

    The primary and secondary displays easily calibrate to within 1 or 2 tenths of a percent of each other, (that's the resolution of the displays) which is realy a moot difference as cells are spec'd at 1% accuracy anyway.


    Darlene
    Last edited by Scuba_Vixen; 1st July 2010 at 09:59.

  6. #36
    RBW Member moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund's Avatar
    Join Date
    Sep 2008
    Location
    Texas
    Posts
    406
    Oxygen Rebreather

    RG/U-FM mCCR

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    Quote Originally Posted by Scuba_Vixen  View Original Post
    This is exactly the case.

    ...
    Keep in mind also that each module that plugs back to the main unit, (and has a power connection) has its own voltage regulator, so that a flood in one module, (even salt water) can, at worst, cause only that reg to shut down so that everything else stays powered up.
    ...

    Darlene
    Not having seen the entire schematic (hint, hint, wink), if the MCU module floods then you lose both display modules, no? Why not have a battery back-up in the secondary display so it could continue even with the MCU and Primary down? This assumes that you start the dive with everything working and all is calibrated. At depth, even if you lost MCU and PRI you would still have sensor output.

  7. #37
    Darlene Starr - DIY Diva Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen's Avatar
    Join Date
    May 2005
    Location
    St. Croix USVI
    Posts
    1,119

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    Quote Originally Posted by moribund  View Original Post
    Not having seen the entire schematic (hint, hint, wink), if the MCU module floods then you lose both display modules, no? Why not have a battery back-up in the secondary display so it could continue even with the MCU and Primary down? This assumes that you start the dive with everything working and all is calibrated. At depth, even if you lost MCU and PRI you would still have sensor output.

    That makes two of us.

    I've never drawn the entire schematic, in fact the one in the post is as much as I've ever drawn so far. Sometimes I make little note sketches on scrap paper while I'm working a design out on the proto-board, but that's about it schematic wise.

    I tend to think in "pcb layout schematic" for lack of a better way to express it. I'll work backwards from the working product and compile a schematic for all the parts of this project as it progresses.

    In this sproject, the MCU module is the real heart of the system. If it floods, all is lost, as that's where the cell in circuitry is. With that down, it's BO time.

    If you wanted total redundancy, you'd have to build 2 MCU modules (without secondary displays) and isolate/split the cell outputs to go to both. The primary display of the second MCU would then be the secondary display for the system.

    But the goal here is not to build an eCCR rebreather, but to build an add-on control system generic enough to adapt to almost any mCCR.

    The key here is to make the MCU module in such a way as to have a significantly greater probability of flooding the whole loop, than the MCU module.

    Construction and location (ie: keeping it in a protected area) are your tools to that goal.

    Canisters make a really strong and easy to stow housing, so that's the route I've taken over the years. I make delrin lids with double barrel o rings and the usual face seal o ring. Never had one leak. I also don't pass the wire thru the lid with a gland. I always use molded cordsets and receptacles in the lid so there's no possibility to wick water down a damaged cord, and no mechanical switches anywhere.

    It's almost always cords or wrist/remote modules that get the most abuse and become a source of trouble. I base my designs on that premiss, and make remote modules that never have to be opened once made, nor have any port plugs to adjust thru etc.

    Putting a second battery in the secondary display doesn't help, since it needs the op amp circuit in the MCU module to supply the voltage to display.


    Well, sorry for the long ramble. Parts could be in as early as Saturday, but my bet is not till Tuesday.

    In the meantime, I'll redesign the "cells input" board and look at a couple improvements in code I thought about.


    Darlene

  8. #38
    Darlene Starr - DIY Diva Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen's Avatar
    Join Date
    May 2005
    Location
    St. Croix USVI
    Posts
    1,119

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    Hey Guys,

    On the "Tweak the Code" subject;

    Normally, I like to fly manually and have the electronics as a parachute for when I end up with too few hands.

    The setpoint setting is the PO2 point where the HUD display indexes from, (ie: higher or lower than) and the point where the electronics try to keep you if you're not doing such a good job of it yourself.

    There's a line in the code that sets how far below setpoint you have to be before the electronics kick in, but it still tries to maintain the same setpoint you have set the HUD to index to. I think there's a better way.

    I'm thinking about making the setpoint for the O2 control seperate from the HUD setpoint. They'd both start out at .70 as the default (same as setpoint does now) and be changable on the fly in the options menu.

    This way, you could set your HUD setpoint at whatever you plan to fly manually at, and then fly off the HUD to stay right on target, plus you could then independantly, set the PO2 you want the solenoid to maintain as a backup.

    It would make it easy to manually run at 1.1 or 1.2 and not have the solenoid kick in untill you drop to 1.0 or whatever you want, but then it would keep the PO2 there untill you take control again manually. More truely a parachute mode of operation.


    Feedback anyone?


    Darlene

  9. #39
    RBW Member moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund is a glorious beacon of light moribund's Avatar
    Join Date
    Sep 2008
    Location
    Texas
    Posts
    406
    Oxygen Rebreather

    RG/U-FM mCCR

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    Quote Originally Posted by Scuba_Vixen  View Original Post
    Hey Guys,

    On the "Tweak the Code" subject;

    Normally, I like to fly manually and have the electronics as a parachute for when I end up with too few hands.

    ...

    Feedback anyone?

    Darlene
    I like the concept, I mean, why not engage flexibility in the back-up to human error or distraction.

    Barring the complete schematic, a picture of the full monty along with a block diagram sketch would be great.

  10. #40
    Darlene Starr - DIY Diva Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen has a brilliant future Scuba_Vixen's Avatar
    Join Date
    May 2005
    Location
    St. Croix USVI
    Posts
    1,119

    Re: Let's Build a PO2 Monitor / Setpoint Controller For a Homebuild mCCR

    Weekend Update....

    I really do need a life or an intervention or something .......

    Fourth of July weekend and I'm writing code and making circuit boards.

    At least my obsession seems to have paid off in some nice features and more flexibility.

    Hardware items first:

    I designed and made the new "cells in" pc board based on the TLC4502 self calibrating zero offset dual op amps: (parts from Digikey should be here Tuesday)

    http://focus.ti.com/lit/ds/symlink/tlc4502.pdf

    The board is layed out so that each cell feeds two of them. The first one has both halves set up in buffer mode to isolate the cell from anything additional you may want to drive off it. The second one has one half set up as a buffer and the other half as the 10X amp as shown in the diagram a few posts back.

    If you don't need to drive anything else off the cells, or it's already being done in another manner, then the board can be assembled with only 3 of the possible 6 op amps.

    I'm really pretty excited to see how this works out.


    The second hardware item is HUD related, more specifically, some changes in the voltage regulators board to allow the use of an adjustable regulator in place of the fixed 5V one.

    Depending on the conditions, the HUD brightness doesn't always match the need.

    Where I am, with bright sun all year long and clear water with nominally 100' plus visibility, I need really bright hud leds most of the time. Problem is that night dives and penetration dives, the buggers kill my night vision, even when I rotate the hud to to reduce the directness of the viewing angle. My friggin' hud is better than some led divelights (well almost). Well now it's adjustable from "retina frying" bright to "is it still on" dim. The HUD can now be adjusted to fit the need.


    Now onto the software tweaks;

    The big thing is that now the setpoint that the O2 control system follows is independantly setable from the setpoint that the HUD indexes to. This allows for a true parachute mode where you might want to manually fly at 1.2, but have the solenoid maintain at 1.0 ot 1.1 if you can't do it manually for some reason, like managing a camera etc.

    If you set them both the same, then you have normal eCCR mode.

    The HUD setpoint still starts off at .70 as the default, giving you the choice of changing it at the completion of calibration, or later on. The O2 system setpoint starts off at .50, but unless you enable the Auto O2 option in the options menu, electronic control stays off by default.

    The setpoints are settable in the options menu in increments of 0.05
    The HUD setpoint range is 0.60 to 1.60
    The O2 setpoint range is 0.50 to 1.40 ... if you want to run the O2 up on deco, you have to do it manually.

    The O2 setpoint can be set equal to, but not higher than, the HUD setpoint, and if you lower the hud setpoint below where the O2 setpoint is, the O2 setpoint decrements with it.

    There is also an option to "quick select" bottom setpoints of 1.2 for the HUD and 1.0 for the O2 system with one button push, or surface setpoints of 0.9 and 0.5 with a single button push. You can always change them later if you want.

    Almost last, but not least, is a Solenoid Test option.
    Whether the Auto O2 system is enabled or not, you can test fire the solenoid in 400 millisecond bursts if you want to check it, either before the dive or during.

    Finally, the last new feature is a setting in the options menu for Cycle Time. That is, how long the interval between possible solenoid firings is. It's settable in seconds from 3 to 14, with 6 as the default.

    One of the more difficult issues was how to get all the information on the screen.

    The main screen stays as it's shown in the picture, but now when you press a button that goes to the options menu, the first screen now displays the three PO2 values, along with both setpoints and the CT value. The next button press takes you to the actual options choices.

    The backlight automatically comes on when in the options mode and stays on untill you leave, unless of course you have it turned on in the options menu, in which case it will always stay on. That way, if you have it off as you normally would, a quick button tap gets you to the most vital info with the BL on, and a second tap takes you back to dive mode and the BL will turn off.

    Well that's it so far, a lot more work than it sounds, but can't wait to see the variable brightness hud ... maybe someday a digipot on it and control it on the fly... how cool would that be!


    Darlene
    Last edited by Scuba_Vixen; 5th July 2010 at 02:42.

+ Reply to Thread
Page 4 of 11 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts