Git Product home page Git Product logo

openctd's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openctd's Issues

Detailed Build Instructions

We still need detailed build instructions for both the circuitry and the housing. This seems like a first pass need to be done by Andrew.

Maximum depth of OpenCTD?

I would like to build an OpenCTD for use on Lake Chelan, max depth 453m (3rd deepest lake in the U.S.). What is the likely max operating depth of the current design? If it is on the order of 200m, are there obvious modifications that could extend its operating depth to 500m? Would a mineral oil fill work for that purpose?

I have an EXO3 that we deploy for profiles in shallower parts of the lake, but it only goes to 250m max depth.

The EXO3 will provide a commercial instrument comparison with OpenCTD profiles to 250m depth if we can manage to build one.

Phil Long
Lake Chelan Research Institute
KeepChelanBlue.org

MS5803 Pressure sensor; Software issue

Essentially, the sensor reports data to the serial monitor when I upload the following code (sorry about the formatting):

#include <Wire.h>
#include <SparkFun_MS5803_I2C.h>

// ADDRESS_HIGH = 0x76
// ADDRESS_LOW = 0x77

MS5803 sensor(ADDRESS_HIGH);

float temperature_c, temperature_f;
double pressure_abs, pressure_relative, altitude_delta, pressure_baseline;

double base_altitude = 1655.0; // Altitude of SparkFun's HQ in Boulder, CO. in (m)

void setup() {
Serial.begin(9600);
sensor.reset();
sensor.begin();
}

void loop() {

temperature_c = sensor.getTemperature(CELSIUS, ADC_512);

pressure_baseline = sensor.getPressure(ADC_4096);

temperature_f = sensor.getTemperature(FAHRENHEIT, ADC_512);

pressure_abs = sensor.getPressure(ADC_4096);

pressure_relative = sealevel(pressure_abs, base_altitude);

altitude_delta = altitude(pressure_abs , pressure_baseline);

// Report values via UART
Serial.print("Temperature C = ");
Serial.println(temperature_c);

Serial.print("Temperature F = ");
Serial.println(temperature_f);

Serial.print("Pressure abs (mbar)= ");
Serial.println(pressure_abs);

Serial.print("Pressure relative (mbar)= ");
Serial.println(pressure_relative);

Serial.print("Altitude change (m) = ");
Serial.println(altitude_delta);

delay(1000);

}

double sealevel(double P, double A)
// Given a pressure P (mbar) taken at a specific altitude (meters),
// return the equivalent pressure (mbar) at sea level.
// This produces pressure readings that can be used for weather measurements.
{
return(P/pow(1-(A/44330.0),5.255));
}

double altitude(double P, double P0)
// Given a pressure measurement P (mbar) and the pressure at a baseline P0 (mbar),
// return altitude (meters) above baseline.
{
return(44330.0*(1-pow(P/P0,1/5.255)));
}

But fails to do so when I upload code for the entire function of the CTD, even when I eliminate the other sensors from the active code.

#include <Wire.h>
#include <SparkFun_MS5803_I2C.h>
#include <MS5803_14.h>
#include <SoftwareSerial.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <SPI.h>
#include <SD.h>

float tempA;
float tempB;
float tempC;

float tempAvg;

float EC_float = 0; // Electrical conductivity.

char EC_data[48]; // A 48 byte character array to hold incoming data from the conductivity circuit.
char *EC; // Character pointer for string parsing.

byte received_from_sensor = 0; // How many characters have been received.
byte string_received = 0; // Whether it received a string from the EC circuit.

SoftwareSerial ecSerial(8, 9); // Define the SoftwareSerial port for conductivity.
OneWire oneWire(6); // Define the OneWire port for temperature.
DallasTemperature sensors(&oneWire); // Define DallasTemperature input based on OneWire.
MS5803 sensor(ADDRESS_HIGH); //Define pressure sensor

float temperature_c, temperature_f;
double pressure_abs, pressure_relative, altitude_delta, pressure_baseline;
double base_altitude = 1655.0;

