Difference between revisions of "Component: Ultrasonic (EBM019) (EBM Modules)"

From Flowcode Help
Jump to navigationJump to search
Line 15: Line 15:
 
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.
 
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==
+
==Component Source Code==
  
SENSORS
+
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_EBM019v1.fcfx FC_Comp_Source_EBM019v1.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
 
''No detailed description exists yet for this component''
 
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 150: Line 154:
 
|-
 
|-
 
| colspan="2" | Detection ADC delta trigger value A lower value is more sensitive 
 
| 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 17:46, 9 November 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 Source Code

Please click here for the component source code: 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.

FC6 Icon.png EBM019 Example


Downloadable macro reference

Fc9-comp-macro.png GetDistance
Sends a pulse and processes the echo. Returns a object distance in cm 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png SetDelayTime
Set the delay time before sampling for the echo, in microseconds 
Fc9-u16-icon.png - UINT delay
delay time in microseconds 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetDetectionValue
Set the delta value for echo detection 
Fc9-u8-icon.png - BYTE value
trigger point for echo detection 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetPulseWidth
Set the output pulse width, in microsecond (0-255uS) 
Fc9-u8-icon.png - BYTE pulse
width of pulse in microseconds 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
Setup the device. This sets the control output to logic 0 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-5-icon.png Output Pulse Pin
Pin used for controlling the output pulse 
Fc9-type-6-icon.png Echo ADC channel
ADC channel used to monitor the echo 
Fc9-type-21-icon.png Pulse Width (uS)
Output ultrasonic pulse width in microseconds 
Fc9-type-21-icon.png Read Delay (uS)
Time delay in microseconds before sampling for echo 
Fc9-type-21-icon.png Pulse Detection Value
Detection ADC delta trigger value A lower value is more sensitive