1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Resistor Scanner App

Discussion in 'General Electronics Chat' started by MhTechDev, Jan 5, 2017.

  1. MhTechDev

    MhTechDev New Member

    Joined:
    Jan 5, 2017
    Messages:
    5
    Likes:
    4
    Hej all,

    even though this is not really a electronics project in itself, it might be useful for many of you.

    After spending a lot of time decoding resistors and still don´t knowing the color code table by heart, I chose to write an app to detect the resistors for me.

    I am new to Android programming and the app seems to work good on some and not so good (or not at all) on other devices, so I am happy for any feedback!

    Anyway, here it is:

    https://play.google.com/store/apps/details?id=com.mhdev.resistorscanner
     

    Attached Files:

    • Like Like x 4
  2. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    31,992
    Likes:
    894
    Location:
    Canada, of course!
    You made a brilliant app!
    But the color code has been in my brain for many years and modern products have tiny surface-mounted resistors that do not have the color code.
    Some Chinese resistors seem to be painted (not properly) by hand and the red and brown, blue and green and other colors are the same.
     
  3. Dr_Doggy

    Dr_Doggy Well-Known Member

    Joined:
    Aug 11, 2007
    Messages:
    1,685
    Likes:
    37
    Bad
    Booze
    Rots
    Our
    Young
    Gutz
    But
    Vodka
    Goes
    Well
    !
    but Im still gonna DL!
    this could help to clean my rats nests faster!
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    31,992
    Likes:
    894
    Location:
    Canada, of course!

    I am a dirty old man so I learned, "Bad boys rape our young girls, but Violet goes willingly".:cool:
     
  6. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    8,812
    Likes:
    1,150
    Location:
    Cardiff, Wales
    Useful app for those learning electronics.
    Welcome to ETO.
     
    • Thanks Thanks x 1
  7. ChrisP58

    ChrisP58 Well-Known Member

    Joined:
    Apr 27, 2012
    Messages:
    1,055
    Likes:
    126
    Location:
    Provo, Utah, USA
    Black
    Bears
    Race
    On
    Yellow
    Grass
    But
    Violet
    Generally
    Wins
     
  8. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,773
    Likes:
    674
    Location:
    Somerset UK GMT
    'Bad Boys Rape Our Young Girls But Virgins Go Willingly':D

    spec

    PS: what is this: Most Virgins Entertain Men Just So Uncle Needn't Pay
     
  9. captainkirksdog

    captainkirksdog Member

    Joined:
    Feb 12, 2003
    Messages:
    158
    Likes:
    0
    Location:
    Uranus
    Bad boys ruin our young girls behind victory garden walls--US Navy during World War II.

    MVEMJSUNP My Very Educated Mother Just Served Us Nine Pizzas
    Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto (order of planets in our solar system)
     
    Last edited: Jan 9, 2017
  10. captainkirksdog

    captainkirksdog Member

    Joined:
    Feb 12, 2003
    Messages:
    158
    Likes:
    0
    Location:
    Uranus
    If you like purple instead of violet: Bad boys rape our young girls but POLLY gives willingly

    Or these two:
    My Very Early Morning Jam Sandwiches Usually Nauseate People
    My Very Easy Method Just Simplifies Us Naming Planets
     
    Last edited: Jan 9, 2017
  11. DerStrom8

    DerStrom8 Super Moderator Most Helpful Member

    Joined:
    Aug 9, 2010
    Messages:
    5,263
    Likes:
    486
    Location:
    Vermont (GMT-5:00)
    I learned using:

    Billy
    Bob
    Ran
    Out
    Yonder
    Giving
    Babies
    Very
    Greasy
    Wigs

    (I was a sheltered child :p )
     
  12. schmitt trigger

    schmitt trigger Active Member

    Joined:
    May 24, 2009
    Messages:
    740
    Likes:
    71
    Brilliant app!
    But as others have mentioned, SMT chip caps rule electronics nowadays.

    I learned Ohm's law (in Spanish) with:

    Victoria = Reyna Inglaterra
     
    • Like Like x 1
  13. MhTechDev

    MhTechDev New Member

    Joined:
    Jan 5, 2017
    Messages:
    5
    Likes:
    4
    Thank you! And while that is definitely true for most commercial applications, "normal" resistors are still widely used in universities, hobby electronics and the R&D sector ;)
     
  14. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    6,643
    Likes:
    847
    Location:
    Loveland, CO USA
    I really like the app. One problem I have with colors is that there are many different types of paint used. Many different versions of each color.

    If I had the ability to write code like you, I would have my camera watching people coming up to my front door. The "UPS" man drives a brown truck and wears a brown shirt while the "Fedex" man drives a mostly white truck. The fire department drives red trucks.
     
  15. MhTechDev

    MhTechDev New Member

    Joined:
    Jan 5, 2017
    Messages:
    5
    Likes:
    4
    Yes, in combination with the different cameras on phones, that has been the biggest headache for me while developing this app. The app works perfect on my phone (HTC M8) but seems to have minor to major problems on other phones.

    Would probably be even more work (face-detection, "car-detection") than scanning resistors, but still definitely possible (even though I´m not sure WHY one would do that :D ).

    PS. I would be very happy about a rating/review of my app on Google Play, as I have very little feedback (or, overview of the overall opinion on the app) at the moment. It is very hard to improve without that ;)
     
  16. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    6,643
    Likes:
    847
    Location:
    Loveland, CO USA
    You might need to ship a picture of resistors with the app.
    I have had to "calibrate" cameras. To show a camera red, this is red and that is blue. Then the software knows how to make up for the differences in cameras. I noticed on my phone I can change what each color looks like.
     
  17. Dr_Doggy

    Dr_Doggy Well-Known Member

    Joined:
    Aug 11, 2007
    Messages:
    1,685
    Likes:
    37
    worked on the S5!
    OCR can be quite difficult, so kudo again that it was able to scan 4 resistors at a time for me, I noted that it couldn't do vertical resistors, auto zoom/focus/light could be handy, or maybe auto color correction or a live capture stream..... anyway no complaints, just some ideas for v2!
     
    • Thanks Thanks x 1
  18. MhTechDev

    MhTechDev New Member

    Joined:
    Jan 5, 2017
    Messages:
    5
    Likes:
    4
    And then have people print it and take a picture of it? Right now your are able to adjust contrast and brightness, which should be able to fix most detection issues.

    Thanks for the feedback and suggestions, much appreciated! :) Auto-rotation of resistors is on my TODO list ;) On the other hand, auto zoom/light are hard to implement in a helpful way, especially with all the different phones/cameras out there. And for the focus, there is very limited control over that in android (unless you make your own, which would require a custom kernel), but for most devices one of the three provided focus methods should work.

    There was actually a live-detection mode a few versions back, but I removed it temporarily (I will add it back once it is more mature). The live-detection was based on line-detection, so that one has to align a line on the display with the resistor bands. I tried using the current algorithm in a live-mode, but it is too processing-heavy at the moment. I will try to make it more efficient and maybe provide the possibility to use it in live-mode, which still would work for newer phones only (at least you would not be able to call it live-mode on older models :D)

    But again, thanks a lot, this is the most useful feedback yet :)
     
  19. Dr_Doggy

    Dr_Doggy Well-Known Member

    Joined:
    Aug 11, 2007
    Messages:
    1,685
    Likes:
    37
    ... noticed a glitch where it would not focus till i zoomed in, just figured i would mention...not sure why... but I hear you too well when you talk about camera compatibility (could be my phone)

    dropping frame rate may help with processing speed(since you dont really need high speed processing), but it would be easier to use if you could tell when resistors are identified before the decoding processing, so that it is not as much guess work for the user getting the right image

    also creating lower res images for initial detection may help speed too... since you may not need hi-res image in just identifying which is resistor
    also if you are taking a low res bitmap image of the scan surface, you may be able to use an algorithm to detect the average pixel brightness , then you can factor: in correction, out silver legs...

    again , see signature, these are just some ideas and may not totally work
     
  20. MhTechDev

    MhTechDev New Member

    Joined:
    Jan 5, 2017
    Messages:
    5
    Likes:
    4
    And again, thank you for your suggestions :) Regarding the focus-glitch, that seems very weird as the zoom is completely independent of the focus. But I will look into it
     

Share This Page