Component: Ultrasonic (EBM019) (EBM Modules): Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{| style="width:50%" | |||
{| | |||
|- | |- | ||
| width="20%" style="color: gray;" | Author | | width="20%" style="color:gray;" | Author | ||
| Matrix TSL | | Matrix TSL | ||
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color:gray;" | Version | ||
| 1.0 | | 1.0 | ||
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color:gray;" | Category | ||
| EBM Modules | | 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 Pack== | |||
== | SENSORS | ||
==Detailed description== | |||
''No detailed description exists yet for this component'' | |||
==Examples== | ==Examples== | ||
Sample program using the EBM019 - Ultrasonic sensor. | Sample program using the EBM019 - Ultrasonic sensor. | ||
| Line 33: | Line 36: | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
=== | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
Sends a pulse and processes the echo. | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDistance''' | |||
|- | |||
| colspan="2" | Sends a pulse and processes the echo. Returns a object distance in cm | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
''' | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDelayTime''' | |||
|- | |||
| colspan="2" | Set the delay time before sampling for the echo, in microseconds | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | |||
| width="90%" | delay | |||
|- | |||
| colspan="2" | delay time in microseconds | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDetectionValue''' | |||
|- | |||
| colspan="2" | Set the delta value for echo detection | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | value | |||
|- | |||
| colspan="2" | trigger point for echo detection | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
:[[ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPulseWidth''' | |||
|- | |||
| colspan="2" | Set the output pulse width, in microsecond (0-255uS) | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | pulse | |||
|- | |||
| colspan="2" | width of pulse in microseconds | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
= | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | |||
|- | |||
:[[ | | colspan="2" | Setup the device. This sets the control output to logic 0 | ||
:: | |- | ||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
''' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |||
== | |||
= | |||
==Property reference== | ==Property reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
Pin used for controlling the output pulse | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | |||
| width="90%" | Output Pulse Pin | |||
ADC channel used to monitor the echo | |- | ||
| colspan="2" | Pin used for controlling the output pulse | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-6-icon.png]] | |||
| width="90%" | Echo ADC channel | |||
|- | |||
Output ultrasonic pulse width in microseconds | | colspan="2" | ADC channel used to monitor the echo | ||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | |||
| width="90%" | Pulse Width (uS) | |||
|- | |||
| colspan="2" | Output ultrasonic pulse width in microseconds | |||
Time delay in microseconds before sampling for echo | |- | ||
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | |||
| width="90%" | Read Delay (uS) | |||
|- | |||
| colspan="2" | Time delay in microseconds before sampling for echo | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | |||
| width="90%" | Pulse Detection Value | |||
|- | |||
| colspan="2" | Detection ADC delta trigger value A lower value is more sensitive | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections''' | |||
|- | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations''' | |||
|- | |||
|} | |||
Revision as of 16:23, 7 January 2022
| 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 Pack
SENSORS
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.
Downloadable macro reference
| GetDistance | |
| Sends a pulse and processes the echo. Returns a object distance in cm | |
| Return | |
| SetDelayTime | |
| Set the delay time before sampling for the echo, in microseconds | |
| delay | |
| delay time in microseconds | |
| Return | |
| SetDetectionValue | |
| Set the delta value for echo detection | |
| value | |
| trigger point for echo detection | |
| Return | |
| SetPulseWidth | |
| Set the output pulse width, in microsecond (0-255uS) | |
| pulse | |
| width of pulse in microseconds | |
| Return | |
| Initialise | |
| Setup the device. This sets the control output to logic 0 | |
| Return | |