TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139566 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57256 times)
  4. USB Device Library (47615 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42566 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26933 times)
  10. microSD click (26309 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

EZO Carrier ORP Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.4

mikroSDK Library: 2.0.0.0

Category: Environmental

Downloaded: 72 times

Not followed.

License: MIT license  

EZO Carrier Click - ORP is a compact add-on board suitable for determining a liquid's oxidation/reduction potential in your application. This board features the EZO-ORP™, an ISO 11271 compliant embedded ORP circuit board from Atlas Scientific.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "EZO Carrier ORP Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "EZO Carrier ORP Click" changes.

Do you want to report abuse regarding "EZO Carrier ORP Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


EZO Carrier ORP Click

EZO Carrier Click - ORP is a compact add-on board suitable for determining a liquid's oxidation/reduction potential in your application. This board features the EZO-ORP™, an ISO 11271 compliant embedded ORP circuit board from Atlas Scientific.

ezocarrierorp_click.png

Click Product page


Click library

  • Author : Stefan Ilic
  • Date : Nov 2023.
  • Type : UART type

Software Support

We provide a library for the EZO Carrier ORP Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for EZO Carrier ORP Click driver.

Standard key functions :

  • ezocarrierorp_cfg_setup Config Object Initialization function.

    void ezocarrierorp_cfg_setup ( ezocarrierorp_cfg_t *cfg );
  • ezocarrierorp_init Initialization function.

    err_t ezocarrierorp_init ( ezocarrierorp_t *ctx, ezocarrierorp_cfg_t *cfg );

Example key functions :

  • ezocarrierorp_send_cmd Send command function.

    void ezocarrierorp_send_cmd ( ezocarrierorp_t *ctx, uint8_t *cmd );
  • ezocarrierorp_send_cmd_with_par Send command function with parameter.

    void ezocarrierorp_send_cmd_with_par ( ezocarrierorp_t *ctx, uint8_t *cmd, uint8_t *param_buf );
  • ezocarrierorp_send_cmd_check Check the sent command.

    void ezocarrierorp_send_cmd_check ( ezocarrierorp_t *ctx, uint8_t *cmd );

Example Description

This example demonstrates the use of EZO Carrier ORP Click board by processing the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver, performs the Click default factory reset, and single point calibration with a calibration solutio with 225 mV ORP value.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    ezocarrierorp_cfg_t ezocarrierorp_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    ezocarrierorp_cfg_setup( &ezocarrierorp_cfg );
    EZOCARRIERORP_MAP_MIKROBUS( ezocarrierorp_cfg, MIKROBUS_1 );
    if ( UART_ERROR == ezocarrierorp_init( &ezocarrierorp, &ezocarrierorp_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    log_printf( &logger, "Device status \r\n" );
    ezocarrierorp_send_cmd( &ezocarrierorp, EZOCARRIERORP_CMD_STATUS );
    error_flag = ezocarrierorp_rsp_check( &ezocarrierorp, EZOCARRIERORP_RSP_OK );
    ezocarrierorp_error_check( error_flag );

    log_printf( &logger, "Factory reset \r\n" );
    ezocarrierorp_send_cmd( &ezocarrierorp, EZOCARRIERORP_CMD_FACTORY );
    error_flag = ezocarrierorp_rsp_check( &ezocarrierorp, EZOCARRIERORP_RSP_READY );
    ezocarrierorp_error_check( error_flag );

    log_printf( &logger, "Device info \r\n" );
    ezocarrierorp_send_cmd( &ezocarrierorp, EZOCARRIERORP_CMD_DEV_INFO );
    error_flag = ezocarrierorp_rsp_check( &ezocarrierorp, EZOCARRIERORP_RSP_OK );
    ezocarrierorp_error_check( error_flag );

    uint8_t n_cnt = 0;
    uint8_t last_reading[ APP_BUFFER_SIZE ] = { 0 };
    ezocarrierorp_clear_app_buf( );
    ezocarrierorp_send_cmd( &ezocarrierorp, EZOCARRIERORP_CMD_SINGLE_READ );
    ezocarrierorp_process ( &ezocarrierorp );
    strcpy( last_reading, app_buf );
    log_printf( &logger, "Place the probe into the calibration solution,\r\n" );
    log_printf( &logger, "for single-point calibration \r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    log_printf( &logger, "Waiting for stable readings \r\n" );
    while ( n_cnt <= 5 )
    {
        if ( EZOCARRIERORP_OK == ezocarrierorp_process ( &ezocarrierorp ) )
        {  
            if ( 0 == strstr( app_buf, last_reading ) )
            {
                n_cnt++;
            }
            else
            {
                strcpy( last_reading, app_buf );
                n_cnt = 0;
            }
        }
        log_printf( &logger, "- " );
        Delay_ms ( 1000 );
        ezocarrierorp_clear_app_buf( );
    }

    #define CALIBRATION_VALUE   "225"
    log_printf( &logger, "\r\n Calibration \r\n" );
    ezocarrierorp_send_cmd_with_par( &ezocarrierorp, EZOCARRIERORP_CMD_CAL, CALIBRATION_VALUE );
    error_flag = ezocarrierorp_rsp_check( &ezocarrierorp, EZOCARRIERORP_RSP_OK );
    ezocarrierorp_error_check( error_flag );

    #define DISABLE_CONT_READ   "0"
    log_printf( &logger, "Disable continuous reading mode \r\n" );
    ezocarrierorp_send_cmd_with_par( &ezocarrierorp, EZOCARRIERORP_CMD_CONT_READ, DISABLE_CONT_READ );
    error_flag = ezocarrierorp_rsp_check( &ezocarrierorp, EZOCARRIERORP_RSP_OK );
    ezocarrierorp_error_check( error_flag );

    log_info( &logger, " Application Task " );
}

Application Task

Initializes the driver, performs the Click default factory reset, and single point calibration with a calibration solutio with 225 mV ORP value.

void application_task ( void ) 
{
    log_printf( &logger, "Reading... \r\n" );
    ezocarrierorp_send_cmd( &ezocarrierorp, EZOCARRIERORP_CMD_SINGLE_READ );
    error_flag = ezocarrierorp_rsp_check( &ezocarrierorp, EZOCARRIERORP_RSP_OK );
    ezocarrierorp_error_check( error_flag );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.EZOCarrierORP

Additional notes and informations

Depending on the development board you are using, you may need USB UART Click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

Wheatstone click

5

Wheatstone Click is a measurement Click board which utilizes a Wheatstone bridge circuit onboard, in order to precisely measure the resistance of an external element. Besides the wheatstone bridge circuit, this Click board also utilizes MAX4208 – an ultra-low offset/drift, precision instrumentation amplifier, from Maxim Integrated.

[Learn More]

LTE Cat.4 3 Click

0

LTE Cat.4 3 Click is a compact add-on board representing a multi-band and multi-mode solution, offering universal connectivity and reliable performance. This board features the LARA-L6004D-01B, an LTE Cat 4 module in the smallest form factor from u-blox. The module supports an LTE Cat 4 FDD and an LTE Cat 4 TDD radio access technology (RAT), with a 3G UMTS/HSPA and 2G GSM/GPRS/EGPRS fallback. It is an ideal solution for global and multi-regional coverage.

[Learn More]

Barometer 8 Click

0

Barometer 8 Click is a compact add-on board used to measure air pressure in a specific environment. This board features the ILPS22QS, an ultra-compact piezoresistive absolute pressure sensor that functions as a digital output barometer from STMicroelectronics. The ILPS22QS comprises a sensing element and an IC chip for signal processing in one package, converts pressure into a 24-bit digital value, and sends the information via a configurable host interface that supports SPI and I2C serial communications. It has a selectable dual full-scale absolute pressure range, up to 1260hPa and 4060hPa, with an accuracy of 0.5hPa over a wide operating temperature range.

[Learn More]