Friday, 5 April 2013

Conversion of an old Sigma lens to work with newer Canon bodies


The aim of this how-to/tutorial is to enable anyone with basic soldering skills to adapt old Sigma lenses to work with new (digital) Canon bodies.

Important note

Jiri Otisk has made a better version of this conversion chip and can be found here. I strongly recommend you use his version as it is much better designed and less buggy than the original one form the germand forum described in this article.

Foreword

Nobody bot you is responsible apbout whatever you might do. The procedure described here comes with no warranty. It has however been working for many people.

Acknowledgments

All the credit for what is described below goes to the members of DSLR-Forum.de, especially Slein & Nightshot. The original post can be found here.
My role in this project has been to gather all the info found on the forum thread and write this how-to. Since I do not speak German, some of the credit must also go to Google Translate.

Your shopping list

All the items needed to perform this mod have been purchased from eBay. You can however purchase them wherever you like. Before you start, make sure you have all the components and tools you need.

Components required

  • ATTiny24 x1
  • 10k resistor (colour code: brown-black-orange + precision_colour) x1
  • 47k resistor (colour code: yellow-purple-orange + precision_colour) x1
  • 100nF ceramic capacitor (with 104 written on it, to be precise) x1

Tools required

  • A computer: to program the microcontroller
  • An AVR programmer (I used an usbasp, which can be found en ebay).
  • A solderless breadboard and some jump wires
  • A soldering iron (not too powerful, obviously) and some solder
  • Some screw drivers to open your Sigma lens and pliers

Program the micro-controller

The first step is to program the micro-controller with the code needed to translate the new Canon auto-focus commands to something your old lens will understand:

Download and install the software pre-requisites

  • AVRDUDE (project homepage): exists for Linux, Windows, MAC… it’s up to you, really
  • The driver of your AVR programmer (if needed)
  • The code for the microcontroller. There are three versions, which can be found on the three original posts(v1, v2, or v3) and mirrored by Altomcat here (link to his blog here) and here.

    Note: I personally used v3 first and it works all-right. With v3, it crashes sometimes and randomly when taking a single shot (camera on/off required) and when taking two pictures within a second or so. After experimenting, I eventually chose v2 which crashes the camera sometimes but allows me to take bursts.

Connect the micro-controller

To program the ATTiny24, I used an usbasp programmer (which can easily be found online, e.g. ebay):


The controller needs to be set to 5v (if selectable on your programmer). Then the controller can be connected to the programmer. The picture below shows the pinout of the usbasp programmer (left below) and ATTiny24 (right below):




I connected the following pins:

USBasp
ATTiny24
On the picture below
VCC
Pin 2 (VTG)
Pin 1 (VCC)
Red
GND
Pin 4 (GND)
Pin 14 (GND)
Black
MOSI
Pin 1 (MOSI)
Pin 7 (MOSI)
Green
MISO
Pin 9 (MISO)
Pin 8 (MISO)
Dark blue
Reset
Pin 5 (RES)
Pin 4 (RESET)
Orange
Clock
PIN 7 (SCK)
Pin 9 (SCL)
Med/light blue


Before connecting the programmer to my PC, I also connected

  • A 100nF ceramic capacitor (with 104 written on it, to be precise) between Pin 1 (VCC) and Pin 14 (GND) of the ATTiny24. Since ceramic capacitors are not polarised, the capacitor can be connected in any direction as long as one leg of the capacitor is on the VCC and the other is on GND you’re good! This is a protection for the power supply of the ATTiny24.
  • A 10k resistor between the Pin 1 (VCC) and Pin 12 of the ATTiny24. This is a ‘pullup resistor’: since the pin 12 is the input (signal coming from the camera) of the ATTiny24, the resistor will automatically ‘pull’ the voltage on Pin 12 ‘up’ if it is not brought down to GND by the camera. This sets the value on Pin 12 to ‘up’ by default. Resistor can be connected in any direction.
  • A 47k resistor between the Pin 1 (VCC) and Pin 4 (Reset) of the ATTiny24. This is to make sure the processor does not reset randomly by keeping the Reset pin up. Resistor can be connected in any direction.

Upload the software into the micro-controller

To program the micro-controller, I used the following command under the console in windows (administrator mode):

avrdude -c usbasp -P usb -p attiny24 -e -U flash:w:TinyMod.hex
avrdude -c usbasp -P usb -p attiny24 -U lfuse:w:0xc2:m -U hfuse:w:0xdf:m

Note: you may need to replace the “usbasp” by the programmer if you are using another one. More info on avrdude (syntax) here.

Open the lens

This section describes how to open a Sigma 70-210 2.8 APO (for Canon). The procedure should however be similar for other lenses.
Caution: DO NOT START opening the lens without the appropriate screw driver, this will damage the screws.

  1. Remove the three inner ring screws first (red arrows)
  2. Unscrew the two small silver screws holding the connector (yellow arrows)
  3. Finally, the four lens mount screws can finally be removed (blue arrows).
