Component: Ultrasonic (EBM019) (EBM Modules): Difference between revisions
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| Line 80: | Line 80: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetDistance''' | ||
|- | |- | ||
| colspan="2" | Sends a pulse and processes the echo. Returns a object distance in cm | | colspan="2" | Sends a pulse and processes the echo. Returns a object distance in cm | ||
| Line 94: | Line 94: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Setup the device. This sets the control output to logic 0 | | colspan="2" | Setup the device. This sets the control output to logic 0 | ||
| Line 108: | Line 108: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetDelayTime''' | ||
|- | |- | ||
| colspan="2" | Set the delay time before sampling for the echo, in microseconds | | colspan="2" | Set the delay time before sampling for the echo, in microseconds | ||
| Line 127: | Line 127: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetDetectionValue''' | ||
|- | |- | ||
| colspan="2" | Set the delta value for echo detection | | colspan="2" | Set the delta value for echo detection | ||
| Line 146: | Line 146: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetPulseWidth''' | ||
|- | |- | ||
| colspan="2" | Set the output pulse width, in microsecond (0-255uS) | | colspan="2" | Set the output pulse width, in microsecond (0-255uS) | ||
| Line 166: | Line 166: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:23, 13 July 2026
| Author | Matrix TSL |
| Version | 1.0 |
| Category | EBM Modules |
Ultrasonic component
This board has both an ultrasonic transmitter and receiver. The transmitter is driven by an on-board 40KHz oscillator which is enabled by the host microprocessor. The receiving sensor signal is amplified and provided as an analogue signal to be processed by a single channel ADC of the microprocessor. By measuring the time delay between enabling a transmit pulse and receiving an echo the distance of objects in a range of around 3cm to 3m can be determined.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_EBM019v1.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_EBM019v1.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Sample program using the EBM019 - Ultrasonic sensor.
Sends out a pulse and determines distance from time taken to receive reflection.
Macro reference
GetDistance
| GetDistance | |
| Sends a pulse and processes the echo. Returns a object distance in cm | |
| Return | |
Initialise
| Initialise | |
| Setup the device. This sets the control output to logic 0 | |
| Return | |
SetDelayTime
| SetDelayTime | |
| Set the delay time before sampling for the echo, in microseconds | |
| delay | |
| delay time in microseconds | |
| Return | |
SetDetectionValue
| SetDetectionValue | |
| Set the delta value for echo detection | |
| value | |
| trigger point for echo detection | |
| Return | |
SetPulseWidth
| SetPulseWidth | |
| Set the output pulse width, in microsecond (0-255uS) | |
| pulse | |
| width of pulse in microseconds | |
| Return | |