FiO Glide – ANT – LDR-ADCDigital IO Demo

download all demo files: RF_ADC_IO.7z

View table of content.


This demo will show you how you can use FiO Glide[name RF2] to read ADC value from LDR (aMG Photocell-A) then control an IO that drive an LED. Then send the read values (ANT protocol) to the second FiO Glide[name RF1], while RF1 also read its ADC value from LDR (another aMG Photocell-A) to control another LED. This second FiO Glide[name RF1] then gather all four values (ADC1,LED1,ADC2,LED2) and send via ANT protocol to the third FiO Glide[name RF0]. RF0 then read all values and send to PC via serial communication, then we use Simulink tools to display and plot values on scope.

Tools used

  1. Three FiO Glide
  2. Three aMG USB Connect with three USB cables
  3. Two aMG Photocell-A
  4. Two LEDs
  5. Some connecting wires

Connection Diagram for RF1 and RF2

Detail Explanation for RF1 and RF2

The Vin for aMG Photocell-A module is connect to +3.3V (Pin38) and GND to Pin25. Vsense is then connected to ADC port Pin22 (AIN7), user can connect ADC to other pin if needed. The output pin is Pin20 (AIN5 configured as IO output), this drive LED at the anode, the cathode then connect to GND. Since FiO Glide can drive current up to 5 mA, it is safe to drive an LED with out a current limiting resistor.

Expected Result

When user connect USB power to the three boards, LEDs will light up on RF1 and RF2 at office lighting condition. If user put a flash light on LDR with light intensity high enough, then LED will go OFF, and ON again if you remove flash light. This behaviors go the same on RF1 and RF2 modules. The values are sent to host PC and plot on Simulink scope. ADC values show in Volt and LED status show 1 and 0, representing ON and OFF status.

RF2 Model

RF1 Model

RF0 Model

Host Model

Limitation and Purpose

  1. The maximum data transmitting rate is 8 Hz (ANT protocol limitation)
  2. ANT protocol is best for multiple nodes communication on a network
  3. Each ANT TX/RX block can send/receive up to 8 bytes, for more data, please use more blocks
  4. For mobile application, user can provide 3V battery to FiO Glide and remove aMG USB Connect
  5. ANT protocol consume very little power from battery
  6. For point to point communication, user can use RF block which can provide much higher transmitting rate(100Hz and beyond)
  7. RF blocks consume much higher power from battery (more than 20x compared to ANT protocol)