Proximity SR04T

From ElectroDragon Wiki
Revision as of 18:46, 19 February 2021 by Chao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Working mode

  • Working mode setup by R27 resistor
R27 open = pulse open mode, R27 = 47K = auto serial output mode, R27 = 120K = trigger serial output mode.

pulse open mode

  • Using IO port TRIG trigger range, send module a minimum of 10us high TTL.
  • Module automatically send 8 * 40khz square wave, automatically detect whether there is a signal to return;
  • There is a signal to return, through the IO port ECHO output a high level. High time is the duration of ultrasound from the launch to the return time.
Distance = (high time * sound velocity (340M / s)) / 2;
  • After the module is triggered, the ECHO port will automatically go low after 60MS if the echo is not received (the reason is more than the measured range or the probe is not on the measured object), marking the end of the measurement, Whether successful or not.
  • LED indicator, LED non-power indicator, it will receive the trigger signal after the module will not light, then the module is working.

Auto Serial Mode

The serial output format is TTL level, which indicates that the module automatically outputs the distance value in units of 100MS. Serial baud rate: 9600, n, 8,1.
Module power to identify, directly into the working mode, the module to carry out a distance every 100ms range, and output from the pin TX a frame, including four 8-bit data. Frame format: 0XFF + H_DATA + L_DATA + SUM

  • 0XFF: for a frame to start the data, used to judge;
  • H_DATA: the upper 8 bits of the distance data;
  • L_DATA: the lower 8 bits of the distance data;
  • SUM: data and, for the effect of its 0XFF + H_DATA + L_DATA = SUM (only low 8)

Note: H_DATA and L_DATA synthesize 16-bit data, that is, the distance in millimeters  

Note

  • The module outputs the nearest distance value in the dead zone, and outputs 0 if the module does not measure the data or is out of range.
  • LED indicates the working status not power up status.

Trigger serial mode

  • Module enter into standby mode after power up.
  • Module start sense once after received 0X55 from RX serial, LED will turn on

Sense Range

SR04T sense range.jpeg