Note: that this last step is optional but will make things much easier.


This is the final step: remove the four screws holding the metallic cover protecting the lens’ electronics (red arrows).
The next picture shows the lens open where the connector and PCB are accessible.


Solder the controller

Once the ATTiny24 is programmed, it can be soldered to the lens. Here is how I did it:

Solder the resistors and capacitor on the ATTiny24 and mount it into the lens

For those of you who like to work with professional diagrams, Altomcat made a nice one here.

I personally find it useful and prefer to use a hybrid solution showing where the physical connections are located on the ATTiny24 (this is impractical for more complex circuits...):


Note: pin 8 should not be connected to GND when programming the ATTiny24 (or it won't work).

Close and test the modified lens

This is the easiest step...  here is how I did it:
  • Check all your connections to make sure you're not going to destroy anything
  • Close the lens (hint: you need to go through the procedure to open the lens backwards ;-)
  • Attach the lens to your Canon body and take a picture. I would test the following:
    • Taking a single picture with the lens wide open
    • Taking a single picture with the lens NOT wide open
    • Taking a burst of photos.
That's it, have fun with your re-chipped lens!

Tips and tricks from the readers


  • JV: It involves soldering near the rear lens element, so I protected the rear element from solder splash with adhesive backed copper tape (being careful to not actually contact the glass). I assume a couple of layers of Aluminium foil and some masking tape would do the job too.
  • JV: The only suitable cable I had to hand was multi-core data cable wire, which is a pain to solder as it's stainless steel and doesn't wet well. An expert advised me to flux and pre-solder the stripped ends and the target contacts before making the final solder bond. This makes sure the solder at least penetrates the strands and gives some mechanical keying adhesion.
  • JV: Soldering the wires to the EOS connector before connecting them to the chip seemed easiest to me.
  • JV: There's fragile looking gears and belts visible inside the APO tele lens so to avoid the chip or wires fouling on them I wrapped the chip in electrical tape and secured the it to the inside of the lens casing using a solid block of 1mm thick double sided adhesive tape, a bit like a bug with it's legs in the air. It's secure but can be prised off if needed.
  • JV: Before commiting to a test with my DSLR I tried the lens on an old film body first. I figured if I'd made a mistake that was bad enough to damage a camera then I'd rather it wasn't my DSLR, and old film bodies are cheap on eBay.

37 comments:

  1. If you need help translating from german to english , text me on the forum (username "einball") or on my google account... or search for einballimwasser on the internetz ;)

    ReplyDelete
    Replies
    1. Thanks for the offer Jan :-)
      I'll always try with google translate though

      Delete
  2. It doesn't actually say WHY this is needed or what the problem is/was.
    However I assume it was the fact that you can't change the Aperture and get an error on modern cameras.
    Most lenses that suffer from this can still be used wide open in AP mode, however this fix greatly enhances the value and utility of these old lenses!
    I myself have an F2.8 24mm Sigma I will be doing this to.

    ReplyDelete
    Replies
    1. The solution indeed solves the aperture issue with older Sigma lenses. Older lenses indeed do not recognise the command issued by the DSLR and therefore only work wide open.

      Please note that the solution is far from perfect. The problems I encountered and read about on forums are (but vary depending on the camera, lens and firmware version):
      - Camera crashes randomly
      - Camera crashes when two pictures are taken within the same second
      - Aperture is not changed from wide open (or reacts too late?) but the camera does not crash

      Delete
  3. Any chance you would sell pre-programmed chips for those of us better with screwdrivers than DLL's?

    ReplyDelete
    Replies
    1. I would not feel comfortable selling them...

      First of all, there are three firmware version and none of them are perfect (see the reported crashes above). Some may work better in some configuration than others (lens/camera).

      Programming is really easy. All you need is a cheap avr programmer (look for usbasp on ebay), two resistors and a small cap.

      Finally, I did not make that small program I'm loading on the ATTiny24 and do not want to take credit for it. I posted this, because I feel the info should be available to everyone.

      Delete
  4. Specifically which ATTiny 24 did you use? There's 10 different options on the website: http://www.atmel.com/devices/attiny24.aspx

    ReplyDelete
    Replies
    1. Hi, I used a ATTINY24A-PU (which you can find on ebay). They run at 20mhz and I went for a DIP version of the controller simply because they are easier to solder & had plenty of room in the lens.

      Delete
  5. I do not know much about electronics, but I can solder (just). The schematics are quite difficult for me, though. My lens (24/2.8) does not have much space, so I was planning to solder the connections directly to the ATTiny. Is the DCL in / out connection the only "man in the middle" connection where I must cut the connection between the camera and the lens and divert it through the ATTiny? Is GND soldered parallel to the P-GND connector, LCLK in parallel to LCLK and VCC parallel to VDD?

    ReplyDelete
  6. Hi and thank you for your excellent blog. I have poor knowledge in electronics, but I was planning to fix the aperture problem on my 24/2.8 Sigma anyway. Could you please clarify the schematics a bit: Is the DCL in/out connection the only "man in the middle" connection, which must be rerouted through the ATTiny module (camera DCL->ATTiny->Lens DCL) and all other connections are parallel connections to the existing circuitry? (VCC->VDD, LCLK->LCLK, GND->P-GND). I do not have much space inside the lens, so cannot use a board but must solder directly to the module pins. Do I read correctly: one end of both resistors and capacitor go to pin1, which is connected parallel to VDD pin?

    ReplyDelete
    Replies
    1. Hello Carrier82,

      Thanks for your message. You got things right:
      about the DCL part this is the only place where the connection needs to pass through the ATTiny: DCL->ATTiny->Lens DCL. All the other ones are in parallel.

      Just like you I have connected all components directly to the attiny and used hot glue to insulate and protect the contacts.

      You are also correct saying that one end of both resistors and capacitor go to pin1, which is connected parallel to VDD pin (for convenience I personally connected VCC and GND somewhere else on the PCB of the lens).

      Delete
    2. Hi and thank you for your response. The LCLK (from the camera) part confused me a bit. But must correct my own statement a bit: GND has to be connected to D-GND pin, not P-GND.

      By the way, Altomcat's blog seems to be down. It can be accessed with google cache, though:
      http://webcache.googleusercontent.com/search?q=cache:http://altomcat.blogsite.org

      Many of the pictures in the german dslr forum seem to be down as well, but with your instructions, the conversion should be possible.

      Delete
  7. Hi,

    very interresting, while Sigma support is saying my 28/300 is to old for update ... It seems to be very simple and cheap !

    ReplyDelete
    Replies
    1. Thanks, although the solution came from Nightshot & Slein, I only made the writeup... The solution is not perfect neither (see above) but can still be a cheap alternative to buying expensive lenses.

      Delete
  8. Hello,
    Can you please upload the V1,V2,V3 firmwares somewhere else?? The http://www.dslr-forum.de/ is not allowing to sign-in and subsequent download. Please help.

    ReplyDelete
    Replies
    1. I'm in the same position now - cannot download attachments from the board. Could you upload them somewhere? Help needed and much appreciated!

      Delete
  9. Hello Mart,
    Than you. It was an awesome post.
    I did it atlast. Ordered 3 pieces samples from Almel. Used ABLab USB AVR programmer (7$). First tried version-3. It did not worked (May be hardware issue). Burned one chip (locked, may be will be OK by High voltage Programmer), then tried V2 with proper fuse bits. It was bit painful to cut and isolate the track 4 (DCL), but did.
    I opened the lens three times! And atlast, voila. Its working with all aperture settings, and did not crash till now. Thanks man!

    ReplyDelete
    Replies
    1. Hello Chandan,

      I'm happy you made it :-) I got about the same experience as you did and had to open the lens at least 6 or 7 times to get everything right. On the original forum post, it was not obvious that pin 8 of the micro-controller was supposed to be connected to the ground.

      I'm happy you did not get any crash so far, this is a good news (I'm using the v2 as well). Which lens did you modify?

      Cheers,
      Martin

      Delete
  10. Martin,
    I am also using V2. Trying to collect another one for my friend and will try V1 and V3. Infact this time also I tried V3, but the chip was not recognized after that by programmer and I though Its gone.Hence programmed another chip by V2 (as you reported running) and burnt.

    Shall update the info for my 2nd version.

    ReplyDelete
  11. Thank you so much!

    I chipped my Sigma 300 F4 APO TeleMacro today.
    I used an MX-USBISP-V3.00 Programmer for about 9€ from eBay.
    My programmer only works with "ProgISP" a nice free Software.

    Particularly important:
    Use the ATtiny with the correct Fuses!!!
    http://www.engbedded.com/fusecalc/
    CKDIV8 must be UNPROGRAMMED!! (on the ATtiny24) (i am 3 days failed because).





    The correct Screwdrivers for my Sigma 300 F4 have been:

    + PH 0
    + PH 00

    i think, other Lenses use the same.

    ReplyDelete
    Replies
    1. Hi Tharis,

      Thanks for the extra details, it's true I've been a little quick on the fuses. I hope you're comment will help many others !

      Cheers,
      Martin

      Delete
    2. This comment has been removed by the author.

      Delete
  12. does anyone know the wattage for the resistors

    ReplyDelete
    Replies
    1. It does not really matter. Currents involved are really low

      Delete
  13. Hi, Just picking up the parts online, but cannot find the v2 firmware? Can someone post a file or send me a copy?

    ReplyDelete
    Replies
    1. Brian, read the post carefully. Mart has already given the link.

      Delete
    2. The firmware links, as already metioned in the comments above, do not connect to valid downloads (one set of links are down and the DSLR forum ones do not contain the downloads. Thats why I have asked if anyone else already has the firmware and could reshare it.

      Delete
    3. You did not read the post carefully. Follow the words, colors, hyperlinks and the very word "here".
      https://www.dropbox.com/s/c4pq57v8rannasu/TinyMod_v1-3.zip

      Delete
    4. Thanks for your quick answer Chandan, I indeed made a mirror because the files were had to come by.

      Delete
    5. Ah, I've just opened the v1-3 file and it had all 3 firmware inside...I had thought that was just the version 3 :-) thanks...

      Delete
  14. I think I get the most of the fix.
    But where is the conections in the lens?

    how do I locate DCL in/out VCC, and LCLK ?

    Do anyone have a picture or can explain where to cut in the connections from the chip ?

    ReplyDelete
  15. @Jerry,
    For Pinout, you may follow Wiki or
    http://pickandplace.wordpress.com/2011/10/05/canon-ef-s-protocol-and-electronic-follow-focus/

    To cut the wire, I did cut the wire of FPC cable by scratching through a knife. Alternatively you may cut from main connector also (but it may be bit tough).

    ReplyDelete
  16. Martin,

    Excellent summary. However, could you please clarify the connections to the chip, as there appear to be some differences between your layout and Altomcat's that I don't understand. This may well be my mis-interpretation as I have no experience of this sort of thing!

    Your diagrams above shows pin 8 connected to GND in the lens and warns about not connecting pin 9 to GND while programming the ATTiny chip, however you also list Pin 9 as already connected to SCK during programming. Is this Pin 9 GND warning a typo error and means a different ATTiny pin, or Pin9 on the USBASP?

    The difference seems to be that Altomcat's shows no connection between pin 8 and GND in the lens, but does show the same Pin8 and Pin9 connections when programming.

    many thanks.

    ReplyDelete
    Replies
    1. Hi JV,
      There are indeed some differences between my post and Altomcat's. I did it a long time ago and had to look on pictures from the german forum to realise that pin 8 (of the ATTiny) had to be connected to GND when using the lens (i.e. not programming). Connecting it to GND during programming should not break anything but should prevent you from programming the chip.

      I hope this is correct and please let me know if the text needs updating (I don't do it now because I did this too long ago to be completely sure).

      Delete
    2. Hi Martin,

      It'll be next weekend before I have the time to run through the method for real for myself. I'm first trying it on a cheap 100-300 UC I bought off eBay as a test lens, before I commit to hacking my 400mm APO telemacro! (Though I suspect the test lens will be more difficult due to space restrictions).

      I think the only change that may be needed to the text above is the line
      "Note: pin 9 should not be connected to GND when programming the ATTiny24 (or it won't work)."
      should probably refer to Pin 8 instead as this is connected to GND in the diagram.

      Also - many thanks for what is the definitive English language guide to restoring an old Sigma lens! When I found your page I became genuinely excited!

      JV

      Delete
    3. Success! 100-300 UC was a good practice lens and my 400mm APO telemacro converted fine, the only errors I get now are occasional Err01 after around 6 continuous shots in burst mode (firmware v2).

      Pin 8 to GND in the lens clearly works, or at least doesn't do any harm!

      A few comments on my experience that may be useful :

      - It involves soldering near the rear lens element, so I protected the rear element from solder splash with adhesive backed copper tape (being careful to not actually contact the glass). I assume a couple of layers of Aluminium foil and some masking tape would do the job too.

      - The only suitable cable I had to hand was multi-core data cable wire, which is a pain to solder as it's stainless steel and doesn't wet well. An expert advised me to flux and pre-solder the stripped ends and the target contacts before making the final solder bond. This makes sure the solder at least penetrates the strands and gives some mechanical keying adhesion.

      - soldering the wires to the EOS connector before connecting them to the chip seemed easiest to me.

      - There's fragile looking gears and belts visible inside the APO tele lens so to avoid the chip or wires fouling on them I wrapped the chip in electrical tape and secured the it to the inside of the lens casing using a solid block of 1mm thick double sided adhesive tape, a bit like a bug with it's legs in the air. It's secure but can be prised off if needed.

      - Before commiting to a test with my DSLR I tried the lens on an old film body first. I figured if I'd made a mistake that was bad enough to damage a camera then I'd rather it wasn't my DSLR, and old film bodies are cheap on eBay.

      Once again many thanks for publishing this method in English, it's been a revelation. Now for a 90mm f2.8 macro...

      Delete
    4. Thanks JV, I added your tips to my post, I'm sure other readers will find it useful !

      Delete