JochiSt / OpenFlowMeter

Measuring Flow
GNU General Public License v3.0
6 stars 0 forks source link

commissioning of revision 2.0 #11

Closed JochiSt closed 1 year ago

JochiSt commented 2 years ago

This issue is about the commissioning of the first board of rev 2.0.

The firmware is prepared and should hopefully work out of the box.

JochiSt commented 1 year ago

Population changes

JochiSt commented 1 year ago

Startup working:

I2C Bus Scanning

I2C bus #1
Scanning I2C bus:
.......................................................................0x48.............................................0x76.........

Two devices as expected found:

JochiSt commented 1 year ago

When the EEPROM (24LC01) is inserted it is also recognised on I2C Bus 1

0x48.......0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57..............................0x76.........

This matches the address pattern used in the 24LC01. datasheet

JochiSt commented 1 year ago

Gain of I and U

Channel 0

20221216_gain_channel0

Channel 1

20221216_gain_channel1

Should be dominated by the low gain for low DAC settings and by the saturation for the high DAC settings.

JochiSt commented 1 year ago

Gain vs DAC settings. A bit better plot than before. 20221216_gain_vs_dac_56k_56k_ch0

The resistance calculated from the data above. 20221216_resistance_56k_56k_ch0

Because the current / voltage resolution could be better, I'll decrease R50, R51, R52, R53 to increase the gain.

JochiSt commented 1 year ago

reading and writing the configuration works.

example setting TMP100 interval to 64

Getting the configuration from OFM
Board ID: 1
Intervals:
    CAN ADC    4
    Print UART 8
        I2C TMP100 1
        I2C BME680 255

PIDflags 0x0
PID 0
    T: 40.000000
    P: 0.000000
    I: 0.000000
    D: 0.000000

PID 1
    T: 40.000000
    P: 0.000000
    I: 0.000000
    D: 0.000000

Smoothing:
    SMOO     15
    SMOO_MAX 16

Here is the change done, the interval is set to 64. (Note: sometimes, this does not work on the first try. But this might be related to the CAN bus...)

Board ID: 1
Intervals:
    CAN ADC    4
    Print UART 8
        I2C TMP100 64
        I2C BME680 255

PIDflags 0x0
PID 0
    T: 40.000000
    P: 0.000000
    I: 0.000000
    D: 0.000000

PID 1
    T: 40.000000
    P: 0.000000
    I: 0.000000
    D: 0.000000

Smoothing:
    SMOO     15
    SMOO_MAX 16
JochiSt commented 1 year ago

After triggering the writing of the configuration into the EEPROM, the configuration is changed on reboot / power cycling.

JochiSt commented 1 year ago

internal PID working

Note: not tuned to any performance, but with a simple P of 0.9 this algorithm starts regulating the temperature.

The PID was enabled just for channel 1 (the lower plot in the image)

20221222_PID_working

In between I have blown some air to the sensor, that's why the DAC settings goes up.

JochiSt commented 1 year ago

With this all major components of the board are working. (Except BME680, which I have not yet implemented).