Scanner Shield CCA Revision: 1 Aug 2016
DVI Breakout Revision: 29 Jul 2016
The Scanner Shield is the combination of the Synchronization & Galvo boards. It is meant to simplify interconnections between these boards (by being on the same board) and simplify power connections (having the ATX power supply have Molex connectors, bypassing the need for a solderless connector bus and cutting down assembly time. Only the power connector will be a Molex connector; all other connectors will be simpler snap-on ribbon connectors or plain .1“ headers, thus further reducing assembly time. Also, the power transistor (now in a TO-220 package) will be soldered directly to the board, eliminating the assembly of another cable.
A critical feature of this board is the MCP4822, a dual-output, internal voltage referenced 12-bit SPI DAC. This DAC will allow us to scan up to a max of 4096 lines, if needed. It will also replace the sensitive “Main Control Knob” that had to be manually adjusted every time the monitor was started. The manual adjustment behavior will be replaced by a software state machine.
Other control circuit options were also introduced for experimentation, as detailed below.
When the system locks, the polygon tachometer (PTACH) and divided h-sync (DSYNC) signal transitions occur within roughly +/-100ns, as shown below. In the below image, the top line is DSYNC, and the bottom line is PTACH.
For editing, the Scanner Shield Eagle files are available at “J:\groups\holography\~Monitor Development\~Scanner Shield CCA”.
Several source documents and Falstad simulation files are available at “J:\groups\holography\~Monitor Development\~Synchronization CCA\Synchronization CCA Revision Nov 2015”. The Nov. 2015 revision of the Sync CCA was pulled into the Scanner Shield CCA.
There are essentially 7 hardware sections of the Scanner Shield:
The power section is meant to have a 5-pin male Molex connector; the female end is supposed to be attached directly to the ATX power supply cables. LED pads are available to indicate what buses are active (if any have shorted out). There is a -5V linear regulator (U3) which supplies 100mA. There are several buffer capacitors throughout the board to help prevent supply ripples. These buffer capacitors are placed as close as possible to their loads. Two capacitors (usually two orders of magnitude difference in value) are sometimes used where sensitivity might be an issue.
There are 3 options for the +5V supply: the Arduino onboard regulator (max 200mA), the ATX power supply (couple of amps), and the ESC when installed. The tachometer laser has burned out 8mil supply traces before, and the ESC is optional, so the ATX power supply was chosen to power all +5V devices.
That being said, SJ1/SJ2 are available to switch the Arduino to its own +5V supply, powered off of the +12V bus. To use this mode, cut the trace within SJ1 and between SJ1-SJ2, then solder the SJ2 pads together.
There are two ground clips for oscilloscopes to connect to: TP_G5 and TP_G4.
The job of this circuit is to turn a single DAC output into a differential signal that common galvos can use. Potentiometer AMPL controls the vertical size of the output image (distance between scan lines). Potentiometer BIAS changes the vertical position of the image. Changing one parameter won't affect the other.
The GALVO_PORT was designed to accompany all possible 3-pin combinations that galvo manufacturers might use. We've had galvos in the past were the connector was [+SIG -SIG GND] or [+SIG GND -SIG]. This port will allow us to not have to switch the pins in the connector around.
One primary purpose of this board was to upgrade the DAC to >256 scan levels. A 12-bit (4096 values) DAC was chosen to provide us with as many as we'd want for the foreseeable future.
R25 and R24 are resistors meant to limit current if GAL- and GAL+ outputs are accidentally shorted to ground.
There were several attempts to build a hardware loop filter for the polygon mirror. A breadboard version was made where different filters were tested, but we could only get it to lock “perfectly” (no visible jitter) with the legacy circuit (interestingly, the /2 frequency dividers were needed as well).
One primary purpose of this board was to replace the “Main Control Knob” (“DCBIAS” in the legacy circuit) that was manually adjusted every time the monitor was powered in order to get the polygon mirror to lock with no visible jitter or oscillation. This knob was replaced by a DAC and scaler circuit (op-amps IC10A and IC10B) so that manual adjustment would no longer be needed.
Falstad simulation of 0-(4.096 or 5)V to 9-17V scaling for Polygon Motor here.
An optional pulse stretcher (D7,R5,C19,D1) was added to the dual inverters (U5) that condition the tachometer output. The dual inverters are from Texas Instrument's SN74LVC2G14, which was specifically chosen so that the tachometer's max 3.28V output could be counted as a logical high to the inverters. The pulse stretcher is optional and its values are not yet determined. Solder the pads of D7 together and leave R5, C19, and D1 uninstalled if no pulse stretching is to be done.
The HSYNC hardware divider circuit was upgraded to a single 8-bit divider (IC3) controlled in software. The option to bypass the hardware divider exists through JP6 (see below). If bypassed/not installed, use interrupts from the HSYNC line (Pin 18), short JP6 pins 1-2, and output results to Pin 37 (DIV_P0 / PortC bit 0). Tests will be done to see how the hardware divider compares to software interrupt-driven dividers (latency, jitter, processor load).
Several other options for controlling the polygon mirror have been incorporated into this board.
| Primary Polygon Control Modes | ||||||
|---|---|---|---|---|---|---|
| JP6 | JP2,JP3 | JP4 | JP9,JP10 | JP8 | ||
| Legacy | Uses phase-comparator output. Best visual results so far. | 3-2 | 1-2 | 3-2 | 3-2 | 1-2 |
| DAC Only | Control polygon voltage directly with DAC (ie, software loop filters) | n/a | n/a | n/a | 1-2 | 1-2 |
| Enable Toggle | Control polygon speed by toggling (via PWM) driver enable line (Pin 45) | n/a | n/a | n/a | n/a | 3-2 |
| Jumper Settings (defaults emphasized) | ||
|---|---|---|
| JP6 | 1-2 | Software divider (output to Pin 37); bypasses hardware divider |
| 3-2 | Hardware divider; set value (2-256) to Port C | |
| JP2,JP3 | 1-2 | Divide signals going into phase comparator by 2 |
| 3-2 | Pass signals directly to phase comparator | |
| JP4 | 1-2 | Use PC2 output |
| 3-2 | Use PCP (PP) output | |
| JP9,JP10 | 1-2 | Polygon voltage directly controlled by DAC |
| 3-2 | Polygon voltage controlled with DAC & phase comparator | |
| JP8 | 1-2 | Polygon voltage controlled with hardware/software |
| 3-2 | Polygon voltage set to +24V; toggle POLY_ENABLE (Pin 45) for control | |
The DVI Breakout board is simply meant to make available several signals in the DVI-I port, namely, the RGB analog outputs, H/VSync signals, DDC/EDID/I2C bus, Hot Plug signal, and +5V supply from the graphics card.
As well, three extra control signals (GPIOs) were included from the Arduino: MIXAMP0, MIXAMP1, and 75Ohm_Ena. (The 10-position ribbon cable had unused positions available). MIXAMP0 & MIXAMP1 don't yet have any defined function, but it's envisioned that they could somehow be useful in controlling/sensing the configuration of the Mixer Amplifier boards or other devices. 75Ohm_Ena is meant to toggle a DC-capable 75 Ohm load to trigger/enable the graphics card's analog outputs. The complete functionality of these signals have yet to be determined.
Close up of the Schottky diode installation:
The two capacitors next to the EEPROM chip are .1uF and 10uF.
The interface pinout is as follows on both the Breakout Board and Scanner Shield:
| Pin | Driver | Description |
|---|---|---|
| VSY | Graphics Card | VSYNC from graphics card |
| HSY | Graphics Card | HSYNC from graphics card |
| HOT | Arduino | HOT_PLUG to graphics card |
| 75E | Arduino | Option to toggle 75-ohm load on green analog output |
| MA0 | Arduino | Digital output for optional Mixer-Amplifier circuit control |
| GND | Both | Ground |
| +5V | Arduino | +5V from ATX power supply for powering EDID EEPROM |
| SDA | Both | I2C Data, directly shared between Arduino and graphics card |
| SCL | Both | I2C Clock, directly shared between Arduino and graphics card |
| MA1 | Arduino | Digital output for optional Mixer-Amplifier circuit control |
All signals are +5V digital.
WARNING:Several of these signals connect DIRECTLY to interface pins on the graphics card, without any ESD protection. Be careful not to assemble the ribbon-cable incorrectly or discharge static electricity into these traces (or anywhere near any electronics). VSYNC, HSYNC, HOT_PLUG, SDA, SCL, and GND connect directly to their respective pins in the DVI connector. +5V is from the ATX power supply and does not connect to the graphics card +5V output. The +5V trace running from the ATX power supply (PWR_PORT) to the DVI Port is only 0.008” (8mils) and is not intended to provide substantial current. It's only intended to power the EDID EEPROM when the DVI Breakout board is not connected to the graphics card.
HOT (HOT_PLUG) is used to signal to the graphics card that a monitor as been attached/detached. It is hoped that the Arduino can toggle this to virtually disconnect/reconnect the HoloMonitor, thus forcing the host computer to reload the EDID resolution settings without having to manually unplug/replug the DVI/VGA cable. Typically in VGA-DVI passive adapters, the graphics card's +5V output is shorted to the HOT_PLUG input pin. See Sec. 2.2.9 of DVI specification.
The EDID EEPROM on the DVI Breakout Board can be programmed through the I2C clock and data lines. It requires +5V, which can come from the Scanner Shield or the graphics card. The two +5V power supplies coexist by having two opposing Schottky diodes separate the two supplies on the Breakout Board, with the EEPROM load in between.
After the Hot Plug event, the graphics card will query the EDID EEPROM. Because the I2C lines are directly shared between the EEPROM, graphics card, and Arduino, the Arduino can see this traffic and possibly interfere with it if incorrectly programmed. Care should be taken not to program the EEPROM from the Arduino while the computer is reading it. The Arduino probably can't replace the EEPROM (acting as an I2C slave), because of size limitations to its internal I2C buffer (although this hasn't been proven yet). The EEPROM is at 7-bit slave address 0x50 and has one address byte (max EEPROM size of 256 bytes). See the 24AA02 datasheet. The Arduino might not need to activate pull-up resistors for the I2C bus; the graphics card may already be doing this.
75E (75OHM_ENA) is for toggling an optional 75-ohm load. Some graphics cards detect there's a monitor attached by detecting if there's a 75-ohm load on any/green analog output. However, this might cause impedance mismatching when in parallel with 50-ohm loads.
MA0/MA1 (MIXAMP0/MIXAMP1) are optional digital Arduino outputs (or inputs) in case there's anything we'd want to control digitally on the Mixer-Amplifier boards, like RF switches for bypassing upconverters.
The ribbon-cable that is made to connect the Scanner Shield to the DVI breakout board should be 1:1, that is, with the ribbon-cable flat, both connectors should be on the same side, and their key tabs should be pointing the same direction:
The ferrite core is meant to block RF signals leaked from the Mixer-Amplifier board.
The DAC being used is a dual-output 12-bit SPI internally-regulated MCP4822. It has a SPI clock speed of 20 MHz and a settling time of 4.5 us (max 222.2 kHz update rate). It uses a 2.7-5.5V supply and has a selectable internal reference of 2.048V or 4.096V.
A DAC with an internal precision voltage reference was used so that command values in software wouldn't have to change.
The DAC controls the galvo stepping and polygon control voltages independently.
The polygon mirror uses a 3-phase brushless driver, which is very similar to the motors of most electronic model aircraft (ie, drones). The option was given for an Electronic Speed Controller (ESC), typically used for model aircraft, to interface with the Scanner Shield. ESCs have an “S” rating, indicating what voltage range they accept (1S = 3.7V to 4.2V). Since +12V is available, any “3S” ESC can be used. ESCs have different RPM (“kv”) ratings, continuous current ratings, and firmware options (factory / SimonK / BLHeli). Further experiments should be made to see if these can replace the HA13535 circuit.
Ports:
Header installation points:
Note: the Reset pad is covered by the laser scanner assembly port. Don't install a pin there.
Electrical schematic:
Interrupts:
DVI Breakout:
Hardware Divider:
PWM:
Polygon Control:
DAC:
Power:
All SMDs (except for C19 and R5) soldered in:
With Ports, Jumpers, Headers, and Ports done:
Everything but the Power Transistor:
Voltage Rail Tests:
Up till now, the DSYNC timer hasn't had any means of synchronizing with VSYNC. This means that the image could begin anywhere on the screen, dependent on how many HSYNC cycles the timer is from starting with VSYNC. After some experimentation, we've created an edge-triggered pulse generator hooked to the Asynchronous Preset pin of the counter. This will restart the timer with each VSYNC pulse, ensuring that DSYNC pulses occur at the same time as VSYNC pulses, the same as HSYNC pulses do. The new counter schematic is as follows:
The NAND gate on the right is acting as an inverter (as opposed to a discrete inverter for simplicity's sake), with the second switching to generate the reset pulse. The values for R1 and C1 are determined experimentally. At the moment, C1 = 60nF and R1=5.6Ω for the breadboarded circuit. We'll redetermine the values once we can assemble this on a PCB. For more detail see Jesse's log.
Rev. 1 Aug 2016 mistakes & notes: (corrected as of Rev. 29 Aug 2016)
Patch board to swap pins 1 & 2 for -5V voltage regulator:
POLY_TACH Interrupt source change. This modification is no longer needed.
Infographic on ringing in the tachometer signal: