High Voltage Alternating Occlusion Training Glasses [ATtiny13]




Introduction: High Voltage Alternating Occlusion Training Glasses [ATtiny13]

About: I like designing useful devices. Also, I’m a vegatarian.

In my first instructable, I’ve described how to build a device that should be quite helpful to somebody who wans to treat amblyopia (lazy eye). The design was very simplistic and had some drawbacks (it required use of two batteries and liquid crystal panels were driven by low voltage). I decided to improve the design by adding voltage multiplier and external switching transistors. Higher complexity required use of SMD components.

Step 1: Disclaimer

Usage of such a device may cause epileptic seizures or other adverse effects in small portion of device’s users. Construction of such a device requires use of moderately dangerous tools and may cause harm or damage to property. You build and use described device at your own risk.

Step 2: Parts and Tools

Parts and materials:

  • active shutter 3D glasses
  • 18x12mm ON-OFF latching push button switch (something like this, switch I used had straight, narrower leads)
  • 2x SMD 6x6mm tactile switch buttons
  • 2x 10 uF 16V Case A 1206 tantalum capacitor
  • 100 nF 0805 capacitor
  • 3x 330 nF 0805 capacitor
  • 4x SS14 DO-214AC(SMA) schottky diode
  • 10k 0805 resistor
  • 15k 1206 resistor
  • 22k 1206 resistor
  • 9x 27ohm 0805 resistor
  • 3x 100k 1206 resistor
  • 6x BSS138 SOT-23 transistor
  • 3x BSS84 SOT-23 transistor
  • 61x44mm copper clad board
  • few pieces of wire
  • 3V battery (CR2025 or CR2032)
  • insulating tape
  • scotch tape


  • diagonal cutter
  • pliers
  • flat-bladed screwdriver
  • small phillips screwdriver
  • tweezers
  • utility knife
  • saw or other tool that can cut PCB
  • 0.8mm drill bit
  • drill pres or rotary tool
  • sodium persulfate
  • plastic container and plastic tool that can be used to take PCB out of etching solution
  • soldering station
  • solder
  • aluminum foil
  • laser printer
  • glossy paper
  • clothes iron
  • 1000 grit dry/wet sandpaper
  • cream cleaner
  • solvent (for example acetone or rubbing alcohol)
  • permanent maker

Step 3: Making PCB Using Toner Transfer Method

You need to print mirror image of F.Cu (front side) on glossy paper using laser printer (without any toner saving settings on). External dimensions of printed image should be 60.96x43.434mm (or as close as you can get). I’ve used single sided copper clad board and made connections on the other side with thin wires so I didn’t have to worry about aligning two copper layers. Yo can use double sided PCB if you like, but next instructions will be for single sided PCB only.

Cut PCB to the size of printed image, you can add few mm to each side of PCB if you like (make sure that PCB will fit your glasses). Next you will need to clean copper layer using wet fine sandpaper, then remove particles left by sandpaper with cream cleaner (you can also use washing up liquid or soap). Then clean it with solvent. After that you should be very careful not to touch copper with your fingers.

Put printed image on top of PCB and align it with board Then put PCB on a flat surface and cover it with clothes iron set to max temperature. After short while paper should stick to PCB. Keep iron pressed to PCB and paper, from time to time you may change iron position. Wait at least few minutes, until paper will change color to yellow. Then put PCB with paper to water (you can add cream cleaner or washing up liquid) for 20 minutes. Next, rub paper from PCB. If there are places where toner didn’t stick to copper, use permanent marker to replace the toner.

Mix fresh water with sodium persulfate and put PCB in the etching solution. Try to keep solution at 40°C. You may put plastic container on top of radiator or other heat source. From time to time mix solution in the container. Wait for uncovered copper to completely dissolve. When it is done remove PCB from the solution and rinse it in water. Remove toner with acetone or sandpaper.

Drill holes in PCB. I used screw as center punch to mark centers of holes before drilling.

Step 4: Soldering and Programing Microcontroller

Cover copper tracks in solder. If any tracks were dissolved in etching solution, replace them with thin wires. Solder ATtiny to PCB, as well as wires that will connect microcontroller to a programmer. Upload hv_glasses.hex, keep default fuse bits (H:FF, L:6A). I used USBasp and AVRDUDE. Uploading .hex file required me to execute following command:

avrdude -c usbasp -p t13 -B 16 -U flash:w:hv_glasses.hex

You may notice that I needed to change -B (bitclock) value from 8 that I used to program ATtiny in my first instructable to 16. It slows down uploading process, but sometimes it is necessary to allow correct communication between programmer and microcontroller.

After you uploaded .hex file to ATtiny, desolder programmer wires from PCB. Solder rest of components except bulky SW1 ON/OFF switch and transistors. Make connections on the other side of the board with wires. Cover whole PCB except transistor pads with aluminum foil to protect MOSFETs form electrostatic discharge. Make sure that your soldering station is properly grounded. Tweezers you use to place components should be anti-static ESD ones. I used some old tweezers that were lying around, but I connected them to ground with wire. You may solder BSS138 transistors first and cover PCB with more foil when they are finished, because P-channel BSS84 MOSFETs are particularly vulnerable to electrostatic discharge.

