User Tools

Site Tools


monitor:scanner_shield_cca

Scanner Shield CCA & DVI Breakout

Scanner Shield CCA Revision: 1 Aug 2016

DVI Breakout Revision: 29 Jul 2016

PDF of current schematic

Annotated original schematic
scanner_shield_dr_smalley_original_schematic_drew_annotations.jpg


Download

Purpose

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.

locked_phase_error_oscope.jpg


Design

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:

  • Power
  • Galvo control
  • Polygon control
  • DVI breakout
  • DAC
  • PWM ports
  • Arduino Mega 2560

Power

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.

Galvo Control

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.

Falstad simulation of voltage scaling for Galvo here.

Unreleased improvement (Fri19Aug2016).

Polygon Control

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

DVI Breakout

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.

scanner_shield_prototype_1aug2016_1to1_ribbon_cable.jpg

DAC

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.

PWM Ports

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:

  • JP5 - +12V power & ground
  • JP1 - standard ESC interface; center pin is unused (+5V output from ESC)
  • polarity of these ports are labeled in the silkscreen (“S” = PWM signal)

Arduino Mega 2560

Header installation points:

Note: the Reset pad is covered by the laser scanner assembly port. Don't install a pin there.

Electrical schematic:

Interrupts:

  • Pin 2: (in) DSYNC - needed for galvo control (either DSYNC or HSYNC)
  • Pin 3: (in) POLY_TACH - enhances polygon speed control
  • Pin 18: (in) HSYNC - needed for galvo control (either DSYNC or HSYNC)
  • Pin 19: (in) VSYNC - needed for galvo control
  • Pin 20: (both) I2C SDA - not used as interrupt
  • Pin 21: (both) I2C SCL - not used as interrupt

DVI Breakout:

  • Pin 22: (out) HOT_PLUG - virtually reconnect HoloMonitor; force EDID read
  • Pin 23: (out) 75OHM_ENA - optional trigger for graphics card monitor detection
  • Pin 24: (out) MIXAMP0 - optional Mixer-Amplifier control signal
  • Pin 25: (out) MIXAMP1 - optional Mixer-Amplifier control signal

Hardware Divider:

  • Port C (Pins 30-37): (out) write divider value directly to Port C
  • (note: Pins are in reverse order; Pin 37⇒PC0⇒DIV_P0, Pin 30⇒PC7⇒DIV_P7)

PWM:

  • Pin 4: (out) PWM signal for ESC control
  • Pin 45: (out) POLY_ENABLE for toggled enable control

Polygon Control:

  • Pin 45: (out) POLY_ENABLE - Set high for continuous operation; optional speed control via internal PWM HW module
  • Pin 46: (in) POLY_LOCKED - HA13535 Pin 13, open-collector indicator of when polygon mirror is within +/-1.6% of target speed; goes low when locked

DAC:

  • Pin 49: (out) CS_DAC - used instead of Arduino Pin 53 to not conflict with Arduino SPI Slave Mode
  • Pin 50: (in) MISO - currently unused
  • Pin 51: (out) MOSI
  • Pin 52: (out) SCK

Power:

  • ATX +5V connected to Arduino 5V line and VIN
  • option to sever ATX +5V from Arduino 5V and connect ATX +12V to VIN through SJ1/2

Construction Progress

All SMDs (except for C19 and R5) soldered in:

With Ports, Jumpers, Headers, and Ports done:

Everything but the Power Transistor:

Everything in:

Voltage Rail Tests:

  • -5V/-12V:
  • +5V:
  • +12V:
  • +24V:
  • ATX Power Supply:

Upcoming Changes

DSYNC Timer Synchronization

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.


Errata

