TT078: Greiner AC Line Synchronizer
Creates TTL pulses that are phase-locked to the AC line, and phase adjustable in 5 usec increments.
This version has two outputs: a continuous output which pulses high (5V) for 1 msec after a programmable delay after the start of each AC cycle,
and a triggered output which waits for a rising edge from the trigger input, then waits for the start of the next AC cycle, then generates a high pulse after a programmable delay.
The base is the TipTop1590BBRP, minimally stuffed:
Basically just the RP2040 with its support hardware and a 3.3V regulator. Schematic:
Here's the AC input board:
It takes 12VAC from a wall wart, and creates 5V for the microcontroller, and a logic-level AC input signal.
Trigger input board is a standard ToprIsoDin2:
Since we only have one trigger input, only U2 and assoc components installed. Used HCPL-0211 for isolator.
Output is a standard ToprDout2:
Code is written in Arduino, taking advantage of the dual processors of the RP2040. Processor 1 deals with the user interface over the USB serial port, and processor 2 runs a 200KHz state machine, which it phase-locks to the AC input, and generates the output pulses.
The user can adjust the phase timing over the USB virtual com port by sending:
D <arg> ;
where <arg> is the delay in 5-usec increments from the beginning of the AC cycle. Acceptable range for arg is 0 to 3100. Positive integers only.
The processor will echo the command as it is sent. If it accepts the command, it will replace the ";" with a "!". If not, it will replace it with a "?".
To store the new delay in non-volatile memory, send:
S;
The processor will respond with "EEPROM Write Completed" or "EEPROM Write Failed".
Here's the code:
Copyright © 2024 The President and Fellows of Harvard College * Accessibility * Support * Request Access * Terms of Use