arduino feasability

Greetings, First I have very little exposure to electronics but am willing to learn. My question is I would like to use arduino duo to read the position of two encoders and provide that information to an astronomy progra called ezdsc.What this is supposed to do is the encoders are mounted on the rotation points for azimuth and altitude on my telescope. The input provides astronomical position of the telescope(altitude and azimuth) to the ezdsc program. When in use it will provide information as to what direction to move the telescope to a pre selected target(co-ordinates). What do I need to do this?The exhisting equipment I have is as follows. 2 capacitive type encoders which are mounted to the pivot points and are geared 4 to 1, for every rotation the encoder turns 4 times. 2 connecting cables to connect the encoders to ? 1 12 volt dc power source . 1 serial to serial port connecting cable (female to female.power the computer (compaq note book on window 98). Ezdsc software ,.can you please provide some information as to how to do it and what else I may need . thank you for your time. Jerry :shifty: :shifty:

Let me get the gist of this. You don’t have a “goto” 'scope but want the next best thing. You either have, or are adding, some encoders to get the alt/az angles and want these angle to go into a PC running the “Ezdsc” software. This software will compute where your 'scope is pointed to (given the angles and your lat/long position and time of day & date) and then offer up what alt/az you need to goto to find some astronomical object. Sort of a manual “goto” 'scope ?

We need to know more about the specific sensors. How do they output the measured rotation ? Some analog voltage(s) or digital type output(s) ? Are these outputs relative to some start position or are they encoded as just “ticks” every time you move some “0.x” degrees ?

EDIT : Is this what you have ?

http://pw1.netcom.com/~tlsystem/ezdsc.htm

Yep, we need a link to the encoder data sheets.

The first step is to correctly connect the encoders to the arduino.

Second is to write code that reads and keeps track of the encoder ticks. Most likely these encoders use a quadrature output (google it).

Intermittent step is to interface the arduino’s serial port to the PC. Does the arduino duo have an RS232 level translation chip on the board? If not then you need to add one then write code for the arduino’s UART and send data in the format required by the ezdsc program.

Last is to connect the code pieces to send the encoder data the the ezdsc program.

Each part should be well documented on the web. Google to learn how to do each part.

in response to your questions, one of you posted a thread for tl systems ezdsc . Yes that is the system I have except I cannot get the interface to link up with the port Please excuse my ignorance for the right terms. It apears that the interface is not working, and it would be cheaper in the long run to use arduino. All I can say of the encoders is what they say in the instructions posted on tl systems. What ever you say please try to keep it in simple english as I do not have any experience with this type of work, but am willing to learn. Thank you for your help and I hOPE to get more information and instruction from you, Jerry :stuck_out_tongue: :stuck_out_tongue:

Please excuse me, you asked if it was a goto scope no it is not. The scope I have is a 13 inch open truss dobsonian. i buit it all by myself. dsc’s would help me to learn the sky a lot quicker.

navee8or:
Please excuse me, you asked if it was a goto scope no it is not. The scope I have is a 13 inch open truss dobsonian. i buit it all by myself. dsc’s would help me to learn the sky a lot quicker.

Understood. By adding the system and software you’ll be able to point the 'scope “manually” using the alt/az readouts.

The thing is w/o knowing more about the encoders, I’m not sure how to interface them to an Arduino … or anything else. The site I posted earlier isn’t full of info either. It would seem (please insert your info here) that there’s the encoders and some “box” that then interfaces with the PC via RS-232 level signals. I say this latter part because the site points towards using a USB-RS-232 interface adapter for newer PCs. Can we assume your PC has an old RS-232 serial port ? Do you know what it has for (any) USB ports ? I might guess from your mention of Win98 that it has no USB, or at best USB 1.0 port(s).

Can you take some pics of the encoders and their wiring and post them here ? Same for the “box” and any labeling on it or on it’s connectors. We might be able to guess some functions from those. Do you already have an Arduino ? Would you be adverse to doing some testing with it to figure out what can be done (or not) ? We might be able to program it with some software to turn it into a low grade piece of test gear to measure the encoders with. Lastly do you have a digital multimeter (DMM) and can you make basic voltage, etc measurements with it ?

BTW a 13" Dob … wowzaaa ! That’s some nice aperture !!

OK, my googlefu might be strong tonight ! See if your encoders look like the ones pictured here.

http://www.designnews.com/document.asp? … ut=article

Looking at those pictured at the TL Systems site, they look to be a close match. Pay attention to any labeling, on the housing or the connectors or wires.

mcnee n mac The photo of the encoder you show could be it but bear in mind the ones I have have no cover they are mounted on a metal plate and spaced from the plate by 4 nylon spacers. They have 4 wires coming from them and all 8 wires 4 from one and four from the other join on to one big plug plus each encoder has a small cicuit board . By the way in

instructions I have, is a schematic if I can find help, I’ll send it to you. The output shaft of the encoder has a 14 tooth nylon gear on it and it is driven by a 50 tooth nylon gear mounted on the axis pivot point. The interface box for this has a mini db9 connector(male) the cable I have is a double female db9. And on the notebook I have both a male db9 and a female db9 I am assuming the readouts of these encoders are digital. I do believe in the program the values for the encoders is set to5100. on the alt this represents a full 90 degrees on the az it represents a full 360 degreesif you have more or less on the readouts then that value can be changed to give you the correct correlation.This is all I can find right now, i do realy appreciate your help just please be patient with me. I do have a digital readout volt meter and know how to use it. I will have more information in the a.m. Have a good night Jerry :oops: :oops: :oops: :? PS I DO NOT HAVE THE ARDUINO YET

Me n mac good morning. On the photo of the schematic I cannot do it. here is some other info I found the resolution on the encoders is set at 5120. which referes to 5 times the steps/rev.of the encoder each step will give.07degrees per step on both encodersThe power source is 7.5 to 12 volts dc the boards on the encoders have 4 pins on each they are labeled as such both are labeled pin1 red pin 2 yellow pin 3 green pin 4 black Each encoder has a plastic plug which plugs into these boards then are wired on the other end with a single 8pin plug that plugs into the inter face board. the pin sequence is as follows pin 1 channel a red pin2 channel b yellow pin 3 black with a jumper to pin 5. pin 4 channel a red wire. pins 6and 7 are connected green wire pin8 is channel b yellow . From what I can figure out green is power in,black is power out or ground red is serial and yellow is serial. pins 1 and 2 are serial lines to and from the altitude encoder pins 4 and 8 are serial lines to the azimuth encoder. Ok now on the other side are the serial out puts which is a d9 male serial and is as follows pin 5 has a green wire pin 3 has a green wire and pin 2 has a yellow wire Pin 2 is connected to leg 14 on the icchip pin 3 is connected to leg 13 and pin 5 is connected to leg 15 which is also a ground. Also on the schematic at the bottom of it are these numbers Max 202cpe. on the circuit board is printed radio shack 276-159b it appears that it is two identical boards that are together also one more number picl6f84A I do hope you find this information helpful and again thank you :clap: :clap: :clap: :stuck_out_tongue:

Hmmm, I’ve read your post about 5 times now and still haven’t quite grasped the picture. From what I can tell there’s a PIC MCU and probably a Maxim RS232 converter IC. The Radio Shack boards are a prototyping board, and I’m surprised to find them in a commercial item. Still I guess so long as it works. Are you saying the interface box has these RS boards in it and that the PIC and MAX ICs are what’s on the 2 boards ? See if my general diagram agrees with what you’re seeing. My guess is that waltr (see earlier post) above is correct. The PIC MCU gets the quadrature encoder data from the Az and Alt encoders. It would seem to be single ended (0 - Vcc) digital signalling for all signals. Green and black wires bring power and ground from the interface box to the encoders. The PIC sends it’s message to the Maxim IC, which takes the single ended signal and turns that into proper RS232 levels (12 to -12V typically) that your PCs old serial port can understand. Any communication from the PC to the interface box goes the reverse route.

The good thing is I think it’ll be easy to make another circuit that does what this one does, kind of. Perhaps even better … I think we can troubleshoot the existing board to make sure it’s working, or not. After the problem might not be in the circuitry. The bad part is that we might find it hard to replicate EXACTLY the functionality of the PICs coding. What worries me is that the software expects a certain message/data format to come across the RS232 serial link. The software only “knows” how to interpret this particular message. The PIC might just have sent the encoder data or it might have massaged that data into a slightly different format. Unless you can find out what the EZDSC software expects for a message, we might encounter a roadblock on this point.

ps - While I know it’s all the rage to not bother with punctuation, capitals, paragraphs, etc, these days using cellphones, it makes it very hard to understand (on 1’st or 2’nd or 3’rd read) what the hell you’re trying to say. If you can’t be bothered to take the time, neither can I. Afterall nobody here is getting paid to do this.

Google is your friend. See if this resembles your schematic.

http://eksfiles.net/digital-setting-cir … scription/

Even if it doesn’t, it seems that the message format used by a lot of software is described on that page. Seems simple.

Even better, Google “arduino, DCS, telescope” and you’ll find pages where someone has done what you’ve proposed. They’ve mated their Arduino to capacitive encoders (like what you have) and programmed the Arduino to read them and relay the data, in a standard format, to various astronomy programs on a PC. Since they used the Arduino’s USB to talk to the PC, there wasn’t any need for any other circuitry (no RS232 converter).

If your PC has a USB port, and if Win98 will run some version of the Arduino environment, then all you need is your 2 encoders, the Arduino, a USB cable (A to B) for the Arduino and some other wiring to connect the Arduino to the encoders. You can use the USB power to run the Arduino and encoders. You can probably find the Arduino code 98% complete for your usage.

So you have to decide if you want to figure out how to do it with an Arduino or troubleshoot your existing circuit first.

Good morning mac n me I am pleased you have formulated a plan and I am willing to trouble shoot the exhisting equipment first . I would like to see what I have first. Then after I will seek alternative. The drawing you sent is about what I described the only thing You don’t show is the input for a 9 volt battery. If you are willing and have the time I am ready to begin, Jerry :wink: :wink: :clap: :clap: please do have a nice day

navee8or:
The drawing you sent is about what I described the only thing You don’t show is the input for a 9 volt battery.

If you look at the link I posted above to the "EKs files" page you'll find a complete schematic. On it you'll find a voltage regulator that takes in the 7-12V and turns it into 5V to run the rest of the circuitry. I will guess your interface box has the same thing. I'd bet some $s that the regulator is a 7805 and looks like the TO-220 package shown in this ... It might even be bolted to the inside of the interface box.

http://datasheetreference.com/files/780 … asheet.pdf

The first task is to make sure it’s working and 5V power is coming out and getting to the rest of the circuitry. Do you have a voltmeter/DMM ? If not, you’re going to need one.

Also do you think you can find the ground or common point ? The black wires you described as coming from the encoders should all be tied together at this point. The negative terminal from the 9V input should also be tied to that, as well as one terminal of the voltage regulator I mentioned above.

mee n mac I do have adigital voltmeter, and I can find the comon ground. I’ll check out the voltage regulator,the voltage regulator is a 7805 As long as you are willing to put up with me, I’ll persue the possibility of repairng the unit I now have. I have just read the pages that you gave me and found that arduino is a good alternative. But as I said if you want to continue I am willing to learn as much as I can by doing and welcome your support.

To start plug in the 9V (or whatever) to the interface box. Leave the box disconnected from everything else for now. Verify 5V comes out of the 7805 and also is present on pin 14 of the PIC (see below, I’d bet you have the PDIP version). You wrote that the other IC was a Max 202CPE. If so (or a MAX232, they have the same pinout), 5V should be on it’s pin 16 (see link below). Plug in the cable that goes from the box to the encoders. Then, at each encoder end, check for 5V between the green and black wires (pins 3 to 4). If this all looks good then plug in the encoders.

http://ww1.microchip.com/downloads/en/d … 35007b.pdf

http://datasheets.maximintegrated.com/e … MAX213.pdf

http://www.ti.com/lit/ds/symlink/max232.pdf

For each encoder you should be able to see that they are outputting some signals by probing the two signals, pins 1 and 2. You can do this where ever it’s convenient. The voltage will be either very close to zero or close to 5V. As you very very very slowly move either mount you should see them change.

About the last thing you can easily do is probe the Maxim IC to see if it’s output (to the PC) is in the correct “ready” state. Since the PIC needs to be told by the PC what to send, it should be sitting in an idle state. The RS232 signal level out of the Maxim IC to the PC when idling should be a negative voltage, somewhere between -5V and -15V, most likely near -10V. This should be on pin 14 (and/or 7) of the IC (depending on which channel was wired up) and pin 3 of the D-sub connector that would be connected to the PC. You might find these links useful.

http://en.wikipedia.org/wiki/RS-232

http://en.wikipedia.org/wiki/Serial_port#Pinouts

If that looks OK then plug the interface box into your PC’s serial port and check for an idle voltage from the PC. It’ll be on pin 2 of that same D-sub and on either pin 8 or on pin 13 of the Maxim IC (again depending on which channel was wired up).

If all this checks out … then it gets harder to do much else w/o an oscilloscope. But if this DSC hardware all looks to be powered up and connected to the PC, I’d next try to verify the serial port on the PC is OK. I’ll save that for another post, except to ask if this whole DSC ever worked before for you ? Did you get the hardware recently or ??

me n mac the instruction are quite clear. with them and the schematic I have that should not be a problem for me . I’ll check that all out and record my findings then, I’ll get back to you. Thanks again and I’ll be back asap. as for the history of this unit,It’s been around for about 6 years it’s operability was questioned and sent back to the manufacturer and was verified that it did work. My friend had it at this time and recently offered it to me. I can assure you it hasn’t been tampered with. The only thing I did was to make and instal some aluminum mounting plates. The plate is made of light guage aluminum , the encoder is mounted on the plate and the circuit board is mounted beloe the encoder so the magnetic end of the encoder is in line with some kid of sensor that is on the board. The board is held in place by 4 nylon tube spacers of the correct length to hold the board in the right position. then they are secured by a 256 bolt and nut through each nylon tube.the aluminum plates are mounte to the sufaces of the telescope with one screw that allows them to pivot then spring tension is applied so the plate pivot toward the fixed mounted gear and the gear on the encoder is engaged to the large gear the reason for this setup is toinsure positive gear contact to insure consistant axis readouts :roll: :roll: :doh: :geek: :stuck_out_tongue:

While it’s on my mind … a very common problem with RS232 serial links is that the cable connecting the device (in your case the interface box) to the PC is wrong. The cable needs to be what’s known as a “crossover cable”. What that means is that pin 2 at one end is connected to pin 3 at the other end. And then, as you might expect, pin 3 (1’st end) to pin 2 (other end) as well. That connects the Tx out of the PC to the Rx in of the interface box, and Tx out of the interface box to the Rx in of the PC. Check your cable with an ohmmeter for this.

Tx = transmit

Rx = receive

Mac n me, I have very methodically checked out everything except reading the encoder outputs. I have discovered that the + wire from bat to the plug connectio was disconnected and, I re-soldered . One other find is that the cable to the az encoder had nothing going to it . I made up a new cable with the plug connections at both ends and verified and matched to the schematics.I also found voltage going out the box via the pin 5 on the dsub. Everything on the interface box looks good.

Does it blend … errr … now work ?