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]
Rating:
Author: MIKROE
Last Updated: 2020-03-11
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Environmental
Downloaded: 3565 times
Not followed.
License: MIT license
Radiation Click is a Click boardâ„¢ based on BG51 radiation sensor from Teviso Sensor Technologies. The function of the BG51 radiation sensor is based on an array of customized PIN diodes.
Do you want to subscribe in order to receive notifications regarding "Radiation click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Radiation click" changes.
Do you want to report abuse regarding "Radiation click".
Library Description
The library contains a reading of the state on the interrupt pin. Calculates the number of interruptions in one minute (cpm).
Key functions:
uint32_t radiation_get_cpm_counter( uint8_t cpm_time )
- Gets CPM ( Counts per minute ).void radiation_tick( )
- Tick functions.uint8_t radiation_get_int_state( )
- Gets interrupt pin state.Examples description
The application is composed of three sections :
We used a PB40 sensor with <0.05uCi for the test.
void application_task ( )
{
uint32_t cpm_value = 0;
char demo_text[ 50 ];
uint8_t rsp_drdy;
char rsp_data;
rsp_drdy = UART_Rdy_Ptr( );
if ( rsp_drdy != 0 )
{
rsp_data = UART_Rd_Ptr( );
switch ( rsp_data )
{
case 'S' :
{
mikrobus_logWrite( " --- PLEASE WAIT FOR THE CALCULATION PROCESS TO COMPLETE ---", _LOG_LINE );
mikrobus_logWrite( " --- RADIATION MEASUREMENT TAKES 60 SECONDS ---", _LOG_LINE );
radiation_config_timer( );
cpm_value = radiation_get_cpm_counter( RADIATION_CPM_TIME_60s );
WordToStr( cpm_value, demo_text );
mikrobus_logWrite( " Radiation in [CPM]: ", _LOG_TEXT );
mikrobus_logWrite( demo_text, _LOG_LINE );
FloatToStr( cpm_value * RADIATION_CONSTANT_uSv, demo_text );
mikrobus_logWrite( " Radiation in [uSv/h]: ", _LOG_TEXT );
mikrobus_logWrite( demo_text, _LOG_LINE );
break;
}
}
}
}
Other mikroE Libraries used in the example:
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.