zaterdag 28 november 2015

Arduino_KY-025_Reed_module

Arduino KY-025 Reed module

My version of this module has
2 leds:   power led and sensor led
4 pins + , G A0 (analog out) and D0 (digital out)
one IC( comparator ) and some resistors an a variable resistor (potmeter)On the internet you can also find a digital output only version of KY-025.

Hardware

  • D0 (Digital Signal)                 Arduino D3 (Only needed for Digital )
  • + +5V
  • G GND
  • A0 (Analog Signal )        Arduino A0 (Only needed for Analog  )

Digital


Function (Digital)

If power connected to the module the power led is on.
When a magnet is close to the sensor also the sensor led on the module is on and the pin 13 led on the Arduino will go on also.

Analog

On The Net i could not easy find an example using the KY-025 A0 analog pin.
I cloned an existing analog sensor script and tried it.


Function (Analog)

The reed sensor can only be closed (with magnet) or open (without magnet)  !!
With magnet i get the value is 1,  without magnet  1023.  Perhap the value can be changed with the potentiometer. (I did not try this.)

More info




Geen opmerkingen: