My wife is a psychotherapist and she is using a technique called Eye Movement Desensitization and Reprocessing (EMDR). In EMDR, the person being treated recalls distressing experiences whilst doing bilateral stimulation, such as side-to-side eye movement or physical stimulation, such as tapping either side of the body.
My wife used to move her finger from side to side and had patient's eyes follow it. But as this can be quite distracting, she asked my to build something that stimulates the patient's eye movement without her having to do it.
I came up with the idea of an "light bar" or series of lamps or diodes that are programmed to light up in sequence to create a moving light point.
This is what I had in mind:
- A number of LEDs in a row - and the light is "moving" from LED to LED and back to induce side-to-side eye movement.
- Brightness of LEDs and speed of movement to be adjusted with potentiometers
- Must look nice enough to fit in a cozy therapy room
While I was already looking forward to the woodworking part, I first built a proof of concept on my desk - just the electronics and programming.
I was wondering if I needed to analogwrite to the LEDs in order to dim and smoothen the movement. But it turns out that just switching the LEDs on and off one after another is just fine. So I used digital write instead.
As I needed no other pins, I used all 14 just to trigger the LEDs.
The brightness potentiometer is sitting between the LEDs and their joint GND - series-wired with a 330 Ohm resistor. Changing the resistor to a different one will change the brightness.
The speed potentiometer is read through an analog pin. While building I was writing the value to Serial.println for debugging. You can still see it in the code.
Building a casingI built a prelinary version just with a raw piece of wood to get an idea for the ideal measurements. But ultimately the device has to look nice in my wife's therapy room and not distract patients with wires and stuff poking out. So I create a housing out of beech wood.
I am not a good woodworker. But I enjoy building stuff from wood. And practice makes perfect.
After the casing was done, I moved the prepared electronics pieces into the casing...
...and we're done. For the power supply I added a long cable and a switch to the 9V adaptor, so that the device can be switched on and off while sitting down.
Comments