clock drive for a telescope
scott99
Posts: 14
Hi, My name is Scott, building a clock drive for a telescope. I want to use the bs2 for my frequency controller (using a synchronous drive motor). The program works for the proper sidereal speed but·I need to add a different frequency for lunar tracking.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "tone sending"
DO
FREQOUT 12, 60000*10000, 1193
LOOP
How do I write the program to have a push button switch to a different frequency output, either on the same pin or a different one?
Desperate in Chicago,
Scott
Post Edited By Moderator (Joshua Donelson (Parallax)) : 3/22/2010 10:05:14 PM GMT
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "tone sending"
DO
FREQOUT 12, 60000*10000, 1193
LOOP
How do I write the program to have a push button switch to a different frequency output, either on the same pin or a different one?
Desperate in Chicago,
Scott
Post Edited By Moderator (Joshua Donelson (Parallax)) : 3/22/2010 10:05:14 PM GMT
Comments
Also, I play with astro-photography a bit as well. Either you'll want to use an extremely long time base for your freqout command which would make and human interface (pushbuttons) or display readouts annoying....... or you'd want to be very careful with your program and count all execution times. What I mean is:
Prog1:
' Long time base as possible
' sends freq to pin 12 for 65.5 seconds on a BS2
' the execution for the "goto main" will give you an accumulated error
' but the percentage in this case is minimal.... looses a minimal amount of time every 65.5s
main:
FREQOUT 12,65535, 1193
goto main
Prog1:
' Short time base to do other things as well
' sends freq to pin 12 for 0.1 seconds on a BS2
' the "other stuff" will give you a higher percentage accumulated error
' so every 100ms you check the buttons and update the display
' both of which take time, while your clock drive is busy doing nothing
main:
FREQOUT 12,100, 1193
gosub check_buttons
gusub update_display
goto main
Your best bet I think would be a two position switch for frequency. Then the program starts, run the current frequency associated with the switch forever. If you need to change speed you'd change the switch, then reset the BS2. Then it'd run the new speed forever.
Either that or you'd have to be very carful to fit the "other stuff" between the drive pulses.
Parallax has a motor controller too. You send it a command and it does it, while your BS2 handles the buttons, displays, etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.
Are you doing photography or just visual???? I suppose I should have asked that first. Visual won't need to be NEAR as accurate as photography.
If you're taking images, what is your expected exposure time?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.
I think you nailed it with the toggel switch and new pin out put. I will give that a try.
Thank you,
Scott
I like the idea of a clock drive.
Last year I up-graded from a 4.5 Mead reflector and was contemplating building a drive unit for it, until Christmas when I could not hold back and make the up-grade !
Interesting project. Please post your progress and have fun with it.
Here is a pic of my current set-up.
1. A Celestron CPC 1100 GPS XLT
2. Just experimenting with my scope and believe it or not I took this photo through my Iphone in Feb.
Post Edited (Rob7) : 3/23/2010 3:04:58 PM GMT
Thanks for the pic's. Looks like your in the South West.
This telescope project has been on going from 1973. I vividly recall riding my bike home for the American Science center store in Chicago IL when I was 17. Shelved the project for a while and finished it in 1977.
Have been rebuilding the mounts and housings ever since. Most people can't understand but its one of those things that can help save your mind from insanity throughout the years. Reflector 8" F4.5
Scott
I am in So. Cal near San Diego and live 30 min from the Palomar Observatory.
My Mead 4.5 inch reflector was bestowed to me as a gift in 1997 and I have had many great years with that scope. It took about 45 minutes to and hour to set up, tracking was all manual and tough to do when I started to take photo's with it, however I loved every minute with it. I opted to upgrade instead of building all the hardware I needed and the scope was donated to the college students at Palomar College studying in Astronomy.
The skies here are becoming brighter each year and with what I have now, I do not think I will need anything larger.
Scott, do you have pics of your progress in the web. I would like to see it ?
You can send me a P.M. with the link.
Good luck on completing your project.
Robbie
Post Edited (Rob7) : 3/23/2010 4:21:49 PM GMT
emu81008@yahoo.com
Post Edited (Rob7) : 3/23/2010 6:28:01 PM GMT
Referring to: FREQOUT 12, 60000*10000, 1193
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.
' {$PBASIC 2.5}
DEBUG "tone sending"
main:
FREQOUT 12,65535, 1193
goto main
main:
FREQOUT 12,100, 1193
gosub check_buttons
gusub update_display
goto main
What am I missing? this is such new tech for me. stuck in 1980 with old fashon IC's.
The first part should work though.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "tone sending"
main: ' A label or landmark if you will
FREQOUT 12,65535, 1193 ' oscillate pin 12 at 1193 hertz for 65535 milliseconds
goto main ' Jump to (go to) the label "main"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.
Everything to the right of the apostrophes are comments.
Just enter this:
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "tone sending"
main:
FREQOUT 12,65535, 1193
goto main
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.
Like
P.S. it works best if you paste your code in
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Post Edited (Franklin) : 3/24/2010 5:30:09 PM GMT
Is there any way to increase that duration to forever? I have no problem with a reset to change frequency.
Here is what I use now but get an annoying pulsed interruption every 60 seconds.
' {$STAMP BS2}
' {$PBASIC 2.5}
DO
DEBUG ? IN4
DEBUG ? IN3
IF (IN3 = 1) THEN
FREQOUT 14, 60000, 250
ENDIF
IF (IN4 = 1) THEN
FREQOUT 15, 60000, 200
ELSE
ENDIF
LOOP
Yup, all instructions take time. That's why there's a "burp" between FREQOUT commands.
I'd do something like this, where you check the switch FIRST! and set a frequency variable according to the switch state.... Then you run that previously set frequency, for 65.5s repeated forever.
You'll probably still get a little "blip" every time through the loop, but I seriously doubt it'll ever cause a problem. If I'm wrong, I'll help you write a SCOTT'S FREQOUT ROUTINE [noparse]:)[/noparse]
Thanks Franklin for the info!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.
Your a genius! Thank you so much. If I can return the favor in some was please ask. I have a Precision Sheet metal fabrication co. And work as a trainer for amateur MMA fighters. Anything I in those fields I would be glad to return some help.
Thanks again,
Scott
Post a image of M42 with your new clock drive if you can get it setup. Have fun!
another thought come to mind too: make sure you tie the inputs to 0V through a 10k resistor.... then pull them HIGH with the switches. If not, the inputs will "float" (0,1,0,0,1,1,0,1 etc...) and it's possible it'll read the switches incorrectly an run the wrong frequency....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.