Use Arduino to control door lock(fet, AQV254)


Our front door can be buzzed open by pressing a button inside our house, on further inspection, the button works simply by connecting two metal contacts. I am using a AQV254 solid state relay, as I think the door buzzer is mains powered and I wanted isolation, I didn't want to be hooking transistors in there.

I am trying to control this with an arduino. Im using the Arduino to receive a bluetooth signal, and when it receives the passcode over bluetooth (just "buzz" in this case) it should drive the fet and AQV254 to open the door.

I can attach the code, but the code isn't the bit I'm struggling with. My problem at the moment is when I buzz to get in, the AQV254 simply doesnt seem to turn on. I have probed the transistor drain/source connection in the 2 second window and it seems to be on (multimeter in diode mode, the multimeter buzzes), but the AQV254 isnt connecting its pins together.

Does anyone know how this chip is supposed to work? or can anyone suggest an alternative?


Apologies for the crude diagram, I'm on my home PC with no circuit drawing software

Code (All works fine afaik, can successfully receive the code and the onboard LED will light for 2 seconds)

String msg;
char command;
long interval = 1000;
void setup()
  pinMode(13, OUTPUT);  // pin 13 (on-board LED) as OUTPUT
  pinMode(12, OUTPUT);

void loop()
  if (Serial.available() > 0)
    msg = "";
  while (Serial.available() > 0)
    command = ((byte);
    if (command == ':')
      msg += command;
  if (msg == "buzz")
    digitalWrite(7, HIGH);
    digitalWrite(13, HIGH);
    digitalWrite(7, LOW);
    digitalWrite(13, LOW);
    msg = "";

The 10 kΩ resistor needs reducing in value. It will limit the led current in the solid state relay to around 0.3 mA.

The datasheet recommends an LED current of 5mA.
A value of around 680Ω would be suitable.

This current can be supplied directly from an Arduino pin, so there is no need to use a FET.

Oh, thanks for that recommendation, I will try that tomorrow.

Out of interest how did you calculate the 680 ohm? I couldn't find a value for LED forward voltage on the data sheet..


Its an infrared LED so it will be about 1.1V - basic physics, the energy of an infrared photon
is about 1.1 electron volts... 680 ohms gives about 20mA, the standard value for every small
LED and optocoupler.

Red LEDs are 1.4 to 1.8V, blue about 3.2V