Monday, August 18, 2014

3D Printed Lens Macro Adapters Reviewed

I have a couple of SLR lenses with the word 'macro' on the label but they really are not true macro.  In this post, I will share the results of my effort to get even more higher magnification with the help of the Smartrap 3D printer and some tricks used by photographers to get more out of their lenses. Specifically, I 3D printed adapters and will use them depending on what is appropriate for each of my lenses:
  • Reverse lens
  • Extension tube
  • Extension tube + reverse lens
  • Twin reverse lens



 The lenses I will play with are the following:
  • Sigma 70-300 APO DG Macro 
  • Sigma 17-70 DC Macro
  • Canon 50mm 1.8 


    As I was writing this post, things got a little too long for one post so I decided to make a dedicated post for each of the lenses.  Please follow the links above to check the individual posts.  I will however, share the summary of results and conclusion here if you want to go straight to the point. 

    I also feel the need to mention that if you plan to do any of this, you should know that there are risks on your equipment so please don't blame me for any damage you may get. 

    Results:

    • Canon 50mm 1.8  
      • Reversed - maximum magnification I got was 1:1.3
      • If you add a 50mm extension tube with the reverse lens, I was able to get magnification as high as 2.8:1 or 2.8X
    Left: 10% scale   Right: 100% crop  (View image in full scale)



     

    • Sigma 17-70 DC Macro
      • Without modifications, you can get 1:2.3 magnification
      • Using an extension tube and the lens set to the longest focal point, the highest magnification is 1:1.2 (a  40% increase)
      • With the lens reversed and set to the shortest focal length, I got up to 4.96:1 or almost 5X magnification!
      • With this lens reversed and a 50mm extension tube, it maxed at 7.4:1! More than 7X magnification! :) 
    Left: 10% scale     Right: 100% crop   (View image in full scale)

    • Sigma 70-300 APO DG Macro
      • Without modifications, maximum magnification is 1:2
      • Using an extension tube and the lens set at 300mm focal length, it is only at 1:1.6 but it is still 25% more magnification than before. 
    Left: 10% scale   Right: 100% crop of left eye (View image in full scale)

    • Sigma 70-300 + reverse Canon 50mm
      • With the Sigma mounted on the camera set to 300mm and set to macro, then the Canon mounted in reverse at the other end, maximum magnification is 6.4X.  
    Left: 10% scale  Right: 100% crop  (View image in full scale)


    Note:
    The subject is a 100 peso bill.  The magnification is calculated based on this formula:  Camera sensor width / real width of the image captured. A strobe or a flash is also required to illuminate the subjects at very small aperture (big f-stop)




    Conclusion:

    If you don't have a dedicated macro lens, as is the case with a lot of beginners or tinkerers who are just making the most of the resources they have and save money, it is possible to get decent macro shots with your existing lens using the methods described above. However, with these tricks, there is a greater chance that dust and dirt can get into your camera body.

    The reverse lens technique is best suited when in a well controlled environment like a studio and when the subject is stationary.  You lose auto-focus so focusing is very difficult especially when the subject is moving. 

    Using an extension tube is great with the 70-300mm lens and  when you don't need a very high magnification.  Using this is also best when you can't get too close to your subject (like insects that may fly away). Since the focusing distance is about a meter, you won't disturb your subject too much. 

    If extreme magnification is needed, the reversed 17mm with extension tube is best. However, since you need to set the aperture before mounting the lens backwards, the image in the viewfinder can get dim, making focusing even more difficult especially at apertures f16 and above.

    My favorite among all of the methods is the combination of the 300mm + reversed 50mm.  This allows me to keep the aperture control on the camera so the viewfinder is bright while focusing.  It also gives a 6X magnification. SWEEET! The only thing I don't like about this setup is that the images taken seem focused at the center then starts to get out of focus as it goes towards the edges.


    Try it and have fun!


    That is the tip of a 0.7mm thick pin.   That's how small this snail is! 


    Friday, July 11, 2014

    How to fix RepRapDiscount Smart Controller encoder rotation

    I really enjoy being able to control my smartrap with the LCD controller.


    But even if I've had my smartrap for about 4 months now, I still couldn't get used to the direction the knob responds in the LCD controller.  The knob (aka encoder) works in a way that when you turn it clockwise, the values gets smaller.  I just find it very unnatural.

    This caused a couple of crashes and almost broke my print bed a few times while trying to move the nozzle up.

    A new post in the smartrap forum by someone also annoyed with this made me look at it again and still could not find a good info on the net. What I'm sure of is that it is just a setting on the firmware.

    In my case, I am using a RAMPS 1.4 and Arduino Mega 2560. I traced the code backwards from the point where the LCD controller was defined in configuration.h and tried to find a trail. I ended up in pins.h of the smartrap firmware which is based on marlin.

    Here's the exact code where I needed to change it in pins.h:

    #if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
        ----- a lot of code here in between -------

    #ifdef ULTRA_LCD

    #ifdef NEWPANEL
    #define LCD_PINS_RS 16
    #define LCD_PINS_ENABLE 17
    #define LCD_PINS_D4 23
    #define LCD_PINS_D5 25
    #define LCD_PINS_D6 27
    #define LCD_PINS_D7 29

    #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
    #define BEEPER 37
    #define BTN_EN1 33 //<---swap this

    #define BTN_EN2 31 //<---with this
    #define BTN_ENC 35

     After swapping the pins of BTN_EN1 and BTN_EN2 and re-uploading the firmware, the encoder now works the way I wanted it to =)

    Depending on what board you're using, it will just be a matter of swapping the pins, too. Give it a try!