Interfacing Open Digital Sensors with LITE 2.0 Brain

Interfacing Open Digital Sensors with LITE 2.0 Brain

Avishkaar LITE 2.0 BLE Brain has support for a variety of Avishkaar Sensors. But, this brain can be used with other Digital Sensors as well with the help of Avishkaar Open Sensor PCB connector. In this document, we’ll discuss two open Sensors viz. LDR and PIR Motion Sensors connection and usage.

Open Sensor Connector:


As can be seen, this connector has two sides:


  • Brain Side Connection - This is Avishkaar Design System standard RJ11 connection. Avishkaar Standard connecting cable can be used to connect this to the brain side.

  • Digital Sensor Side Connection - This is an open Berg connector (F). There are 4 pins, but in case of normal Digital Sensors only following three are used:

    • Vcc - This is a common circuit voltage connection to be connected with Vcc of the Sensor side. 

    • GND - This is a common ground connection to be connected with the Ground pin of the sensor.

    • S1 - This is a Signal Input connection to be connected to the digital output of the Sensor.

    • S2 - Reserved for future use

PS: Pls. do not connect any external power to the Sensors or Connector.

LDR Sensor:



        

Connection Config:

Vcc - Vcc

GND - GND

DO - S1

AO - Ignore (this is Analog Output).

PIR Sensor:






Connection Config:

Vcc - Vcc


Output - S1


Ground - G ND


Sensitivity Potentiometer - Can be used to tune the detection Sensitivity means how wide and far the detection should work. 

Output Timing Potentiometer - Can be used to hold the reading for a certain time. This is mostly used in situations of much chatter to avoid false detections. 


PS: Ideally, these are tuned for optimal use for the normal scenarios and might not need any change.

Connection Diagram:


Software Usage (AMS):


New Block added already to AMS. This reads the value of the digital sensor connected at the PORT. Returned values are:

1 - If Sensor State is HIGH (Detected)

0 - If Sensor State is LOW (Not Detected)

Example:


Bot Moves (Direction depends on Motor Connection) and stops if Sensor State is set to HIGH (Detection happened).