Jump to content

Arduino Help


bluemaxroe

Recommended Posts

I too didn't know there were such variations around.  I found out the hard way that the quoted 64:1 gearbox wasn't an exact number.  I use these stepper motors for such things as focussing where they are in a closed control loop (even if that includes human action) and other simple functions but for anything needing step to angle accuracy I use one of the NEMA series without built-in gearbox. 

Even NEMA motors with gearboxes are not exact integer ratios.  They may say 5:1 or 27:1 or even 100:1 but these are only approximate values.  These are planetary gearboxes with multiple reduction so that might explain strange ratios.

I tried software (actually firmware Arduino sketch) compensation for the odd ratio with a 12v 28BYJ-48 stepper motor for my moon phase clock but it turned out to be so awkward that I gave up in the end and used a NEMA16 stepper motor without gearbox.  I just used appropriate gear ratios with 3D printed spur gears to get precise timing.

Link to comment
Share on other sites

  • Replies 54
  • Created
  • Last Reply

Still thinking about ideas for the 3d printed body.   i decided to do a test rig, and therefore have worked on a skeleton style print that will give me what i need to test run the whole thing.

some rendered models below.

 

in the exploded  - aluminium/metal parts are in silver, 3d printed gears are in green, bearings are in blue, main skeleton framework in red and polar scope in black.

render 03 framework01.jpg

render 04 framework02.jpg

render 05 framework02 exploded.jpg

Link to comment
Share on other sites

Not sure yet Bill.   :) 

still in concept stages really.  i modeled a version that could chop and change, but it looked clumsy.   and to be honest all the Nema motors look like they are 12v, when i wanted to keep it simple and have a 5v so i could just run 1 power supply.   I just dont know enough about Arduino yet.    Wifey is getting me a "kit" to play with for my birthday in a few days time....Yay!

Link to comment
Share on other sites

If you only want 1 power supply, why not branch off from 12 V (for the motor) and step it down to 5 V with a 7805 voltage regulator (for the electronics). That way you'd only need a 12 V supply. It only takes 3 extra components, 7805 and 2 capacitors.

Just my 0.02 €

Link to comment
Share on other sites

  • 3 weeks later...

Ok a redesign with a Nema 8 motor.... a smaller motor with reasonable torque and runs off 3.8v.

Also rethought the structure.   Is constructed with aluminium plate and a turned aluminium central pivot point.   Still using 3d printed gears.

3rd render is another idea to slim down the design.  But this does mean that the motor hangs out the back... perhaps not a bad thing if it allows swapping of motor sizes.

render 06 - 1.jpg

render 06 - 2.jpg

render 06 - 3.jpg

Link to comment
Share on other sites

  • 2 months later...

Well have been messing about with this for a while, but really not been on it to much as i have had a busy stream of work coming in.

now back on it ....and i want to call out to the mathematicians here.   (because i know mine is pretty bad)    I have a had a go at it, to see what step speed is required and i lay out my workings below.

 

The things i am trying to understand.  

1. Is my math right?

2. Will i have a torque problem running a Nema 17 at such a slow speed?

3. This is theoretical with no load Will i have to do practical tests with loading to see how much it varies?

 

thanks everyone 

tracker maths.JPG

Link to comment
Share on other sites

Hi,

I think you have got your timing ratio the wrong way up:

You have 116622 micro steps per full revolution, you need to generate that many steps in a sidereal day of 86164 seconds so you need 116622 / 86164 microsteps per second.

This is around 1.3535 microsteps (pulses) per second.

I would suggest you look for a stepper motor with a reduction gearbox and also to use a driver that gives say 128 microstepping. This will allow you to increase the number of pulses per second. I would also suggest you use the Accelstepper Arduino library. This gives accurate timing pulses. Ideally you want to be using say 1000 pulses per second to produce a nice smooth motion. If you want to use an Arduino Nano, they are good for up to 4000 pps with Accelstepper. You could also consider a Teensy 3.2 - or better still a Teensy 3.6 when they are available. The Teensy microcontrollers are smaller than the Nanos, 32 bit and a lot faster. The Teensy 3.6 will have built in hardware floating point which will make the timing calculations easier.