Solder SW1 last, angle its leads so it looks similarly to SS14 diodes or tantalum capacitors. If SW1 leads are wider than pads on PCB, and they short-circuit to other tracks, cut them so they don’t cause any problems. Use decent amount of solder while joining SW1 with PCB, as tape that will hold PCB and glasses frame together will go directly over SW1 and it may put some tension on solder joints. I did not placed anything in J1-J4, LC panel wires will be soldered directly to PCB. When you are done, solder wires that will go to battery, put battery between them an secure it all in place with isolation tape. You may use multimeter to check if complete PCB generates changing voltages on J1-J4 pads. If not, measure voltages on earlier stages, check for any short-circuits, unconnected leads, broken tracks. When your PCB generates voltages on J1-J4 that oscillate between 0V and 10-11V, you may solder LC panels to J1-J4. You do any soldering or measurements only when battery is disconnected.

When everything is put together from electrical standpoint, you can cover back of PCB with isolation tape and join PCB with glasses frame by putting tape around them. Hide wires that connect LC panels to PCB in place where original battery cover was.

Step 5: Design Overview

From user point of view, High Voltage Alternating Occlusion Training Glasses work the same way as glasses described in my first instructable. SW2 connected to 15k resistor changes devices frequency (2.5Hz, 5.0Hz, 7.5Hz, 10.0Hz, 12.5Hz), and SW3 connected to 22k resistor changes for how long each eye is occluded (L-10% : R-90%, L-30% : R-70%, L-50% : R-50%, L-70% : R-30%, L-90% : R-10%). After you set settings, you need to wait about 10 seconds (10s of not touching any buttons) for them to be stored in EEPROM and loaded after power down, at the next device launch. Pressing both buttons at the same time sets default values.

However, I used only PB5(RESET, ADC0) pin of ATtiny as input. I’m using ADC to read voltage on the output of voltage divider made of R1-R3. I can change this voltage by pressing SW2 and SW3. Voltage is never low enough to trigger RESET.

Diodes D1-D4 and capacitors C3-C6 form a 3 stage Dickson charge pump. Charge pump is driven by PB1(OC0A) and PB1(OC0B) pins of microcontroller. OC0A and OC0B outputs generate two 4687.5 Hz square waveforms that are phase shifted by 180 degrees (when OC0A is HIGH, OC0B is LOW, and vice versa). Changing voltages on microcontroller pins push voltages on C3-C5 capacitor plates up and down by +BATT voltage. Diodes allow charge to flow from capacitor which top plate (one that is connected to diodes) has higher voltage to the one which top plate has lower voltage. Of course diodes work only in one direction, so charge flows only in one direction, so every next capacitor in sequence charges to voltage that is higher than in previous capacitor. I’ve used Schottky diodes, as they have low forward voltage drop. Under no load voltage multiplication is 3.93. From practical standpoint only load on charge pump output are 100k resistors (current flows through 1 or 2 of them at the same time). Under that load, voltage on charge pump output is 3.93*(+BATT) minus around 1V, and charge pumps efficiency is approximately 75%. D4 and C6 do not increase voltage, they only reduce voltage ripples.

Transistors Q1, Q4, Q7 and 100k resistors convert low voltage from microcontroller outputs to voltage from charge pump output. I’ve used MOSFETs to drive LC panels because current flows through their gates only when gate voltage changes. 27ohm resistors protect transistors from large surge gate currents.

Device consumes approximately 1.5 mA.