void setup(void) {

Serial.begin(9600);
ecSerial.begin(9600);

pinMode(16, OUTPUT); // Set data output pin for the SD card reader.

if (!SD.begin(4)) {
Serial.println("Card failed");
return;
}
delay(500);

sensor.reset();
sensor.begin();
sensors.begin();

delay(250);

}

void loop(void) {
/*if (ecSerial.available() > 0) {
received_from_sensor = ecSerial.readBytesUntil(13, EC_data, 48);

// Null terminate the data by setting the value after the final character to 0.
EC_data[received_from_sensor] = 0;

}

// Parse data, if EC_data begins with a digit, not a letter (testing ASCII values).
if ((EC_data[0] >= 48) && (EC_data[0] <=57)) {
parse_data();
}
delay(10);*/

temperature_c = sensor.getTemperature(CELSIUS, ADC_512);
temperature_f = sensor.getTemperature(FAHRENHEIT, ADC_512);
pressure_abs = sensor.getPressure(ADC_4096);
pressure_baseline = sensor.getPressure(ADC_4096);
altitude_delta = altitude(pressure_abs , pressure_baseline);

/sensors.requestTemperatures();
tempA = sensors.getTempCByIndex(0);
tempB = sensors.getTempCByIndex(1);
tempC = sensors.getTempCByIndex(2);
tempAvg = (tempA + tempB + tempC) / 3;
/

logData();
sendToSerialMonitor();
delay(50);
}

void parse_data() {
EC = strtok(EC_data, ",");
}

void logData() {
/*File dataFile = SD.open("datalog.txt", FILE_WRITE);
if (dataFile) {
dataFile.print("Temperature C = ");
dataFile.println(temperature_c);
dataFile.print("Temperature F = ");
dataFile.println(temperature_f);
dataFile.print("Pressure abs (mbar)= ");
dataFile.println(pressure_abs);
dataFile.print("Pressure relative (mbar)= ");
dataFile.println(pressure_relative);
dataFile.print("Altitude change (m) = ");
dataFile.println(altitude_delta);
dataFile.print("TempA = ");
dataFile.print(tempA);
dataFile.print(" TempB = ");
dataFile.print(tempB);
dataFile.print(" TempC = ");
dataFile.print(tempC);
dataFile.println(" ");
dataFile.print("EC = ");
dataFile.print(EC);
dataFile.close();
}
else {

}*/
}

void sendToSerialMonitor() {
Serial.print("Temperature C = ");
Serial.println(temperature_c);

Serial.print("Temperature F = ");
Serial.println(temperature_f);

Serial.print("Pressure abs (mbar)= ");
Serial.println(pressure_abs);

Serial.print("Pressure relative (mbar)= ");
Serial.println(pressure_relative);

Serial.print("Altitude change (m) = ");
Serial.println(altitude_delta);

/*Serial.print("tempA = ");
Serial.print(tempA);
Serial.print(" tempB = ");
Serial.print(tempB);
Serial.print(" tempC = ");
Serial.print(tempC);
Serial.print(" Avg = ");
Serial.print(tempAvg);
Serial.println(" ");

Serial.print(EC);
Serial.println("");*/
}

double altitude(double P, double P0){
// Given a pressure measurement P (mbar) and the pressure at a baseline P0 (mbar),
// return altitude (meters) above baseline.
return(44330.0*(1-pow(P/P0,1/5.255)));
}
And btw, thanks for answering my other question in such a timely manner.

How is the recommended SOIC to DIP adapter used in this project?

For a novice electronics enthusiast like myself, these building instructions are helpful, but I cannot figure out how this adapter should be used or if it even needs to be used at all. As with many concepts I've learned recently, I tried to find information on the internet but I came up short on the entire concept of switching between SOIC and DIP.

Robust comparison to commercial CTD?

I see the 2 datasets included for comparison but surely there's data out there seeing how these stack up against any of the major CTDs in the coastal ocean? Trying to decide whether to embark on this project which depends on the accuracy and precision in conductivity primarily.

I also saw a comment in another issue on measuring DO. Any progress on that front?

Really cool tool you guys have created. Thanks!

