Ohm Sense makes sense of resistor color bands

[Alex Busman]‘s first foray in iOS programming looks like a pretty useful tool. He came up with Ohm Sense, an iPhone app that will take a picture of a resistor and calculate the value based on the color bands. It’s a great tool that we wish we had when we were starting out. At 99 cents, the app is also much cheaper than the emotional cost of our relationship with Violet.

[Alex]‘s used OpenCV for processing of the image data. The app works by scanning the image from the top-left corner and continuing until it sees a beige rectangle. After a bounding box is drawn around the resistor, the iPhone scans the image for columns of color. After a little interpretation, the value of the resistor is displayed on the screen. While it only works on resistors with beige plastic now, [Alex] says he’ll expand that in the future to include blue bodied metal-oxide resistors. [Alex] says the coding only took a week, so if anyone would like code a similar app for Android, be sure to tell us on our tip line.

This isn’t [Alex]‘s first Hack A Day build. We featured his Handy Board project that uses an NES controller to play some chiptunes earlier this summer. Compared to the projects we’ve let slip over the last few months, it’s good to see someone did something productive with their summer.

[Alex] posted a demo of his resistor app on YouTube. Check it out below.

Comments

  1. grenadier says:

    I hardly believe this is any faster than just thinking about it yourself

    • Joris says:

      That depends. I, for example, have a form of red-green collorblindness (deuteranopic). Therefore it is for my almost impossible to read the values on resistors, because it becomes in my cause harder to see differences between red, green and brown if the colored surfaces become smaller. (I cab for example see the difference between a red and a green car because it is a large surface, but not that of a green and a red strip on a resistor).

      Normally I orden all my resistors very good, but if I orden them I must use my non-self-range multimeter, wich can be an enourmus job. So this is something great for me.

      p.s. sorry if my English is bad, it is not my native language!

      • The Cageybee says:

        I agree. I suffer from a sort of shade blindness. Difficulty differentiating similar shades of colours.
        It only really has two implications:
        1) I can’t find the numbers amongst the coloured dots in those books the optician makes you look at when you go for an eye test (Ishihara Test);
        2) Reading resistor colours.

        So, yeah. But please release for Android.

      • Keba says:

        Me too =)
        I really only have problems when crawling behind computers to plug in headphones. One jack is pink and one is light green. When it’s dark, I can easily convince myself the green jack is pink etc, but if I move my head slightly, they suddenly switch as if the colors actually changed.

      • lizardb0y says:

        I’m also colour blind (protanopic) and so have always used a meter to test resistor values. Not so useful for mounted compoents though. I’d definitely find an Android app like this immensely valuable.

    • Sjoerd says:

      Oke for the color blind its a good thing, but using your brain isn’t a bad thing ;)

  2. Solidacid says:

    screw iphone crapps, i want one for ANDROID!

    • Badwolf says:

      +1 on this.
      Kudo to the programmer first of all,
      make it open source and for android now please.

      Paying for something is hardly what we (hackers) like to do,instead I’m pretty sure someone can code it on Processing and then it’s a matter of dbl-click to port it to arduino. I’m not much of a processing coder tho,if someone feel like it,you got all my support!

    • GeekMan says:

      :D AGREED and if yall havent checked this out for android its called electrodroid its really neat its got spec sheets for popular pin outs, calculators, law refrences, charts etc…

      but this is cool too

  3. Mohammed says:

    This is excellent. I’m a newbie in hobbyist electronics, and I’m also colorblind, and so figuring out resistor values is a horrid experience for me. This app would certianly be useful, except that I don’t have (or want) an iOS device.

    Now they should just make an Android version…

  4. svofski says:

    Resistor colour bands should be in the same place where the inches are.

  5. grelfod says:

    Bad Boys Rape Only Young Girls, But Violet Gives Willingly
    never needed an app before…

  6. Balloonman says:

    Violet! It’s been years since I remembered Violet! Will never forget the first time my wife heard that mnemonic.

    Seems to me like this tool would come in handy for the occasional hobbyist who just didn’t want to go to the trouble. Of course we could all “just think about it ourselves,” but we could also print Hack A Day in a daily newsletter and deliver it through snail mail channels.

    It might be even handier for those of us who are aging and can’t see those tiny bands of colors as well as we once could. Just reach for the phone instead of the magnifiers. More than once I have used a digital photo when I didn’t have a magnifier handy.

    As far as this being an ad for an app, I don’t see it that way. Seems to me like Alex has adapted a tool (smartphone) to do his bidding, and the writers are just passing on the info to people who might be interested in doing the same.

  7. Pilotgeek says:

    This is wonderful for those who are colorblind. For anyone else, learn your resistor codes already =P

  8. Kyle says:

    This is amazing!

    Of course, it’s not all that useful to me, as it only reads the beige 4-band resistors which I can read without difficulty, but it can’t read those blue 5-band resistors, which I’ve never been able to figure out.

  9. sneakypoo says:

    Yet another reason SMT rocks, no silly magic ring decoding to do. Personally I’ve never understood why they can’t just print the damn number on them like they do for caps and most other things (yes, I realise cost is an issue but c’mon!).

    • svofski says:

      They used to do so in USSR. Our resistors used to have something like 2K7 5% written on them and the resistors thus were the easiest components to sort.

      Ring colour code is the most absurd thing that happened to electronics in all its history. Boycott it, use SMD :D

      • Johan says:

        I think there is a reason for color coding. Reading letters of a round cylinder gets harder and harder when the component gets smaller.

        Ever tried reading the voltage off of a small zener diode?

        Color codes are easiest to register, but decoding them is a matter of remembering the values/colors and reading a lot of resistors.

        (I’m lazy, just grabbing the DMM everytime)

    • abobymouse says:

      Bands can be read no matter what way the resistor is put in. Machines and low paid assembly workers don’t need to fiddle with resistors to get the oriented correctly, they can just jam them in.

  10. KillerBug says:

    An android version would be nice…but I am not color blind, so I think it would be slower for me. Maybe future versions could take a picture of like 20 resistors at once?

  11. Keba says:

    The app seems well-written and useful.

    I actually submitted this computer vision problem as a 6. Semester project, half a year ago. It was rejected due to its simplicity, e.g. there was not enough theory on choice of features, feature extraction, etc.
    I ended up doing a license plate recognition application with OCR, written completely in Java without the use of pre-written filters and methods.

  12. Bill rowe says:

    I liked the idea but i couldn’t get it to work. How do i get my $.99 and my 15 minutes back?

  13. Alex Busman says:

    Once I’m back in school, I’ll have android phones to test on and I was planning on porting it then. That’s in September, however.

  14. Addidis says:

    This is awesome, if im understanding it right it would help people like me who see certain shades of color wrong. Now if i could only afford an I device I would totally pay the buck for this.
    For me my resistors stay sorted , are used once , then go into a bin to be sorted by meter. I could see this making the whole process easier by making it scan over and over and just hold the resistor under the cam for a second and it spits out a value. +1 looking forward to continued development of the concept to a more useful Idevice-less interface I could afford.

  15. Alex Busman says:

    I have also submitted a bugfix to apple that will hopefully be approved sometime next week. It was crashing under one lighting condition. Also when I get back to school, I will have easy access to tonnes of different brands so it will work for everyone. I also then intend to get 5 and 6 band resistors on it.

  16. rasz says:

    if you are going to use a tool, why not use a multimeter?

    • Addidis says:

      Its just more of a pain to have to touch the leads, holding it infront of a camera would be much easier and faster depending on the processing time.

    • N0LKK says:

      A multimeter can’t alert you to a faulty component, unless you know what the value of a component is supposed to be..

    • N0LKK says:

      I have no guilt over my relationship with Violet, she’s well over 18. Even if one doesn’t need the app it’s worth 99 cents for entertainment.

    • Peter says:

      If you’re trying to read the value of a resistor in a circuit, a multimeter will also measure the resistance of any other components the resistor happens to be in parallel with. If that’s a semiconductor, all bets are off as to what value you’ll read.

  17. therin says:

    more colorblind here that statistic allow

  18. t&p says:

    why don’t they just put numbers on the damned things

  19. blue carbuncle says:

    Why would they ever use Orange/Red when they aer never universal, except in the fact that they always look the same on resistors.

  20. Burnerjack says:

    You can’t be jealous, Violet was just “popular’.

  21. Richard says:

    Another colour-blind hacker here…

    This app solves a problem DMMs can’t solve for me, situations where the resistor you’re trying to read is already in-circuit and there may be other paths for the current so the DMM reading can’t be trusted.

    Nice work – and genuinely game-changing for me. :-)

  22. Jac Goudsmit says:

    When I was about 7 or 8 years old, one of the first things I learned about electronics, without even knowing what it was, was the list of E12 values: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82.

    The first thing I ever owned that was related to electronics was a credit card sized plastic thingy from Philips that let you rotate 4 discs inside it to select colors and see the values. I learned the colors from that.

    I’m fortunate enough not to be color blind, but with this knowledge I can read most resistor values even in bad light because in most cases I know what it must be: If it looks like orange-violet-brown I know it’s probably really red-violet-brown because 370 ohm resistors don’t exist (at least not with 5% or 10% tolerances), and 270 ohm is an E12 value.

    That just leaves the difference between red-red-something and orange-orange-something… I guess I could use it for that.

    But I was thinking this should really be part of a bar code reader app… After all, resistor codes are really just early bar codes…

  23. Whatnot says:

    Weird how the software development enthusiasm for phones is so much greater than it ever was for computers it seems to me.
    Same for the rate at which the hardware is advanced, maybe I should finally get a smartphone and simply not use a SIM card and use it as a small wifi connected computer.
    Never apple for me though, too locked up and creepy.
    But google is getting worse and worse too though IMHO, sigh.

    Excuse me if I went a bit off-topic perhaps

    • Mohammed says:

      If you’re going to get a smartphone but without using a sim card, you can always go for those handheld tablets like the iPod Touch or a couple of Android tablets. They’re essentially what you’re looking for, and way cheaper.

      It’s just convenient to have programs being very portable in your pocket, that’s why there’s lots of enthusiasm. I think the fact that these phones use managed code as their default language is also another reason

      • Whatnot says:

        Hmm, but the tablets are not pocketable, and I know the ipod touch is but I don’t like the apple ways, and I’m not sure there are android type devices similar to the ipod touch, at least I don’t recall seeing them, smallest I recall is 7″ screensize.

  24. Tyler says:

    Great idea for an app I suppose, but when will people actually learn the resistor color code.

    My biggest confusion has always been the different colors for resistors besides beige. I got that blue is 1%, but what about when there are brown or something like that?

  25. Joe Dunfee says:

    We were talking about this at our own hack-space, and it prompted me to do a fruitless internet search for just such a program for my Android phone. I came across a number of comments by color-blind people wishing for this.

    There are two things I would add to your existing program; #1, put the photo of the resistor next to the version you simulate, so that you can compare them to check for errors. #2, add a multi-resistor mode, where you line up several resistors together as you take the photo. This would help when you are searching through a pile of resistors.

  26. buzzkill says:

    W00H00!

    I know the colors, I know the BBROYGBVGW. I just can’t see the colors. So here is my $0.99! Totally worth it. Maybe now I can get some projects built without having to call my kids in all the time to read resistors.

  27. Joe Dunfee says:

    I actually came up with one more idea that would make the application itself hackable. Include a bluetooth interface that would allow someone to use the application in a robotic resistor sorter. I.e. A robot places a resistor at the correct spot for the photo, tells the application via. bluetooth to take the picture, and then the application reports the value back via. bluetooth.

  28. Promethius says:

    Does anyone else find it odd how many color blind people apparently read HAD? Probably something about seeing things in a differant way. Great project, Electrodroid for Android is also excellent. I would like to see something that would give me datasheets quick and easy on my phone.

  29. Dave says:

    Bought the app, tried for 30 min to try to take a photo that was good enough for recognition, gave up

    The zoom control in the app is disabled, hence you cannot fit the resistor into the green box without having to go really really close to the component. So close that everything becomes a blur.

    Don’t buy it!

  30. Dan Fruzzetti says:

    For colorblind people like myself, this app is a requirement of life — I am not physically equipped to decode resistor bands, and I’ve been waiting for this app so long for Android it’s not even funny.

  31. Dave says:

    Thanks for the reply Alex.

    I cannot use the zoom-scrollbar within the application. It works fine using the standard camera. However, from your app, when I tap the live-view screen, the zoom scrollbar turns visible. Yet I cannot drag the bar.

    Also, I can’t turn on/off the flash. Nor can I flip between the front and rear camera. Only the shutter button works from within your application.

    A restore of the phone has not solved the problem. For your record I have roughly 10 other camera apps that works just fine. I have an iPhone G4, non-jailbreaked, newest firmware.

    As for now I’m still stuck with an application that cannot be used for it’s main purpose.

  32. Peter Enmore says:

    Resistor color codes make it very easy to see the value of the resistor.

  33. Max says:

    I bought that app, tried with different types of resistors, various light source and so on, but the calculated values were all the time wrong!

    don’t buy it!!!!

  34. Uky says:

    The App does not work for the Iphone 4, the zoom does not work, even when pinch zooming. Being colorblind I had high hopes, but I just wasted my money….

  35. miketells says:

    Really a nice app. But sometimes it hesitates… Include capacitance and inductance calculations and it’s a five star from my side.. Check out another app they I have… http://itunes.apple.com/in/app/rlc-calc-resistance-inductance/id403910300?mt=8

  36. What file on the Mac does not only SugarSync, Google Drive and Amazon Drive have in common. I can not get any of them to run?

  37. agrahul says:

    Hmm. Is there a reason the app isn’t available on the Singaporean app store, or was it just an oversight?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,614 other followers