Be the First to Share


    • Tinkercad to Fusion 360 Challenge

      Tinkercad to Fusion 360 Challenge
    • Cardboard Speed Challenge

      Cardboard Speed Challenge
    • Go Big Challenge

      Go Big Challenge



    1 year ago

    Some additional information that might clarify some things:

    To measure how liquid crystal panels were originally driven in unmodified glasses I used circuits from this drawing that is part of my other instructable. Circuit on the left can be used to measure peak amplitude, while the one on the right will flash LED when occlusion occurs (LED was flashing even when input was reversed, that’s how I determined that driving voltage alternates between being negative and positive).

    The purpose of this polarity reversals seems to be protection of electrodes inside LC panels from electroplating. Polarization of liquid crystal material could occur when only one voltage polarity would be used (d.c. stress). Here you can find an article that deals with this issue.

    LC panels are driven by H-bridges (there should be two of them with 8 transistors in total, but because of the minuscule amount of power drawn by the load, 2 transistors are shared by the both H-bridges). H-bridge can drive LC panel with negative polarity, positive polarity and short electrodes of the panel, making it transparent again.


    3 years ago

    First, thank you so much for sharing this. My daughter has used 7Hz flicker glasses for amblyopia*. I wondered about less expensive solutions and came across your Instructable.
    Definitely a lot of ground-up design work on your part! Very cool :)
    Hope the forces of karma have already rewarded you for your generosity in sharing this work.

    Let me ask: Do you think there might be a role for an approach that re-purposes more of the guts found in 3D LCD shutter glasses, such as those used with theater TVs, DLPs and computer monitors? It occurred to me that perhaps you could generate control signals with a custom circuit and then "drive" the LCD shutters with their existing electronics, rather than driving the panels directly.
    Perhaps this is naive and you investigated this early on... I don't know if such glasses will support the lower frame rates (e.g. 7Hz vs >90) that would be applicable to current vision therapy protocols.

    I ask in part because I am less familiar with surface-mount construction techniques and was initially even looking for a way to hack this with an Arduino or similar to drive existing off-the-shelf glasses via a simple IR emitter circuit. I figure some other builders might also be less proficient in circuit construction as well.

    Thank you for any thoughts!


    *to another poster's comment, yes, individual situations may vary, for example my daughter had strabismus with a non-accommodative component that was surgically treated, in addition to amblyopia. But I understand there is a continuum of situations where vision therapy like this can be used, and probably a broader set of indications. Still, talk to an eye doc if you've wondering (an optometrist with a "behavioral" focus should be keyed into these issues).


    Reply 3 years ago

    Unfortunately, different 3D glasses use different sync protocols, as described in following articles:

    Investigating the cross-compatibility of IR-controlled active shutter glasses
    Reverse-Engineering & Emulating the Kogan Active-Shutter 3D TV IR Protocol

    Some of 3D glasses may actually use four token protocol, where shutter in front of each eye is individually opened or closed by one of those four tokens (commands). That in theory should allow that kind of 3D glasses to by driven by DIY emitter with different frequencies and duty cycles. But very likely those glasses have some built-in protections, that won’t allow them to operate with weird timings.

    If you are really afraid of making circuit with SMD components, you can always turn to some of the techniques that I described in my previous Instructable, namely constructing separate, large PCB and then connecting it to glasses with wires or attaching simpler version of circuit made with THT components directly to glasses.

    I also developed a device that modifies video signal send from PC to 3D TV with alternating occlusion training / dihoptic stimulation. It isn’t pretty and modern but it still might be beneficial to some people. Of course watching 3D content on a regular 3D TV won’t provide tactile and kinesthetic feedback like the game described in this paper:
    Recovering stereo vision by squashing virtual bugs in a virtual reality environment

    Ideal setting for treating amblyopia would be probably custom made dichoptic VR experience using state of the art hardware like Knuckles_EV2. Sadly, I am not a game developer, so I can only provide microcontroller-based solutions.

    Also, I’m working on newer version of this video signal modifying device. It is based on STM32 microcontroller in LQFP48 package (with 0.5mm leads spacing, so really, soldering High Voltage Alternating Occlusion Training Glasses which are based on a MCU in SOIC case [1.27mm spacing] is a piece of cake). There are some socioeconomic issues that prevent me from using my computer lately (that is why my response is so delayed, I sincerely apologize), and my work on this new project progresses quite slowly. But anyway, I should release it before Half-Life 3 comes out, so stay tuned!

    I like the way you did the voltage multiplier.

    Did you consider using a dual-h-bridge motor driver to replace ALL of your transistors and many resistors? I did some googling and found a part that I think would work nicely. It's a single so-8 package.

    LV8548MC (or pin compatible LB1948MC).


    Reply 4 years ago

    Unfortunately, those motor drivers consume quite a lot of power (LV8548M requires typically 1.7mA when one of inputs is high, LB1948MC consumes 15mA). Voltage multiplier won't stand a chance. My MOSFET driver requires only 0.1-0.2mA.


    Reply 4 years ago

    Ah yes. Excellent point.

    Whenever I see lots of discretes, I can't resist looking for an integrated solution.

    I looked for a FET solution, but they were all overly complex.

    Man Up
    Man Up

    4 years ago

    Bear in mind that some causes of amblyopia may require surgical treatment. These devices are useful in idiopathic cases or where nerve palsey is indicated.


    4 years ago

    Although I have no need for one of these glasses, they might be super helpful for those who do. Considering how expensive healthcare can be, I'm glad to see that you've selected low-cost and widely available parts for the build! Using the microcontroller for the charge pump is very clever way to generate the high voltage required without any specialized IC.

    For future projects you can consider to remove the gate resistors, the inrush current is limited by the IO output resistance of the microcontroller (which is about 30Ω @3V VCC) or pull-up resistors.

    Do you still have the original PCB from the glasses? I am wondering whether the whole new circuit could fit into the glasses.


    Reply 4 years ago

    Original PCB had 360
    square mm. PCB designed by me has 1816 square mm (1403 if we exclude
    bottom part with J1-J4 pads). But with use of components in smaller
    packages (especially SS14 diodes, they really are bulky) it probably
    is doable. Also, original PCB has all semiconductors inside ICs,
    that’s why it can be so compact.