Build it!

This page describes how the LimID prototype was built and some ideas and recommendations on how you can build an improved version of it. To get started, you’ll need to download the latest source package here: Download LimID.


The following core components were used to build the prototype:

ComponentPrice [EUR]
USB Digital Microscope26
Arduino Uno24
3x LEDs and 3x Resistors3
and the following miscellaneous items (Price will vary depending on what you have/need):
  • A wooden box with a removable lid (approx 25x25x15cm)
  • Hot glue and screws to hold components in place (Sugru?)
  • Wires
  • Heat shrink tubing
  • Wago connector (The LEDs are grounded through this connector)
  • Soldering iron and solder
*I originally purchased a Servo – Medium Full Rotation from Sparkfun but after a few hours (or was it days?) of tinkering and debugging I finally concluded that there are two types of servos and that I had purchased the wrong type. Full rotation or continuous servos can rotate continuously, their speed and direction can be controlled. What I needed was a standard servo where the position can be controlled. I ended up using a Futaba tail servo from my RC helicopter instead and this has worked very well. This is what the prototype looks like on the inside:

Component overview

Arduino wiring

Hardware improvements

  • The hardware described above is very simple and thus very reliable. I was especially impressed by the USB microscope, it’s a perfect fit for this task! The microscope also has some nice built-in LEDs with a physical on and off button. Sadly I’m not sure if the LEDs can somehow be turned on and off from the computer and since I didn’t want to leave them on the whole time I resorted to the additional LEDs connected to the Arduino. Although using the microscope’s LEDs would not reduce the cost of the project by much, it would eliminate a whole bunch of wires, the resistors and all of the soldering work involved so this would be a huge advantage.
  • It makes much more sense to use a small solenoid instead of a servo and a solenoid should be much easier to mount and position correctly in front of the security token.
  • Lastly, since the Arduino Uno is only controlling a servo/solenoid and possibly some LEDs, it should be possible to use a smaller alternative such as the Arduino Mini or Arduino Nano.


The LimID software consists of a Python script and an Arduino sketch. It has been developed on and for Linux Ubuntu. I use LXDE because my old iMac on which I’m running Ubuntu is just that -old! As far as I know the software should run fine on Unity/Gnome as well. The Python script references several external modules (see code excerpt below), but they are all freely available online and/or in the Ubuntu repositories. NotifyOSD needs to be properly installed on the computer, but I believe this is the default in Ubuntu, a fallback solution has also been implemented which is independent of NotifyOSD. (pyOSD instead of PyNotify)

Below is an excerpt of the Python script which shows a few of the functions used to perform the actual OCR on the image:

and below is an excerpt of the Arduino sketch:

Software improvements

  • By far the biggest problem with the solution so far is establishing serial communication between the Python script and the Arduino. I usually need to start the serial monitor of the Arduino IDE before the Python script can communicate properly with the Arduino. It also seems as though the Python script is more reliable when started from the terminal as opposed to started via a configured hotkey as it is meant to be started.
  • The entire Python script should be cross-platform!
  • The USB microscope should be automatically detected. (It is currently hardcoded)
  • The whole script should be wrapped in a timer to prevent it from pushing the button on the security token too quickly. Pushing it too quickly will first blank the screen, then show the same code again.
  • Using OpenCV solely to capture an image from the microscope seems overkill, surely the OpenCV library can be put to better use elsewhere in the code.
  • The prototype OCRs a 6 digit code, six 7-segment displays means there are 42 segments in total. The position of these 42 segments are stored in hardcoded lists. This list should be stored in a separate configuration file and there should be an easy way to generate it, i.e. a separate Python script which takes a snapshot from the microscope and let’s the user point to the center of each segment to be OCRed.
  • Connect an old cell phone to the computer and use Gammu to automatically send OCRed codes to your cell phone. Thereby freeing LimID from the computer and making it easy to generate codes whenever you have your cell phone with you.
12 comments on “Build it!
  1. Espen says:

    Dritkult! Du har inspirert meg til å prøve meg på noe lignende! Takk!

  2. erik says:

    Det er godt! Gi gjerne lyd fra deg når du er kommet i gang med ditt eget prosjekt.

  3. TerrStepay says:

    Medicine Online Pill Foto Levitra In Farmacia 8ahr0cdovlzixni4xnz Cephalexin For Fish Same As Humans Photo Of Amoxicillin West viagra Best Prices For Viagra On Loine Online Pharamacy

  4. Kelavarma says:

    Viagra Kaufen Koln levitra price per pill Free Sample Viagra Without Prescription

  5. Kelavarma says:

    Kamagra Oral Jelly 5mg cialis online Comprar Viagra Cialis Madrid

  6. Kelavarma says:

    Amoxicillin Cat No Rx viagra Viagra Mente

  7. Kelavarma says:

    Legally isotretinoin from canada cod accepted pharmacy viagra Can I Purchase Stendra

  8. Kennwiname says:

    Propecia 1yr cialis Cialis En Promotion

  9. Kelavarma says:

    What Does Levitra Look Like cialis price Buspar For Sale Without Rx

  10. Kennwiname says:

    Propecia Active Ingredients viagra Propecia O Finasterida

  11. Kennwiname says:

    Dht Propecia Finasteride viagra online Nuovo Cialis

  12. Kelavarma says:

    Buy Now Generic Dutasteride Mastercard Accepted Store Overnight viagra Clomid Avis

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>