50, BYTE2, BYTE3, BYTE4
BYTE1: = 50 (The Command)
BYTE2: = Limits for triggering the LED display (see description below)
BYTE3: 01 = Decimal Output
BYTE3: 02 = Ascii Output
BYTE3: 03 = Ascii Delimited Output
BYTE4: 0= one shot command
BYTE4: 255 = continuous
Response from IRCF360:
Depending on the value of BYTE3 the IRCF360 will respond as follows
Decimal Output :
[Reading from Right Sensor], [Reading from Left Sensor] (the output is in WORD format i.e. 2 bytes per sensor)
RAW1= [Reading from Right Sensor] RAW2=[Reading from Left Sensor] CR
ASCII Delimited Output:
[Reading from Right Sensor] ; [Reading from Left Sensor] CR
Circular Display Feedback:
Based on the value of the BYTE 2 the circular display will illuminate. It has been assumed that the North LED is facing the forward direction. The LED's on either side of the N LED will will illuminated according to the magnitude of the difference between the Right and Left light sensor readings. For example if the light on the left light sensor is higher than the right sensor then the left LEDs will illuminate and visa versa.
The number of left or right LEDs illuminated will depend on the difference between the light sensor right and left readings. The North LED will illuminate if the difference between the two light sensors is less than 5. If the difference is > 5 and greater than BYTE2 then the NW or NE LED will also illuminate. If the difference is 2x the value of SBYTE 2 then the E or W LEDs will also illuminate. If the difference is 3x the value of SBYTE 2 then the SE or SW LEDs will also illuminate. If the difference is 4x the value of SBYTE 2 then the S LEDs will also illuminate. (See videos)
At the front of the IRC360 are two connectors were ambient light sensors can be fitted. The light sensors fitted to this robot are described -> here
The IRCF360 take 10 rapid light readings from the 10bit analogue to digital converter on the right and left sensors.
The value of the light readings are then averaged and the results sent to the RS232 interface for robot controller to act or to log the values in a spreadsheet on a PC.
The circular LED display acts as a visual feedback and flash the LED's depending on the light intensity recorded. It also indicates on which side of the robot the most light currently is shining. The sensitivity of the LED scale's is influenced by the value of BYTE2. In the video below the value was set to 70 and the sensor was pointing towards a window.
Experimentation of different values can be set-up. Setting BYTE2 as 0 will turn off the display.
This is a demo of the command 50 and the visual feedback of the light sensor functionality.
It's really easy to get up and running with building your own robots and saves a lot of time as the sensor interfaces direction with your programmable controller (arduino, basic stamp, picaxe, pololu, etc)
Describe where this command could be useful -
Two Vishay TEPT4400 Ambient Light Sensors are included within the IRCF360 sensor. These are silicon NPN epitaxial planar phototransistor in a T-1 package. It is sensitive to visible light much like the human eye and has peak sensitivity at 570 nm. Alternatives could be Cadmium Sulphide (CdS) photocells.
The IRCF360 takes 10 rapid light readings from the two 10-bit analogue-to-digital (A2D) converters on the right and left sensors. The values are then sorted using a bubble sort routine.
Here is an example of a bubble sort routine written in Proton Basic for the Amicus:
After sorting, the average reading for left and right light sensors are transimitted via the of RS232 port as a 10 bit data. Don't forget the results from the A2D converter are 10 bits - so either use 4bytes (two bytes for each left / right reading) or 2 words (1 word for each left / right reading) as the variable to receive the information.
The following command was used to instruct the sensor to continuously monitor the light levels:
Example code for light sensing - Video 1
SEROUT b.2,T9600_8, (50 ,70,0,255)
Example code for Light tracking - Video 2
Products > Infrared Control Freak - 360 degree Proximity Sensor > 1. IRCF360 - Commands - Quick Reference Guide >