Mirko Pavleski
Published © GPL3+

DIY Precise Arduino Miliohmmeter

Simple and inexpensive way to make such an instrument, with which we can measure resistances with a resolution of 1 milliohm.

BeginnerFull instructions provided3 hours1,543
DIY Precise Arduino Miliohmmeter

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
TM1637 4-digit 7-segment display
×1
ADS1110 16bit A/D converter module
×1
Capacitor 100 nF
Capacitor 100 nF
×3
Capacitor 10 µF
Capacitor 10 µF
×1
Resistor 100 ohm
Resistor 100 ohm
×1
Pushbutton Switch, Momentary
Pushbutton Switch, Momentary
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Schematics

Schematic

.

Code

Arduino code

C/C++
...
#include <Wire.h>
#include <STM32_TM1637.h>                // http://rcl-radio.ru/wp-content/uploads/2020/02/STM32_TM1637_V1_3.zip
STM32_TM1637 tm(2,3);// CLK, DIO
 
#define ADDR 0x48
#define U33 3.342
int n=3;
float r,u,n_u=0.256,r0;
  long dig_sum,dig;
  int value,f;
 
void setup() {
  Serial.begin(9600);
  tm.brig(7); // ЯРКОСТЬ 0...7
  Wire.begin();
  pinMode(4,INPUT_PULLUP);// null
}
 
void loop() {
  r = ((100.00*u)/(U33-u))-r0;
  if(digitalRead(4)==LOW&&r<0.1){r0=((100.00*u)/(U33-u));delay(200);}
 
  for(int i=0;i<10;i++){
  read_u();
  dig_sum = dig_sum+value;delay(10);}
 
read_u();if(value>0x7FFF-0xF&&n==1){delay(10);n=0;n_u=2.048;}
read_u();if(value>0x7FFF-0xF&&n==2){delay(10);n=1;n_u=1.024;}
read_u();if(value>0x7FFF-0xF&&n==3){delay(10);n=2;n_u=0.512;}
read_u();if(value<16380&&n==0){delay(10);n=1;n_u=1.024;}
read_u();if(value<16380&&n==1){delay(10);n=2;n_u=0.512;}
read_u();if(value<16380&&n==2){delay(10);n=3;n_u=0.256;}
 
  dig = dig_sum/10;dig_sum=0;
  u = dig*n_u/0x7FFF;
 
 if(r<10){tm.print_float(r,3 ,0,0,0,0);}
 if(r>=10&&r<100){tm.print_float(r,2 ,0,0,0,0);}
 if(r>=100&&r<=150){tm.print_float(r,1 ,0,0,0,0);}
 if(r>150){tm.print_float(r,0 ,0b01000000,0b01000000,0b01000000,0b01000000);}
 
 Serial.println(r0,5);
  }
 
float read_u(){
  Wire.beginTransmission(ADDR);
  Wire.write (0b10001100+n);
  Wire.endTransmission();
  Wire.requestFrom(ADDR,2);
  while(Wire.available()<2);
  value = (Wire.read()<<8) + (Wire.read());
  }

Library

C/C++
.
No preview (download only).

Credits

Mirko Pavleski

Mirko Pavleski

141 projects • 1241 followers

Comments