The camera is controlled via a I2C-seriell interface.
0-5V, 12-bit resolution and converting time <20µs.
.Here: A complete draft
(pdf, 88 kB) of the IO-extension card is given as a pdf-file.
(pdf, 390 kB) is given as a pdf-file. The digital input are pulled-up via 47 kOhms resistors (to 5V ). Then a micro-switch can be coupled between input and minus. The analog inputs have an internal resistence pulled down to ground. Since this is approximately 20 kOhm, the outimpedance on the mesured system has to be much less than 20 kOhm. The servo motors have 3 wires: black-ground, red-5V and white-signal. The digital output can be used to light the diods. This is done together with a current limitating resistor of 330 Ohm in series with the dios. The camera is conncted using a flat cabel. This cabel has to be routated so that pinhole are mouted on the camera and where pin 19 is missing (otherwise this has to be cut off). If you are uncertain of what to do: Ask your advisor.
On the card 3 programmable chips(CPLD) are mounted. These are the one named CAMERA, SERVO och DCMOTOR in the draft. A lot of the IO-functions are programmed into the chips by Alteras
. In this case CPLD-chips in the 7000-series.
Programmable devices are comparable to EPROM-memories. A certain input (address) gives a certain output/data. But these chips can handle a bit more since they can inluda a counter. That is given a special input sequence gives a special output signal sequence. Furthermore can these devices be erased and programmed many times.
Altera provides a a free student version of the software
to program the chips. The way to this on CPLD is fairly easy. In the program a schematic-editor is included with the most familiar devices i.e. 74-devices, but also more complicated devices. Moreover is a simulator included where the chip is simulated at signal level. This tool is graphical and fairly simple as well. The devices can the be programmed using the parallell port.
Schematics with CAMERA
(pdf, 37 kB), SERVO
(pdf, 38 kB) and DCMOTOR
(pdf, 38 kB) drawn in the Alteras program MAX+PLUSII are included as pdf documents.
The schematics of the camera system
(pdf, 140 kB) is also in a pdf-file.The Quasarelectronic camera module uses a own crystal to deliver data. The clock increases a counter which becomes the address in the memory. This counter has to be cleared at each new picture and it must also also be stopped during the so called blanking period. The blanking period, is the time the camera-chip uses to change row. This is the time when the TV cathode changes row and then needs the tv-screen some time to put-off the electrone-beam before beginning a new line. Moreover, there is a video output on camera, but this will not be used here. Blanking and stopping is handled by the logic betweenn the camera and the counter. The camera delivers data with 60 pictures/s(Amerikan standards).
When reading a image from the SRAM a bit in a register is set. This changes the mux putting the SRAM into read mode and the address to the DSP. Noteworhty is that the camera does not stop to deliver pictures. Because the camera and SRAM output are not supposed to be mixed are resistances placed in series with this internal data-bus. The memoties are 2x128kB, which is not sufficient for a 640x480 pixel VGA-image. So, instaed is a QVGA image delivered from the 320x240 pixlarcamera.
But it takes app. 25ms to get a QVGA image in to the DSP SDRAM from the IO-card and app. 50ms to conver it to RGB-form.
The dc-motor outputs schematic
(pdf, 4 kB) is given in a pdf-file. A more detailed explenation of engine current control is found at ST
. To control the engine current, using the L6506-devices an analog signal between 0 and 1 Volt is needed. This signal is created using a CPLD named DCMOTOR. This CPLD delivers a pulse widht modulated (PWM) signal which volage is devided and filtered using a passive lowpassfilter
(pdf, 9 kB). The PWM-signal is created in the same way as the servosignal, see below
A draft of how the PWM signal to the servos is created is given in pdf. The CPLD is named SERVO and is used to create the control signal to the servo motors. Furthermore is the address decoding handle in this device. Also the digital in and output pass this device. The PWM-signal is created using a latch, a comparator and a counter. A value is put into the latch. The latch delivers the value and the comparator compares it with the value given by the counter. If the value is large than the one from the latch a one is output otherwise a zero.
The counter is increasing its value continiously with the clock ticks and is never stops. Instead it rolls around when it reaches maximum. In this way is T0 constant and T1 is depending of the value put into the latch In a standard servo is T0constant and app. 20ms. The time is not so critical as long as it is constant. To control the servo is the time T1 varied between 1 and 2ms.
A schematic picture of power supply on the IO-card is given in a pdf-file. The voltage supply to the motors is handle via a H-bridge which is supplied from the 7.2V batteries. The voltage to the DSP is via a low-drop voltage controller. That is it can handle a low volateg drop over the controller. The voltage to the IO mouted devices is feed via the pin-list on the DSP-card.