Good afternoon people, firstly let me say thanks for everything in advance. I've learned a lot from this forum and this is my first post I think, I signed up ages ago and have only just got my arduino uno and started playing around with it.
Down to my question. I am working on a project and part of it involves a box with windows on every side. The windows will have panels on them and these panels will be sheets of PDLC smart film.
I wrote a program using a 6 channel relay that randomly switches the relays on or off. It works brilliantly with LEDS. So today I decided to use just one relay linked up to the PDLC film and wrote a basic blink program to switch it on, delay for 2 seconds then off, as a test.
The problem is, the film switches on fine (opaque to transparent), but when it switches off it fades back to opaque instead of instantly. It's almost like the voltage is going from high to low gradually instead off instantly. It's hard to explain so I uploaded a video on youtube of it.
The film came with a button witch the runs off two AA batteries, I don't know much about electronics but I'm guessing I'm missing something in this circuit which is responsible for the switch from opaque to transparent being instantaneous. The switch works like this: Push it once turns the film off (opaques to transparent), puch it again turns the film on (transparent to opaque).Here are some pictures of the circuit from the switch that came with it along with some pics of my breadboard circuit. The circuit is the same as this one (credit microcontrollerslab.com) except it's just one relay, the led and resistor are replaced by the PDLC film and the batteries are replaced by mains voltage (I'm in the U.K. so that's 240V I think).
(EDIT: Just noticed that the hot wire from the relay is in the wrong position on the breadboard. I actually noticed this after I took the photo and corrected it before I took the video)
PDLC Switch Circuit:
So the main problem in a nutshell is that the film is not switching on or off instantly. Can anyone help me with my problem? What's causing this fading issue and how do I fix it, what am I missing in the circuit that should cause the film to switch off instantly instead of gradually fading off?
Thanks in advance.