Header Ads

Header ADS

How To Make Auto Ranging Ohm Meter

 How To Make Auto Ranging Ohm Meter



📌JLCPCB Prototype for $2(Any Color): https://jlcpcb.com

Hello Dear, Welcome to the new blog. In this video tutorial, I will show you How to make an auto-ranging ohmmeter. These are really cool projects. You can measurement any resistor value without selecting any resistor range. The Parts required for this Project 1. Atmega 328p IC
2. 28 Pin IC Base
3. Transistor 2N2906x5
4. Resistor 1K, 10k, 100k, 1M, 2M
5. Resistor 10K x1
6. LED
7. HC05 Bluetooth Sensor
8. IC Base 28 Pin
9. AC Terminal Block 2pin x2
10. AC Terminal Block 3Pin
11. 22pf Capacitor
12. Variable Resistor
13. Female to Male IC Rail
14. Power Socket
15. 16Mhz Crystal
16. USB B Type
17. LCD 16x2


Circuit Diagram:



Code:

#include <LiquidCrystal.h> // include Arduino LCD library // LCD module connections (RS, E, D4, D5, D6, D7) LiquidCrystal lcd(2, 3, 4, 5, 6, 7); #define CH0 12 #define CH1 11 #define CH2 10 #define CH3 9 #define CH4 8 // variables byte ch_number; uint32_t res; const uint32_t res_table[5] = {100, 1000, 10000, 100000, 2000000}; char _buffer[11]; void setup(void) { Serial.begin(9600); lcd.begin(16, 2); // set up the LCD's number of columns and rows lcd.setCursor(0, 0); // move cursor to column 0, row 0 [position (0, 0)] lcd.print("Resistance ="); pinMode(CH0, OUTPUT); pinMode(CH1, OUTPUT); pinMode(CH2, OUTPUT); pinMode(CH3, OUTPUT); pinMode(CH4, OUTPUT); ch_number = 4; ch_select(ch_number); } // main loop void loop() { uint16_t volt_image = analogRead(A1) + 1; if(volt_image >= 550 && ch_number < 4) { ch_number++; ch_select(ch_number); delay(50); return; } if(volt_image <= 90 && ch_number > 0) { ch_number--; ch_select(ch_number); delay(50); return; } if(volt_image < 900) { float value = (float)volt_image*res/(1023 - volt_image); if(value < 1000.0) sprintf(_buffer, "%03u.%1u Ohm ", (uint16_t)value, (uint16_t)(value*10)%10); else if(value < 10000.0) sprintf(_buffer, "%1u.%03u kOhm", (uint16_t)(value/1000), (uint16_t)value%1000); else if(value < 100000.0) sprintf(_buffer, "%02u.%02u kOhm", (uint16_t)(value/1000), (uint16_t)(value/10)%100); else if(value < 1000000.0) sprintf(_buffer, "%03u.%1u kOhm", (uint16_t)(value/1000), (uint16_t)(value/100)%10); else sprintf(_buffer, "%1u.%03u MOhm", (uint16_t)(value/1000000), (uint16_t)(value/1000)%1000); } else sprintf(_buffer, "Over Load "); lcd.setCursor(0, 1); // move cursor to position (0, 1) lcd.print(_buffer); Serial.println(_buffer); Serial.println(); delay(500); // wait some time } void ch_select(byte n) { switch(n) { case 0: digitalWrite(CH0, LOW); digitalWrite(CH1, HIGH); digitalWrite(CH2, HIGH); digitalWrite(CH3, HIGH); digitalWrite(CH4, HIGH); break; case 1: digitalWrite(CH0, HIGH); digitalWrite(CH1, LOW); digitalWrite(CH2, HIGH); digitalWrite(CH3, HIGH); digitalWrite(CH4, HIGH); break; case 2: digitalWrite(CH0, HIGH); digitalWrite(CH1, HIGH); digitalWrite(CH2, LOW); digitalWrite(CH3, HIGH); digitalWrite(CH4, HIGH); break; case 3: digitalWrite(CH0, HIGH); digitalWrite(CH1, HIGH); digitalWrite(CH2, HIGH); digitalWrite(CH3, LOW); digitalWrite(CH4, HIGH); break; case 4: digitalWrite(CH0, HIGH); digitalWrite(CH1, HIGH); digitalWrite(CH2, HIGH); digitalWrite(CH3, HIGH); digitalWrite(CH4, LOW); } res = res_table[n]; }





////////////////////////////////////////////////////////

More information



3 comments:

  1. 6 Best Lawyer & Lawfirm WordPress Theme | RSTHEME

    Find the most exclusive theme to start your lawyer firm in wordpress with top features and functionality with unlimited potential. More free and paid templates, themes on RSTHEME now!

    ReplyDelete
  2. Silveredge Casino a offers this unique opportunity to the players and members to play and have a first-hand experience of games by popular software companies that are yet to release on common platforms. So be the first one to play the game and be a part of a group of elite members.

    ReplyDelete
  3. This post shows how to build a simple auto-ranging DrTest.net using Arduino uno board where resistor value is displayed on 16×2 LCD screen and on the laptop through serial monitor software

    ReplyDelete

Theme images by Bim. Powered by Blogger.