SoftwareSerial

HI Guys, I'm having a library problem, and I'm sure the answer is obvious, but I"m still in the early stages of the github/arduino learning curve. I can't find the downloadable ZIP file of the modified SoftwareSerial library for the Adafruit feather CTD. I can navigate to the code on the GitHub page and see it. But only option I have is to try and cut and paste it, there is no zip/download. Where can I find the downloadable zip to add the library to Arduino IDE?

Proposed reorganization

Arrange top level directory by major concepts :

  • Hardware
    • Electronics
      • Schematics
      • Assembly
        • PCB
        • Breadboard
    • Enclosure
    • Software
      • Firmware
      • Analysis
    • Documentation
      • Assembly
        • Sourcing Components
        • With OpenCTD PCB
        • With Breadboard
      • Calibration
      • Operation Manual
      • Complete Manual

Any way to make the CTD compatible with M0 Pro?

Hello, after getting the CTD working fully on my UNO I now have yet another question regarding making the Open CTD work with another board, and this one is giving me more grief.

I'm aiming to potentially get better resolution on the readings by adapting the CTD to be used with the M0 Pro, I have all of the hardware working on the UNO, so now where I've hit this speed bump is with the Sketch, and more specifically, the SoftwareSerial library.

The M0 Pro board does not have SoftwareSerial as a built-in library, as far as I have found online thus far, it is only usable with other Serial functions. I am not very experienced in the wide range of different Arduino board but figured this may be a relatively obvious work-around for someone with more experience and I would appreciate any help that I can get.

Is there any way of achieving the same results as SoftwareSerial with a different approach that would work on this board?
Thanks!

Dispensing gun required to apply E-120HP epoxy - best to list explicitly in construction doc

To apply the Loctite E-120HP epoxy, both a mixing nozzle and a dispensing "gun" are required. The mixing nozzle is listed in the build manual from Amazon, but not the dispensing gun. My suggestion is to also include the listing for the dispensing gun as you won't know you need this unless you're familiar with the product. Here's a link to it on Amazon - although Grainger will also suggest you buy this when you order the E-120HP - but you may not know to add it to your cart in addition to the epoxy order.

https://www.amazon.com/dp/B08JC7VVSF?ref=ppx_yo2ov_dt_b_product_details&th=1

Software Libraries

Right now, the OpenCTD source code is at the upper limit for what an Arduino can handle. While we could port everything to a more powerful system, like Raspberry Pi, there are also many places where we can reduce code bloat.

Right now, we use several Arduino libraries which have more features than we use. I'd like us to go through and create custom libraries which don't contain extra code for unused features. The following libraries are good targets for slimming:

I'd also like someone to go through the main code and see if there are extraneous lines that can be removed.

Conductivity calibration

Hi everyone,

I made an open CTD for an antarctic expedition. This one must leave before 1st September.
All is ok. I have just a problem with conductivity calibration.
When I send c,0 or other command. I didn't got any response.
The response of conductivity sensor in fresh water is around 300. Is it µS/cm ?

The baud range is ok and TX and RXpin also right.

I work for an other job with teensy 3.6 board. I think Arduino IDE work with it's SoftwareSerial librairies.

My Hardware is EZO board and mini conductivity probe k1.0.

Excuse my english level. I'm french.

Best regards

Guillaume Leguen

Inquiry about Arduino UNO with CTD

Hello, I am pretty new to Arduino and am trying to build the open CTD
I was wondering if anyone had suggestions for a pinout guide for use with the Arduino UNO to avoid the failed conductivity readings mentioned with the use of the given pinout on the UNO
Thanks

Raspberry pi instead of Arduino/Adalogger

Hey Guys

I have been interested in this project and have been wanting to build one for quite some time now. I was wondering however if anyone has tried substituting Arduino/Adafruit combo with a raspberry pi. If yes, is there any text out there that I can follow?

Please also let me know if this is not the right place to ask this question.

Independent System Not taking values