Rev. 1 Aug 2016 mistakes & notes: (corrected as of Rev. 29 Aug 2016)

  • CRITICAL: pins 1 & 2 of the -5V regulator are SWAPPED! I had mistakenly assigned pin 1 (left) as VIN and pin 2 (center) as GND, whereas it's the opposite in the datasheet. FORTUNATELY, there's an easy patch for this (pictured below). This is now fixed in the library/PCB layout as of Rev. 10 Aug 2016.
  • CRITICAL: The tachometer works intermittently on the Rev. 1 Aug 2016 board. On the working HoloMonitor, with the Rev. 10 Mar 2015 Synchronization CCA, there was a voltage divider (R7+R8) that created 2.14V for “V11” and “V22” in the tachometer/motor connector. This potentiometer was removed and replaced with a resistor that pulled the voltage up to 5V. “V11” and “V22” connect to pins VL1 and VL2 on the M66510FP, the IC on the laser/photodiode board. There's a few lines in the M66510FP's datasheet stating the voltage on these pins should be 0<(VL1, VL2)<VCC-1.8V. Replace R8 with a 1.44k resistor and solder a 1k resistor on top of / in parallel with C2 to bring the voltage back to about 2.0V. Doing this removes the intermittent failure of the tachometer. This has been corrected in the schematic (as of 29 Aug 2016). NOTE: If the 1.44k and 1k resistors are soldered backwards, the raw tachometer output will disappear (go to 0V) when above medium speeds/frequencies.
  • CRITICAL: The output of the tachometer's signal conditioner, U5, has strong ringing (see infographic below). This ringing is not present in the output of its divide-by-two D-Flip-Flop (IC2A). Its amplitude is large enough to incorrectly trip the flip flop. Solder a 5-ohm resistor in series with a 330pF capacitor between Pin 3 of JP3 and ground. (fixed in Rev. 30 Aug 2016)
  • CRITICAL: Power the board first with the ATX supply first BEFORE connecting the USB cable to the computer. Unpower in reverse order (USB first, then ATX supply).
  • IMPORTANT: The POLY_TACH pulse (after the digital-conditioning inverters) is too short for the Arduino to measure. It has a high time of about 40ns, which is 0.64 clock cycles. This is too short for the Arduino interrupts to be reliably triggered. In contrast, the HSYNC high time is 3.84 clock cycles. The pulse stretcher (C19, R5, D7, D1) must be installed to make the high-time long enough for the Arduino to be able to detect. The values R5=10k and C19=1nF produces a high-pulse of about 6us. The capacitor must be <10nF in order to drain quickly enough through the impedances of U5A and D7 to drop the voltage to ground within the time the TACH_RAW signal is considered high. Falstad example of pulse-stretcher.
  • IMPORTANT: The silkscreen labels for R14 and R30 are swapped. The row should read “R9 R11 R14 R30 R29”; instead it erroneously reads “R9 R11 R30 R14 R29”. This has been fixed in Rev. 19 Aug 2016.
  • IMPORTANT: Ramping up the voltage on the motor will cause the driver to accelerate the polygon mirror, thus drawing more current (higher than usual). This additional current warms T1. When ramped continuously (ie, ramping the voltage/RPM up/down), the PCB alone is not enough to keep T1's temperature low enough (the exposed PCB becomes too hot to touch). When the polygon mirror speed is in a steady state, the temperature of the exposed PCB near T1 is near the upper limit of comfortable to the touch, but still acceptable. When the polygon mirror is disabled via the POLY_ENABLE signal, T1 stays barely warm. If voltage/RPM ramping is going to be common, a heat sink will have to be made and installed.
  • The native connector for the laser scanner assembly pushes slightly against C13.
  • The Molex connector for the PWR_PORT overlapped C3. C3 has been moved out of the way. For the Rev. 1 Aug 2016 board, drill out a cavity in the Molex connector for C3 to fit into.
  • Several of the components of the galvo driver circuit are in the “1206” package, whereas all of the other 2-terminal SMD components are “0805”-sized. 0805 components can be soldered into 1206 pads. The 1206 pads have been changed to 0805 size.
  • minor adjustment to U5 silkscreen
  • minor adjustments to P120K potentiometer footprint hole sizes/positions for better fit
  • vias' impact on silkscreen (holes in letters/words) not taken into account
  • Resistor values for LEDs determined experimentally after fabrication; values recorded in updated schematic.

Patch board to swap pins 1 & 2 for -5V voltage regulator:

vreg_patch_board_overview.jpg

POLY_TACH Interrupt source change. This modification is no longer needed.

Infographic on ringing in the tachometer signal:

monitor/scanner_shield_cca.txt · Last modified: 2017/08/28 15:46 by drhe0208