Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Arduino controlled focussing of lenses for DSO imaging with CCD camera


Gina

Recommended Posts

I'm starting a new thread for this to consolidate my ideas from other threads which have become long and sometimes side-tracked. This uses a simpler drive mechanism from stepper motor to lens focussing sleeve and while it is basically for my widefield triple imaging rig the principles will apply to any widefield imaging system using SLR prime camera lenses with astro CCD camera.

Previously I have used a plastic gearbox to provide reduction gearing to give a fine enough control. Now I'm reducing the timing pulley on the stepper motor to the minimum and driving the focussing sleeve with just a timing belt. If I find a single step of the stepper motor moves the focus too much I propose to use microstepping of the motor as is done with the stepper motors in mounts. Initial reaearch has shown this to be quite simple to code in the Arduino sketch.

post-13131-0-80352400-1374781774_thumb.j

Link to comment
Share on other sites

Microstepping requires the use of PWM to simulate the sine and cosine values of the phase between steps. So each stepper motor will require 4 PWM enabled digital pins for microstepping. Most Arduino versions provide 6 PWM enabled outputs so we could control one stepper motor and a dew heater (via suitable drivers). The Mega 2560 R3 provides 15 PWM enabled outputs so could drive 3 steppers and 3 dew heaters so would provide sufficient PWM pins for my triple imaging rig. However, 12 of the 15 are on pins used by shields so my original idea of using the SainSmart LCD display and menu buttons shield will be out, unfortunately.

My first tests will be to see if I will actually need microstepping with any of the lenses I propose to use for widefield imaging and I already have a Mega wired up for normal stepping of 3 cheap stepper motors (type 28BYJ-48, as seen in the photo above and costing just a couple of pounds each from Hong Kong).

Link to comment
Share on other sites

Link to comment
Share on other sites

Gina,

if you wish I've just added micro-stepping to my RA controller and am in the process of documenting it. As this is C code that runs on an ATmega8A I'm sure that you could use this to micro-step your motor through Arduino code. I'll try and get the documentation finished and published as quickly as I can.

BTW, I've also added USB control using the V-USB stack on the ATmega8A, with the control code written in C, GTK and libusb on the PC side, but this will take a little longer to document.

Hope this helps,

Alan

Link to comment
Share on other sites

More links :-

ATmega328 chip data sheet in PDF format - http://www.atmel.com...ges/doc8161.pdf

Source of ATmega328 kit including the chip with Arduino boot loader preloaded, crystal and 2 capacitors - http://www.ebay.co.u...984.m1439.l2649

Sparkfun micro-stepping driver - https://www.sparkfun.../products/10267

Arduino form - "Micro Stepping without a motor Driver" - http://forum.arduino...c,146512.0.html

Link to comment
Share on other sites

Gina,

if you wish I've just added micro-stepping to my RA controller and am in the process of documenting it. As this is C code that runs on an ATmega8A I'm sure that you could use this to micro-step your motor through Arduino code. I'll try and get the documentation finished and published as quickly as I can.

BTW, I've also added USB control using the V-USB stack on the ATmega8A, with the control code written in C, GTK and libusb on the PC side, but this will take a little longer to document.

Hope this helps,

Alan

Gina,

thought I'd post a .zip file of the code for V2.00 of my RA control without any documentation as yet, but please feel free to use any of it that you find useful.

RAControl-2-00.zip

Hope this helps,

Alan

Gina,

thought I'd post a .zip file of the code for V2.00 of my RA control without any documentation as yet, but please feel free to use any of it that you find useful.

RAControl-2-00.zip

Hope this helps,

Alan

Thank you Alan :) I'll take a look at it. Micro-stepping seems pretty easy using PWM. I understand using orthogonal current in motor coils to provide fine control - sine and cosine. And with static or very low speed the current will pretty much follow the voltage with neglegible effect from the inductance or back EMF.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.