Uploading the code from my computer Arduino IDE and opening the Serial Monitor I am seeing the sensor take values and store them to the SD Card, I remove the SD Card and read the txt file on my computer and confirm that the values were saved.
However, when the MCU is powered by a battery and I did a test cast, I open the txt file and find it empty. Not sure why the code is not running when it is turned on by the battery. Any assistance would be greatly appreciated!!

Calibrate Conductivity probe

Under 6.3 conductivity the link " have created a small program for accessing the serial monitor" is dead. I assumed it was the "simple_serial_for_EC_calibration" in the support code folder. But when I flashed that over, I only got a stream of 0.00, and got no repsonse when I entered c,0 or k,? or any of the other commands into the serial monitor send command. Any suggestions?

Sample Breaks

Right now, the OpenCTD begins logging as soon as powered on without recording any break in the data. We need to add a feature that adds a sample number to the beginning of each sample series. For example, the first cast of the day starts with a "SAMPLE 1" line in datalog.txt. If the user then power cycles the device, the next time it starts recording is writes a "SAMPLE 2" line in datalog.txt where the new data begins.

Does this make sense? Are there more elegant solutions?

Dependency List

I've only ever dabbled in C, so I'm not sure how folks manage dependency hell.

I think I can safely recommend editing the readme to list your reqs. : )
.
.
Some cursory googling turned up these links...
.
I2C library for the MS5803_14BA 14bar pressure sensor
https://github.com/millerlp/MS5803_14

Dallas Temperature Control for the DS18B20 thermometer
https://milesburton.com/Dallas_Temperature_Control_Library

OneWire **
http://www.pjrc.com/teensy/td_libs_OneWire.html
http://playground.arduino.cc/Learning/OneWire

SD *
https://www.arduino.cc/en/Reference/SD

SoftwareSerial *
http://www.pjrc.com/teensy/td_libs_SoftwareSerial.html
https://www.arduino.cc/en/Reference/SoftwareSerial

SPI **
https://www.pjrc.com/teensy/td_libs_SPI.html
https://www.arduino.cc/en/Reference/SPI

Wire *
http://www.pjrc.com/teensy/td_libs_Wire.html
https://www.arduino.cc/en/Reference/Wire

* Included with Arduino.
** Included with Arduino. A newer version may be available.

(I backslashed the footnote asterisks, so they wouldn't turn into bullet lists)

Problem in RTCLib

Code doesn't compile due to problem in RTCLib. Happens for both OpenCTD_mo.ino and RTC_Reset.ino

In file included from /Users/pwnel/Downloads/OpenCTD_m0/OpenCTD_m0.ino:3:
/Users/pwnel/Documents/Arduino/libraries/RTClib/src/RTClib.h:25:10: fatal error: Adafruit_I2CDevice.h: No such file or directory
25 | #include <Adafruit_I2CDevice.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

Adafruit Feather MO Bluefruit LE [ID:2995]

Not particularly an issue with this current design, but my team is trying to introduce the Bluetooth compatible Adalogger to the design to reduce the amount of times the CTD needs to be opened to access data (We have developed a GUI to display this data as well) and we recognize that the Arduino code needs to be altered to support bluetooth communication over serial/SD Card. A lot of the Adafruit demo code utilizes an app to link to the adalogger but we are aiming for a pc connection. I am looking for assistance with the arduino code for this if anyone has attempted it already or has any insight. As of now we only have the code written on this github page. The link to the bluetooth adalogger is below.
https://www.adafruit.com/product/2995?gclid=EAIaIQobChMIxu7496u56gIVjI7ICh3Sqg5jEAAYASAAEgJat_D_BwE

Battery polarity - important note when ordering the Amazon LiPos

When ordering LiPo batteries from Amazon (using the Amazon link in the construction manual instead of the Adafruit link), be advised that the Amazon LiPos come with the polarity of the JST connector REVERSED. The M0 manual calls this out specifically (red box from manual inserted below) and it's worth adding this warning in the next iteration of the construction manual. (NOTE: AdaFruit is out of stock of the LiPo batteries at this time, so it's useful to have the Amazon alternative - provided one is aware of the polarity issue)

Screen Shot 2024-02-14 at 4 10 19 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.