กลับไปหน้ารวมไฟล์
finally-a-way-to-sort-out-your-resistors-33cfd4-en.md

The "demand" I address with this work is reading the value of a resistor in a simple way to sort them back in the proper drawers and keep the table uncluttered. Yes, there's the color codes but... ;-( YES, there's the multimeter with the proper attachments but...

Is it not better to just plainly READ IT?

A 16x2 LCD just out of the kit provides the display needs in full

I started this first project as a way to learn better and make it available a great idea to those who have just started with a basic kit.

So I started this first project as a way to learn better and make it available a great idea (Federico's - see credits) to those who have just started with a basic kit and the UNO board.

The theoretical principle that is applied here (and in many other projects) is the "Voltage divider equation" (see Wikipedia https://en.wikipedia.org/wiki/Voltage_divider) - to make difficult things simple it is a way to calculate one resistor value that you don't know putting two one after the other and reading how much of the total voltage the know resistor make you read at its terminals. The nearer the two are the more precise the result can be - so to make a balanced compromise we use five different values of know sample resistors.

Let's get started!!!

You need to make ready the components. The scheme below will easily take you to configure the breadboard. I used two different ones - to keep the 16x2 LED display function as much similar as to those of the tutorials (you should try the display as a separate part first, if you have not done it yet!) and get more visibility on the simple resistor part 'addition'. There's plenty of space left on the main breadboard to move it all on one - you just need to keep connected with the 5 green wires and the yellow one as before.

Full -fritzing- breadboard view

When you have arranged the components in this way you can also try to move it around checking with the schematics below:

Schematics

At the end it should be something like...

Now is time to open up the coding - pick up the code in the proper section of this page and start reading it to feel it up. As everything in an Open Source environment it is a collage of what others have built before us. In particular all the sections that enable the visualization on the LCD is very standard.

I added on the original project a FUNCTION - that is a separate piece of code that gets AFTER the usual two sections of "setup" and "loop" - that can be "called" to make a specific calculation or - in the case a formatting - of one or more variables. I used it to transform a number 1.000.121, 34 in a string that is readable after the normal conventions for resistors - such as 1MOhm. The rounding and formatting would need a more extensive testing to check for all exceptions and anomalies... help me there.

String OhmFormattingFunction(float Input) {

//FS 20200223 v0 - Ohm values formatting function **

String Result;

if (Input < 80) {

valore = (String(round(Input)));

suffisso = " ";

}

....

I confess I kept some words inside the code in the Italian (Leonardo's!) language but it will take just a moment for you to replace them with... whatever idiom you were born to or in the English we all share. There are extensive debugging inserts in form of printed serial text to follow the procedure from the monitor.

IMPROVEMENT PATH:

  • First of all you should make this yours by adapting it to your style and needs - correct the unavoidable mistakes and try to improve the calculations and/or the formatting letting us all know by commenting (much appreciated)
  • I strongly suggest you buy a 0.96" OLED display and try it out - it is quite inexpensive and easy to implement (see Federico's project)
  • Another way to get nearer to a finished "product" is to port it to a Nano Every - I found that the pins are the same etc. (this requires soldering and although it is not difficult, it implies a different level of involvement).

EXPANDED TECHNICAL DETAILS

Automated Component Categorization

This project provides a professional solution for the "Drawer of Doom"—sorting thousands of loose resistors by their exact Ohm value.

  • High-Precision Voltage Divider: The Arduino uses a known reference resistor and a 10-bit Analog-to-Digital Converter (ADC) to calculate the resistance of the "Unknown" component using Ohm's Law.
  • Auto-Ranging Logic: The system automatically switches between different reference resistors (e.g., 220Ω, 10kΩ, 1MΩ) using an internal relay or transistor bank to maintain high measurement accuracy across a wide range (1Ω to 10MΩ).

Mechanical Sorting

  • Servo-Driven Binning: After measuring the value, the Arduino drives a Micro Servo to position a chute over one of several bins, effectively "Launching" the resistor into its correct category based on its E12 or E24 value.

ข้อมูล Frontmatter ดั้งเดิม

title: "Finally a way to sort out your resistors"
description: "OK! There's the color codes but small as they are we can use a simple \"ohmmeter\" that just gives us the value with a single move."
author: "flavios"
category: "Lab Stuff"
tags:
  - "debugging tools"
views: 7119
likes: 6
price: 2450
difficulty: "Intermediate"
components:
  - "1x Resistor 100 ohm"
  - "1x Resistor 1k ohm"
  - "1x Resistor 1M ohm"
  - "1x Jumper wires (generic)"
  - "1x Resistor 100k ohm"
  - "1x Alphanumeric LCD, 16 x 2"
  - "1x Resistor 10k ohm"
  - "1x Arduino UNO"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles:
  - "https://projects.arduinocontent.cc/bd22d76c-b68c-4dd9-bf05-7460f3580280.ino"
documentationLinks: []
passwordHash: "e5e72a6bd26a019c6a34df7beb04f4e6eaf11ba270435739a78761d984729e3a"
encryptedPayload: "U2FsdGVkX193cA6/Uixrh6VlGGmrHfdxHIQLfI30zhOrtMZv3kRWVeSirlOjQvzg3D4ED9hkDrPzUa1VLvHtu0Hmv4JaBtXy42hheVo6Z3Q="
seoDescription: "Easily sort resistors with a DIY Arduino ohmmeter. Get instant values without struggling to read tiny color codes."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/finally-a-way-to-sort-out-your-resistors-33cfd4_cover.jpg"
lang: "en"