HTH, Regards, Hugh

Link to comment
Share on other sites

That drive is certainly far too coarse using a stepper motor without internal gearbox even for widefield.  Your resolution ie. angular movement per step, wants to equate to a pixel or less on your camera sensor.  This angle can be calculated from geometry but as an example, with my widefield rig I would need one hundredth of a degree resolution.  This could be achieved by a Nema stepper motor with step angle of 1.8° step angle and 100:1 gearing.

Link to comment
Share on other sites

Hi Gina

I am not sure i understand why this is too coarse.  if i divide 360° by 116622 micro-steps per rev, i am getting 3 hundredths resolution?  your saying that is not enough?   but for what focal length..i am aiming for max 200mm maybe 300mm absolute tops.

i suppose i could change to a worm wheel + gear with a 1:100 ratio.  but dont want to redesign without understanding.

 

 

Link to comment
Share on other sites

You can get stepper drivers with 32x micro-stepping such as the DRV8825 and if your pixels are around 5 microns or more you will be alright.  I rather wonder if 3D printed gears are going to be accurate enough though.  Try it and see - could be fine :)  Depends what sort of imaging rig you are using.

Link to comment
Share on other sites

Camera would be a DSLR 1000D with 5.7 microns, or a 450D with 5.1

PS my work are now getting rid of the 3D printer :( , and there fore i am getting a custom metal 82 tooth gear cut and using bought metal gears for the others.  

looking for 10mins - 20 mins of exposure time. 

Link to comment
Share on other sites

3 hours ago, hughgilhespie said:

Hi,

I think you have got your timing ratio the wrong way up:

You have 116622 micro steps per full revolution, you need to generate that many steps in a sidereal day of 86164 seconds so you need 116622 / 86164 microsteps per second.

This is around 1.3535 microsteps (pulses) per second.

I would suggest you look for a stepper motor with a reduction gearbox and also to use a driver that gives say 128 microstepping. This will allow you to increase the number of pulses per second. I would also suggest you use the Accelstepper Arduino library. This gives accurate timing pulses. Ideally you want to be using say 1000 pulses per second to produce a nice smooth motion. If you want to use an Arduino Nano, they are good for up to 4000 pps with Accelstepper. You could also consider a Teensy 3.2 - or better still a Teensy 3.6 when they are available. The Teensy microcontrollers are smaller than the Nanos, 32 bit and a lot faster. The Teensy 3.6 will have built in hardware floating point which will make the timing calculations easier.

HTH, Regards, Hugh

if i make a micro step every 739 milliseconds then am i not making approx 1.35 steps a second?

1000 pulses a second?  i am not sure i would get anywhere close to this, even Skywatcher mounts don't do this do they?     will take a look at the Teensy 3.2 and Accelstepper, although i have already bought the Nano.

 

Thanks Hugh

Link to comment
Share on other sites

I don't see any reason to step at any faster rate than to give the required resolution and tracking rate.  With a DSLR and 5+ micron pixels the resolution you are using should be fine.  Debayering reduces the effective resolution of the image sensor giving an effective resolution of around 10 microns - about 3x that of the camera I'm using with a 200mm focal length lens.

Link to comment
Share on other sites

i have a 450D sensor i was thinking of trying......avoiding the edge and gold wires, and using a microscope.  the camera itself is dead, so would have to buy another to fit it into.   so not got much to lose really.     However i wasnt sure how much more i would gain......i think my efforts would be better served to try a cold finger mod to reduce noise first.

 

Link to comment
Share on other sites

I'm going to probably offer some, well not directly useful, advice :D

If you're tracking then you're looking at a certain speed in arcsec/sec. However for each step when you've got gears you have a little play caused by the gap in the meshing, this causes a ±error and that may vary as the mount goes over the zenith. In sensors you're looking at 10:1 ratio, i.e. being able to measure .1 unites to be reasonably accurate for a 1.0 unit scale.

So rather than looking at a 1:1 speed, I would look at 10th speed gearing and then run at 10x speed. The reason is that it's going to be smoother with 10 steps between pixels than 1 step every 10x the time period. This is todo with the object position on the CCD rather than the gearing etc (i.e. reducing the motion blur effect).

I did say it's not particularly useful :D

Link to comment
Share on other sites

Hi,

Oops - my apologies! You are of course right that a microstep every 739 mS is indeed about 1.35 microsteps per second.

Why a pulse rate of say 1000 microsteps per second?

Lets say you want a maximum exposure time of 20 minutes - 1200 seconds.

Also we will assume that to get nice round stars  your tracking accuracy needs to be at least twice as good as the 'seeing'. So, for the UK if the 'seeing' is around 2 arcseconds, your tracking should give at least 1 arcsecond precision.

In a sidereal day the total rotation of the sky is 360 * 60 * 60 = 1296000 arcseconds

So every temporal second the sky rotates by 1296000/86164.1 arcseconds = 15.04 arcseconds per second 

Now during your 1200 second exposure the sky will rotate by 1200 * 15.04 = 18049 arcseconds.

As per NickK's post, you need to generate around 10 times this number of pulses to acheive a reasonable degree of accuracy.

So 18049 * 10 / 1200 microsteps per second which is the same as 10 times the arcseconds per second.

So, pulse rate should be 15.04 * 10 = 150.4 microsteps per second. 

I agree that this is a lot less than my off the cuff first estimate of 1000 microsteps per second, but it is still a lot more that your current design allows for.

Hope this helps rather than confuses.

Regards, Hugh

Link to comment
Share on other sites

Also some experience in ardunio with fast/accurate timings. I tried to write my own current limiting chopper driver version using the arduino uno - this worked about 20kHz rate maxed out however things like the serial output that communicate via USB etc cause a massive change, even minor code changes or conditional execution cause timing differences. This same issue also causes problems if you're attempting to implement micro step using the arduino rather than a micro stepping controller - and even if you're using the serial in the same loop as the 150 steps/sec pulse rate (given 10x safety margin to be accurate with the step rate). The arduino uno/nano will cut it I think without needing too much in terms of clock crystals and floating point (very slow in arduino) but keep the loops static or use the accel-step library...

My stepper is a NEMA17 with a 100:1 gearbox for my focuser then using a DRV8825 and the arduino uno - this is the stepper & gearbox I'm using: http://www.active-robots.com/3322-0-28sth32-nema-11-bipolar-stepper-with-100-1  however note 1.8deg/step (200 full steps/rev of the stepper), there is a minute amount of play in the gearbox (will always be), and it has a crazy amount of torque (I hang my astro photography gear off my 1:1 focuser connected direct to the gear box. Points to watch on this stepper are - it's a 3.8V 670mA bipolar unit. However you will need a something like 12V to ensure that the back emf when stepping occurs - the DRV8825 allows 12V to be used to power the 3.8V stepper (connecting direct will cause it to burn up) as it chops the current at a very high rate. The result is that the stepper remains cool for the entire time even when the load of the scope's filterwheel+cameras etc are all pulling against it through the gearbox. The system will step 1/32 without a problem and I can't stop it by pinching the gearbox shaft (and the steppers side shaft is quite forceful too!). Although my calculations are for my focuser in my DIY YAF robofocuser thread.. Note - NEMA is the form factor not the standardised specs so two steppers can have different stats but be NEMA17 sized.

 

Link to comment
Share on other sites

Wow, thanks for the info all.   Can't tell you how useful it is to have combined brain power.

going to have to change plans again by the sound of it....just had this gear cut..   More for a test than anything.    I could change this from a 82 tooth to a 120 tooth and use a worm gear to drive it giving a 1:120 ratio.   At 32 micro steps I would have 1,536,000 pulses per revolution....even that is only 17 pulses per second.  

The image is an aluminium 82 tooth gear, water jet cut to accuracy of .4mm.   It meshes nicely with a mounded plastic module 1 gear. So at least this method of manufacture is proved.

 

 

 

image.jpeg

image.jpeg

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.