
Circuit Details
NOTE 1: all pictures preliminary.
Note 2: All images in PNG format as this is MUCH smaller and higher quality than the alternative.
This page contains the detailed plans necessary for building your own copy of the VideoStar circuit boards.
Currently, this consists of three circuit board pictures - an overview, the bottom copper layer and the top copper layer.
The high resolution pictures were saved as 300dpi b/w bitmaps. You should be able to import them and print them directly to get actual size versions of the circuit boards which can then be used for whatever transfer process you like for creating boards.
Please heed the caveat in note 1. All these pictures are preliminary. I'm in the process of debugging the boards now, and I think that they are correct as presented. However, I've not committed this version of the board to hardware yet, so I can't vouch for its absolute correctness.
About the circuit
First, the disclaimer - I'm not a professional electrical engineer by trade. I'm a tinkerer that's had some formal EE training, but mainly I'm a computer jock. Hence I'm sure the circuits provided will be considered quite crude by those "in the know". I've taken pains to use large ground planes to avoid EMF issues, and circuit traces were made as large as possible to reduce resistive losses. I've been fairly liberal with vias on the board and haven't made every attempt to optimally route the circuits.
That said, the first version of my board worked nicely with just a couple minor modifications.
A note about vias - if you've had experience creating printed circuit boards, you know that a via is a connection between copper layers. It's just a little hole in the board that allows a connection to be made. They're all over the place on commercially made boards.
However, if you're burning your own board at home, each via has to be filled in with a wire and soldered to both sides of the board because there's no practical method of doing vias at home. Therefore, if you're making your own board at home using these diagrams, you hae to be very careful to examine the circuit given below. Every time you see a blue trace going to a green circle then changing to a red trace, that indicates a via. Frankly, at the cost of having professionally made boards nowadays, I wouldn't bother making this at home.
Note too that this is a mixed signal circuit. It's mostly digital, running at low frequencies. However, because of the video timing and analog video signals passing through, there are some high frequencies present. I've tried to route all such signals on short paths, well separated by ground plane connections to avoid crosstalk. However, you'll want to be very careful when wiring it up. 75 ohm mini-coaxial cable should be used to wire between the circuit board and the back panel connections for the video related signals - Video, H-Sync, V-Sync.
VideoStar Subsystems
| Subsystem | Description |
| Main Controller | VideoStar is based around a 50Mhz Scenix (now Ubicom)
SX28AC microcontroller. I purchased my parts from Parallax
inc. Their prices are reasonable and their site provides all the
parts you need to get going.
Note on the board below that I use a 50Mhz crystal. Current versions of the SX28 run at up to 75Mhz. However, do not run VideoStar at this rate or it will cease to function. The code has been very carefully written to depend on the interrupt frequency derived from a 50Mhz crystal. This allows it to generate video timing signals and RS-232 bit timing at 9600 baud. This is non-trivial. Note too the three components below the processor - R5, R6 and D1. These three components allow the processor to enable/disable the drives to the camera sync lines. The way this works is R5 and R6 make a voltage divider that looks at the 12v supply line coming from the FlashBus card.Normally, this is used to drive the camera, however here we're just using it to detect the presence of the card plugged into the connector. If the processor detects voltage on this line, then it knows that the FlashBus is connected and will be supplying its own sync signals to the camera. The processor then it quickly turns off its output lines going to the sync outputs to avoid double driving those lines. The diode is used to direct the voltage to the board but not allow the board's power supply to trigger the processor detection. Strictly speaking, the diode portion of the circuit is redundant because the internal power supply will provide the 12v. It's a holdover from when I was using just a single 5v supply. It's not 100% foolproof, but seems to do the job. Decoupling Capacitors The one capacitor in this part of the circuit is a decoupling capacitor. Typically each IC will have such a capacitor to help protect the part from voltage transients on the power traces and help to reduce the load the part places on the power traces. You'll note decoupling capacitors throughout the circuit used for this purpose. While optional, they are a good idea and should ensure maximum circuit reliability. |
| RS-232 Driver | In order for the CPU to communicate with a host computer,
one must alter the voltage levels to be RS-232 level. I've taken the
easy way out and used a MAX233
to handle all level conversion for the four lines used.
This particular chip is totally self-contained. Other, less expensive versions use external capacitors. One can save a couple dollars and use these parts, but I felt that it would be best to use the simplest possible solution. The four lines used in VideoStar are Transmit, Receive, CTS and RTS. I include the handshake lines to be safe since the microcontroller can only deal with one byte at a time and I wanted to ensure absolute reliability. |
| Motor Focus Drive | In order to drive DC motors using a microcontroller, one
must use a power interface chip. Texas Instruments has a great set of
power chips, called the TPIC
series. (if this link breaks, just go to ti.com and search on TPIC).
For this project, we're driving a low power DC motor on the focus drive of the telescope. To drive if forward or backwards, we need to be able to change the polarity of the voltages going to the motor, so a circuit called an "H-bridge" is used. One can implement this using discrete circuitry or with a nice dedicated chip like the TPIC0107B. This little wonder can drive motors using input voltages up to 40v and 25 watts continuously. All we're doing is sending a few volts to the tiny DC motor on the NGF-S. The chip also supports a PWM (pulse width modulation) input. Simply put, as long as the the PWM line is on, the chip supplies current to the motor. The circuit to use the chip is trivial. Just a few control lines from the processor, power and a bunch of ground connections. The only point you may wonder about is the big capacitor. That helps stabilize the voltages as the motor starts and stops. Without that, the motor could put undue stress on the main board's power supply and cause other chips to malfunction. |
| Temperature Probe | The circuit for the temperature probe is implements a
simple A/D (analog/digital) converter. I've seen some other clever
designs that reduce chip count, but this was simple, accurate and works
well.
The main chip is the XR4151 which is a common voltage to frequency converter. It takes the voltage output from the temperature sensor (fed through the connection labled K12 Probe), buffers that slightly with a small capacitor (C1) and converts this to a pulse stream at a frequency that the microprocessor can easily count. The other components set the relationship of voltage to frequency. I suggest that you stick to the given values fairly closely as the values chosen result in about 1/10 degree accuracy over a wide range of temperatures. To simplify coding, the VideoStar program counts these pulses for a given time period and updates a variable with this count. When queried, VideoStar simply reports this count. There is no translation to degrees F or anything like that. However, for temperature compensated focusing, it isn't important what the absolute temperature is, so one can simply utilize the count value in the algorithm for temperature compensation. The temperature sensor used is a standard part, the LM34DZ. The range of temperatures stated in the spec sheed are -40F to 230F which I would think is ample for most amateur astronomy applications :-) During my tests, the circuit was sensitive enough to detect a quick puff of air across the sensor or a hand held near it. I've not actually quantified the accuracy, but have no reason to suspect that it's not as accurate as they say. The spec sheet only indicates a 1 degree accuracy, but based on my tests, it seems far more stable than that. |
| Relay Bank for Guider | The bank of four relays drives the guider port of most
telescope mounts. Such mounts have a common ground and lines for each of
North, East, South, West directions. When motion in a particular
direction is desired, you simply tie that signal to the common. That's
all these relays do.
I've read that it is important to use the common provided by the telescope, and not just use any ground in your circuit. This circuit uses the recommended method. I've also read that you can simply drive the NESW inputs with a TTL level signal. If so, this circuit could be redesigned to take advantage of this fact and made to use solid state control rather than mechanical relays. |
| External Relay Driver | This portion of the circuit is strictly optional. I put it in so that I could drive the guiding relays from an external TTL level source. In my case, the FlashBus video card has several TTL outputs that I use for running the guider port directly, rather than going through RS-232. However I will be changing the underlying code to take advantage of the RS-232 interface because ultimately, the accuracy of timing provided by the microcontroller will be orders of magnitude better than that afforded by the PC under Windows. |
| Power Supply | The circuit uses a dual voltage power supply, providing +5
and +12 volts. If you're not using the camera or the temperature sensor,
then you don't have to supply the 12v. However, since surplus power
supplies of this sort can be had for under $10, there's little reason
not to build in this capacity.
Note that the small power supply I used was a surplus unit and it's really poorly shielded. I've suffered several good jolts while working on the circuit because of exposed 110v connections. For safety, I'd suggest coating all high voltage connections with some sort of silicone caulk. |
|
Front Panel Control Board |
|
| LED displays | Two dual 7-segment LED displays show the current video
integration time or focus position depending on the state of the FP MODE
switch (stands for front panel mode).
Note that it's important to use common cathod LEDs. What this means is that you supply plus voltage to the segment lines and all the segment grounds are tied together for each LED bank. In this way, a controller can scan several LEDs using shared lines for the LED anodes (the plus side). An illumination pattern is set for the anode drives, then whichever LED is desired for display simply has its cathode pulled to ground. The resistor network, RN1, is simply a bank of resistors which are used to limit the current flowing through the LEDs. In this case, 470 ohm resistors are used to keep LED current draw limited to 10ma at 5v. (remember, V=IR so I = V/R = 5/470 ~ .01) Note too that the decimal points are not utilized. To keep things simple, everything uses integer arithmetic. Microcontrollers don't deal well with floating point, and I was too lazy to implement anything using the decimal points. However, that one extra bit has gone for a good use. The front panel switches take advantage of this bit available on the shift register and the microcontroller scans the switches at the same time as it refreshes the LED display. |
| Shift Registers | The only sneaky part of the VideoStar board design is the
use of shift registers. Shift registers are simple memory parts that
allow one to load an 8-bit value using only three lines. One line
contains the data bit and the second is a clock, that controls the
shifting in of that data. A third line controls loading the data to the
outputs. That is, it transfers the entire bank of 8-bits to another
memory location which goes to the output bits.
Why use a shift register? Shift registers serve two purposes. First, they save processor I/O lines. Using only three lines, one can drive numerous outputs. As long as you don't need absolutely random access at super high speeds, this works nicely. You simply clock in the data then when you want to use it, you trigger the data transfer. Moreover, shift registers are designed to support a carry-out, so that you can daisy-chain them. In theory you could drive thousands of shift registers using just three lines. A second important use of shift registers is to provide higher current capacity than the processor could supply on its own. With most processors, you don't want to draw many milliamps from the I/O pins. The shift registers can supply much more current. VideoStar uses both these advantages. Given the limited number of I/O lines, the shift register allows us to drive all the segments on four LEDs. the shift register also supplies ample current to light up the LEDs. The SN74HC595 provides this LED drive capacity. A second shift register, the TPIC6C596 provides even more current sinking capacity. This chip works differently. Rather than supplying current, the outputs from the '596 provide a path for current to travel to ground. Moreover, this TPIC chip allows 100ma continuous current capacity, which is necessary for the LED (7 segments x 10ma = 70ma). Remember that the LEDs are common cathode. Using the '596, we simply set which one of four LEDs we want to activate. The '596 also provides current sinking triggering for the guider relays. Since they too draw more current than the processor can supply. So all told, we're controlling four relays, four LED banks of seven segments and scanning four switches using just three I/O lines from the CPU. Pretty cool! |
| Control Knob | The big control knob is a simple mechanical rotary
encoder. Note that this is different from a rotary gang switch.
A rotary encoder is a type of switch that has (typically) two outputs, called phase A and phase B. These cycle through as you rotate the switch, with one phase lagging the other. If you looked at this, you would see something like: A: 0 1 1 0 0 1 1 0 Examining this, you see that each of four unique positions can be identified allowing keeping track of where the switch is. When you turn the knob the other direction, i.e. counter-clockwise, the phase relationship changes. In this case, A would now lag behind B. This provides complete information on the rotation direction of the knob. In the microcontroller code, I've made a couple of tables that represent all possible state transitions. This is then used to increment or decrement a counter which keeps track of the knob position. This is exactly the same as the optical encoder used on the JMI NGF-S focuser except that the optical encoder is far more accurate, providing hundreds or even thousands of counts per rotation, as opposed to 16-32 counts per rotation in a mechanical encoder. |
| Other parts | You'll note on the front panel, just below and to the right of the ribbon cable connector, there are four pins labeled S4 and S3. These are extra switch positions which will allow future expansion. They are currently unused. |
| Color Overview
(click on image for 300 DPI version) |
This is an overview picture of the printed circuit board,
showing connections between components, board layout, and many component
values.
Note that there are two boards here. The bottom board is the front control panel, the top is the main circuit board. I had them made together then cut them apart manually (very carefully!) |
| BOTTOM layer
(click on image for 300 DPI version) |
IMPORTANT: If you are to burn your own circuit boards, note that this view is AS VIEWED FROM THE TOP. Depending on the technology that you use to create your boards, you may have to flip the image or invert it. |
| TOP layer
(click on image for 300 DPI version) |
IMPORTANT: If you are to burn your own circuit boards, note that this view is AS VIEWED FROM THE TOP. Depending on the technology that you use to create your boards, you may have to flip the image or invert it.
|
Copyright (c) 2002 Ted
Inoue, New Hope, PA, USA
Verbatim copying and distribution of this entire site is permitted in any
medium, provided this notice is preserved