Page 1 of 2
R Meter click
From MikroElektonika Documentation
R Meter click is a mikroBUS™ add-on board with circuitry for measuring the value
of resistors. The board can be used to measure a wide range of resistors (from 0 to 1
Mega Ohm). It has three plates for SMD resistors (0603, 0805, 1206) and a header for
thru hole resistors.
R Meter click
Features and usage notes
The design of R Meter click is
based on a non-inverting amplifier
circuit, with the measured resistor
placed in a feedback loop that
influences the gain of the
amplifier.
The analog output is fed through a
12-bit ADC with the final output
going through the mikroBUS™
SPI interface.
Since the ADC has a limited minmax range (0-2043), R Meter click
employs a multiplexer that can
adjust the input signal to the
amplifier and thus allow the same
ADC to measure four different scopes of values (0-1k , 1k-100k, 100k-1M)
Schematic also available in PDF (http://cdndocs.mikroe.com/images/3/39/R-meter-clickschematic.pdf)
The supplied firmware (available on Libstock) automatically scans the ADC value and
switches the multiplexer output based on the resistor in place. The multiplexer
interfaces directly with the target board MCU through mikroBUS™ S1, S2, and S3
pins (in place of default mikroBUS™ PWM, INT and RST).
Onboard screw terminals are placed to allow the click to be used with multimeter
probes.
R Meter click is a handy tool but it’s not to be used as a precision instrument. The
linearity of the OpAmp impacts the measurement.
R Meter click
IC/Module
74HC4053
(http://www.nxp.com/documents/data_sheet/74HC_HCT4053.pdf)
REF2925 (http://www.ti.com/general/docs/lit/getliterature.tsp?
genericPartNumber=ref2925&fileType=pdf)
AD8615 (http://www.analog.com/media/en/technicaldocumentation/data-sheets/AD8615_8616_8618.pdf)
Interface
SPI, S1, S2, S3
Power
supply
5V
Website
www.mikroe.com/click®-meter
(http://www.mikroe.com/click/r-meter)
The board is designed to use a 5V power supply.
Programming
This example shows how to set up R Meter click, and read out the resistance in ohms (Ω) every 250 ms.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include
#include "r_meter.h"
//sbits
sbit S1 at GPIOA_ODR.B0;
sbit S2 at GPIOD_ODR.B10;
sbit S3 at GPIOC_ODR.B2;
sbit R_METER_CS at GPIOD_ODR.B13;
//Prototypes
void system_setup( void );
//Main
void main()
{
//Local Declarations
char txt[20] = { 0 };
float ohms_var = 0;
//Setup
system_setup();
while (1)
{
ohms_var = r_meter_get_ohms();
if( ohms_var == 0 )
UART1_Write_Text( "Over Range\r\n" );
else
{
FloatToStr( ohms_var, txt );
UART1_Write_Text( "OHMS: " );
UART1_Write_Text( txt );
UART1_Write_Text( "\r\n" );
}
delay_ms(250);
Page 2 of 2
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
}
}
void system_setup( void )
{
// GPIOs
GPIO_Digital_Output( &GPIOD_BASE, _GPIO_PINMASK_10 | _GPIO_PINMASK_13 );
GPIO_Digital_Output( &GPIOC_BASE, _GPIO_PINMASK_2 );
GPIO_Digital_Output( &GPIOA_BASE, _GPIO_PINMASK_0 );
GPIO_Digital_Input( &GPIOA_BASE, _GPIO_PINMASK_4 );
//UART
UART1_Init(9600);
Delay_ms(100);
UART1_Write_Text( "Starting\r\n" );
// Initialize UART module at 9600 bps
// Wait for UART module to stabilize
//ADC
//ADC1_Init(); //For direct analog values
Delay_ms(200);
UART1_Write_Text( "UART Initialized\r\n" );
SPI3_Init_Advanced( _SPI_FPCLK_DIV4,
_SPI_MASTER | _SPI_8_BIT | _SPI_CLK_IDLE_LOW |
_SPI_SECOND_CLK_EDGE_TRANSITION | _SPI_MSB_FIRST |
_SPI_SS_DISABLE | _SPI_SSM_ENABLE |
_SPI_SSI_1,
&_GPIO_MODULE_SPI3_PC10_11_12 );
Delay_ms( 200 );
UART1_Write_Text( "SPI Initialized\r\n" );
}
r_meter_init();
UART1_Write_Text( "R Meter Initialized\r\n" );
Code examples that demonstrate the usage of R Meter click with MikroElektronika hardware, written for mikroC for ARM, AVR, dsPIC, FT90x, PIC and PIC32
are available on Libstock (http://libstock.mikroe.com/projects/view/1905/r-meter-click).
Resources
- R Meter click Libstock example (http://libstock.mikroe.com/projects/view/1905/r-meter-click)
- mikroBUS™ standard specifications (http://download.mikroe.com/documents/standards/mikrobus/mikrobus-standard-specification-v200.pdf)
http://docs.mikroe.com/R_Meter_click
9/15/2016
很抱歉,暂时无法提供与“MIKROE-2396”相匹配的价格&库存,您可以联系我们找货
免费人工找货