SSScat + Arduino Hack

I purchased a SSScat (PIR air sprayer) and thought that it lacked some features.

For example:
RF Remote Trigger
Possibility of other sensors
The ability to determine the amount of gas you will use per. puff. (The time the valve is powered)

Unfortunately, I have not so many pictures of SSScat separated.

It consists of (before Mod):

  1. Electronic valve 6V (no picture of this, sorry)
  2. Large circuit board with PIR Sensor (which is also the timer circuit of the valve)
  3. Small circuit board with 3v3 regulator for PIR pwr, transistor driver for valve and On / Off switch.

Link to my photos of SSScat inside/opened (the first 4 images are of PIR circuit)
Link: Dropbox - NJA-SSScat - Simplify your life

I have removed PIR part and used the original transistor driver to the valve and added 10k on the base of the transistor circuit.

Then I have a SSScat without PIR, but with GND and Trigger pin which is led out of the plastic house.

When the trigger pin is placed to 5v, then triggered the valve and when the 5v removed valve stops again.

And then it’s time to Arduino fun.

My Demo Code with 433MHz RF:

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();

int relayPin = 12; // SSScat trigger pin + GND to Arduino
int ledPin = 13; // Blink when RF is RX

const int radiopause = 500;

void setup() {
  pinMode(relayPin, OUTPUT);
  digitalWrite(relayPin, LOW);
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);
  Serial.begin(115200);
  mySwitch.enableReceive(0);
  // Receiver on inerrupt 0 => that is pin #2
}
void fire() {
  Serial.println("Fire 1 !");
  digitalWrite(relayPin, HIGH);
  delay(250); // Small Shoot
  digitalWrite(relayPin, LOW);
  delay(1000*3);
}
void fire2() {
  Serial.println("Fire 2 !!");
  digitalWrite(relayPin, HIGH);
  delay(500); // Big Shoot
  digitalWrite(relayPin, LOW);
  delay(1000*3);
}
void loop() {
  Serial.println("Ready!");
  Serial.println(" ");
    if (mySwitch.available()) {
    
    int value = mySwitch.getReceivedValue();
    
    if (value == 0) {
      Serial.print("Unknown encoding");
    } else {
      digitalWrite(ledPin, HIGH);
      Serial.print("Received ");
      Serial.print( mySwitch.getReceivedValue() );
      Serial.print(" / ");
      Serial.print( mySwitch.getReceivedBitlength() );
      Serial.print("bit ");
      Serial.print("Protocol: ");
      Serial.println( mySwitch.getReceivedProtocol() );
      digitalWrite(ledPin, LOW);
  
}//*******************************
if ( mySwitch.getReceivedValue() == 1325467) { // 1
  if ( mySwitch.getReceivedBitlength() == 24) { // Rx Bit Length
  delay(100);
  Serial.println("RF Key 1");
  fire();
  }
  }
  if ( mySwitch.getReceivedValue() == 7654321) { // 2 
  if ( mySwitch.getReceivedBitlength() == 24) { // Rx Bit Length
  delay(100);
  Serial.println("RF Key 2");
  fire2();
  }
  }
  if ( mySwitch.getReceivedValue() == 1234567) { // 2 
  if ( mySwitch.getReceivedBitlength() == 24) { // Rx Bit Length
  delay(100);
  Serial.println("RF PIR");
  fire();
  }
  }
  mySwitch.resetAvailable();
  delay(radiopause);
  }
  }

Later I will upload pictures of my Arduino circuit.

Regards.
Nicolai

fun project!

your comments state //2 twice ....

you should rewrite it without delay (see blink without delay example) to make it more responsive.

Hi @Nico_TheDecoder

Could you provider the pictures og the Arduino circuit? I al doing something similar with mine, but is stuck.

BR Kasper