Deprecated: Constant E_STRICT is deprecated since 8.4, the error level was removed in /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29

Deprecated: drupal_get_query_parameters(): Implicitly marking parameter $query as nullable is deprecated, the explicit nullable type must be used instead in /home/sites/39a/7/7b21859c1d/public_html/includes/common.inc on line 417

Deprecated: _format_date_callback(): Implicitly marking parameter $matches as nullable is deprecated, the explicit nullable type must be used instead in /home/sites/39a/7/7b21859c1d/public_html/includes/common.inc on line 2174

Deprecated: Constant E_STRICT is deprecated since 8.4, the error level was removed in /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29

Deprecated: UpdateQuery::expression(): Implicitly marking parameter $arguments as nullable is deprecated, the explicit nullable type must be used instead in /home/sites/39a/7/7b21859c1d/public_html/includes/database/query.inc on line 1143

Deprecated: MergeQuery::expression(): Implicitly marking parameter $arguments as nullable is deprecated, the explicit nullable type must be used instead in /home/sites/39a/7/7b21859c1d/public_html/includes/database/query.inc on line 1419

Deprecated: Constant E_STRICT is deprecated since 8.4, the error level was removed in /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29
Calibration Instructions for the v3 Barometer | SIMAT Electronic Projects

Error message

  • Deprecated function: TYPO3\PharStreamWrapper\Manager::initialize(): Implicitly marking parameter $resolver as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 19 of /home/sites/39a/7/7b21859c1d/public_html/includes/file.phar.inc).
  • Deprecated function: TYPO3\PharStreamWrapper\Manager::initialize(): Implicitly marking parameter $collection as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 19 of /home/sites/39a/7/7b21859c1d/public_html/includes/file.phar.inc).
  • Deprecated function: TYPO3\PharStreamWrapper\Manager::__construct(): Implicitly marking parameter $resolver as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 19 of /home/sites/39a/7/7b21859c1d/public_html/includes/file.phar.inc).
  • Deprecated function: TYPO3\PharStreamWrapper\Manager::__construct(): Implicitly marking parameter $collection as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 19 of /home/sites/39a/7/7b21859c1d/public_html/includes/file.phar.inc).
  • Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent (sent from /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29) in include_once() (line 267 of /home/sites/39a/7/7b21859c1d/public_html/sites/default/settings.php).
  • Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent (sent from /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29) in include_once() (line 268 of /home/sites/39a/7/7b21859c1d/public_html/sites/default/settings.php).
  • Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent (sent from /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29) in include_once() (line 276 of /home/sites/39a/7/7b21859c1d/public_html/sites/default/settings.php).
  • Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent (sent from /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29) in include_once() (line 283 of /home/sites/39a/7/7b21859c1d/public_html/sites/default/settings.php).
  • Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent (sent from /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29) in drupal_settings_initialize() (line 829 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Warning: session_name(): Session name cannot be changed after headers have already been sent (sent from /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29) in drupal_settings_initialize() (line 841 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: Constant PDO::MYSQL_ATTR_USE_BUFFERED_QUERY is deprecated since 8.5, use Pdo\Mysql::ATTR_USE_BUFFERED_QUERY instead in DatabaseConnection_mysql->__construct() (line 334 of /home/sites/39a/7/7b21859c1d/public_html/includes/database/mysql/database.inc).
  • Deprecated function: Constant PDO::MYSQL_ATTR_MULTI_STATEMENTS is deprecated since 8.5, use Pdo\Mysql::ATTR_MULTI_STATEMENTS instead in DatabaseConnection_mysql->__construct() (line 346 of /home/sites/39a/7/7b21859c1d/public_html/includes/database/mysql/database.inc).
  • Deprecated function: session_set_save_handler(): Providing individual callbacks instead of an object implementing SessionHandlerInterface is deprecated in drupal_session_initialize() (line 245 of /home/sites/39a/7/7b21859c1d/public_html/includes/session.inc).
  • Warning: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent (sent from /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29) in drupal_session_initialize() (line 245 of /home/sites/39a/7/7b21859c1d/public_html/includes/session.inc).
  • Warning: session_id(): Session ID cannot be changed after headers have already been sent (sent from /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc on line 29) in drupal_session_initialize() (line 269 of /home/sites/39a/7/7b21859c1d/public_html/includes/session.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc:29) in drupal_send_headers() (line 1558 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc:29) in drupal_send_headers() (line 1558 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc:29) in drupal_send_headers() (line 1558 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: SelectQueryInterface::getArguments(): Implicitly marking parameter $queryPlaceholder as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: SelectQueryInterface::preExecute(): Implicitly marking parameter $query as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: SelectQueryExtender::getArguments(): Implicitly marking parameter $queryPlaceholder as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: SelectQueryExtender::preExecute(): Implicitly marking parameter $query as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: SelectQuery::getArguments(): Implicitly marking parameter $queryPlaceholder as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: SelectQuery::preExecute(): Implicitly marking parameter $query as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: DrupalEntityControllerInterface::resetCache(): Implicitly marking parameter $ids as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: DrupalDefaultEntityController::resetCache(): Implicitly marking parameter $ids as nullable is deprecated, the explicit nullable type must be used instead in include_once() (line 3563 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc:29) in drupal_send_headers() (line 1558 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc:29) in drupal_send_headers() (line 1558 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc:29) in drupal_send_headers() (line 1558 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home/sites/39a/7/7b21859c1d/public_html/includes/errors.inc:29) in drupal_send_headers() (line 1558 of /home/sites/39a/7/7b21859c1d/public_html/includes/bootstrap.inc).
  • Deprecated function: Using null as an array offset is deprecated, use an empty string instead in _block_render_blocks() (line 906 of /home/sites/39a/7/7b21859c1d/public_html/modules/block/block.module).
  • Deprecated function: Using null as an array offset is deprecated, use an empty string instead in _block_render_blocks() (line 906 of /home/sites/39a/7/7b21859c1d/public_html/modules/block/block.module).
  • Deprecated function: Using null as an array offset is deprecated, use an empty string instead in _block_render_blocks() (line 906 of /home/sites/39a/7/7b21859c1d/public_html/modules/block/block.module).
  • Deprecated function: Using null as an array offset is deprecated, use an empty string instead in _block_render_blocks() (line 906 of /home/sites/39a/7/7b21859c1d/public_html/modules/block/block.module).

Calibration Instructions for the v3 Barometer

Background

 

There is a range mismatch between the output of the MPXA4115A (pressure transducer) and the desirable input to the DS2438 A/D.  If one were to interface the pressure transducer directly to the DS2438, the system would work, but the resolution would be unacceptable.  At any given location the pressure transducer only uses about 10% of it’s total available range.  So instead of having a range of 0 to 5 volts we have a 0.5 volt sub range within the 0 to 5 volt span.  At my location the low voltage output from the transducer (which represents 28 inHg) is 2.523 volts.  The high voltage output from the transducer (which represents 31 inHg) is 2.845 volts.

 

So what this design does for this example is to shift and expand that 0.32-volt range so that it covers a substantial portion of the 0 to 10 volt range of the DS2438.  For various reasons we have settled on having the full range of the DS2438 to be from 1.25 to 8.25 volts.  In other words we have a device that produces a linear function from 2.523 volts to 2.845 and we want to transform that function to a linear function that goes from 1.25 to 8.25 volts.  We think of this as an offset/gain transformation.

 

You should be aware that this part of the calibration assumes that each transducer performs according to the published transfer function.  They vary slightly from the published value, but never so much that the final calibration can be easily done in software.

 

The circuit is composed of 2 OpAmps.  Each OpAmp can be adjusted both for offset and gain.  However, to simplify the process, the first stage has essentially fixed gain and adjustable offset (VR1).  The second stage has essentially fixed offset and adjustable gain (VR2).  I say essentially in both cases because the adjustment of VR1, which is done to set the offset of the first stage, has a small effect of the gain of that stage.  Similarly, the adjustment of VR2, which is done to set the gain of the second stage, has a small effect of the offset of that stage.  As a result there is some back and forth adjusting required.


The Calibration

1.      Run the BaroCalc30 program, enter you elevation in feet.  Normally you would use the default values of 28/31 inHg and 1.25/8.25 volts.  You can use any values you like within reason,  Lower voltage goes with the lower pressure and higher voltage goes with the higher pressure.  On the menu of the program you are allowed to fix a Report header, or title that will print on the report.  Once you have entered your values on the left hand side of the window then click on “calculate” and the calculated values will appear.  When you click on “Print Report” the report will be placed in the same folder as the BaroCalc30.exe program and will be called “Output.txt”.  Just open that in Notepad and edit it as you see fit, then print it if desired .

2.      I should point out that you should preset VR1 and VR2 before soldering them in.  When presetting VR2, measure the resistance between the center pin and the pin closest to the edge of the board, and when presetting VR1 measure the resistance between the center pin and the pin closest to the center of the board.  The value printed in Output.txt is the value from the center pin of VR1 to ground that includes R6 (1800 Ohms).  So it is necessary to subtract 1800 Ohms for the value printed for VR1.  (We left it this way as if you happen to be much about 10,000 ft elevation, you will have to reduce the 1800-Ohm resistor.  But BaroCalc will still be useful information. If you have already soldered VR1 and VR2 in place you can probably measure the resistance between Pins 1 & 2 on U1 (LM358) to measure and set VR2 (with no power applied), you can then adjust VR1 to a rough offset using iButton viewer.

3.      Solder VR1 and VR2 in place and plug the barometer into the 1-Wire network. 

4.      Remove the jumper if fitted from Pin 4 and 5 of the J1 calibration header, now plug your calibration tool in ensuring that Pin 1 is connected to the +v connection on your tool, although it won’t do any damage if you connect it the other way round.  If you now apply the power the LED should come on.  You now need to setup your calibration tool with the values from the output.txt using your voltmeter.  If you set the calibration tool switch to select VLow and connect your voltmeter between J1 pin 3 and 4 you can adjust the VLow preset on the calibration tool to value from output.txt, now set the switch to select VHigh and adjust the VHigh preset to give the correct voltage for VHigh on J1 pins 3 and 4.

5.      Put your voltmeter between pin 1 of the LM358 and ground.  This measures the analog output of the OpAmp string that is the input to the A/D on the DS2438.  You can also use the iButton viewer to read the VAD voltage if the The following 2 steps should be made iteratively until there is no change.

6.      Set the switch on your calibration tool to VHi and carefully adjust VR2 to give 8.25 volts on the voltmeter.

7.      Set the switch on your calibration tool to VLow and carefully adjust VR1 to give 1.25 volts on the voltmeter.

8.      Repeat steps 6 and 7 until there is no change.  Move the jumper to the run position, you should get a voltage on the voltmeter between 4 and 6 volts depending on what the local barometric pressure is.  You can calculate the barometric pressure with the following formula (assuming you are using 28/31 and 1.25/8.25).

9.      Finally, when you get the barometer installed on your weather network you can make minor changes to the calibration to get it to agree very closely with nearby known to be accurate readings.  Let’s say that your barometer is reading 0.08 inHg too high.  Just subtract 0.08 from both the 28 and 31 inHg entered in the software settings.

Barometric pressure (corrected to sea level) =

     (Voltage reading – 1.25) / 7 * 3 + 28

 

Problems:

 

1.      Check for bad solder joints.  Hold the board up to a light to see if any traces are broken.

2.      Make sure the DS2438 and LM358 are the correct way round

3.      Be sure you have correct polarity on the capacitors and diodes.

4.      Make sure that you wire the RJ45 plug up correctly, +12-24v is Pin 3 and or 6, 1-Wire Data is Pin 4, 1-Wire Ground is Pin 5 and Power Ground is Pin 7 and or 8, if used with the 1-Wire hub then this shouldn’t matter, just use a straight through 1-1 CAT5 patch lead.