High Voltage Alternating Occlusion Training Glasses [ATtiny13]

10,747

33

7

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
  • ATTINY13A-SSU
  • 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

Tools:

  • 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.

Share

    Recommendations

    • PCB Contest

      PCB Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • First Time Author

      First Time Author

    7 Discussions

    0
    None

    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).

    3 replies
    0
    None
    rarinnRicksterInstructables

    Reply 9 months 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.

    0
    None
    RicksterInstructablesrarinn

    Reply 9 months 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.

    0
    None
    Man Up

    9 months 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.

    0
    None
    nqtronix

    9 months 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.

    1 reply
    0
    None
    rarinnnqtronix

    Reply 9 months 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.