Skip to content

Single Axis: Principle,Circuit and Program

Naveen Saini edited this page Sep 3, 2017 · 13 revisions

Principle:

Here we would be using PWM module to generate pulse of 40 kHz wave, one of the two PRU, PRU0 provides the clock for PRU-DAQ, which samples the output from sensors.The following diagram explains the flow of data in software: Data Flow in Software

TOF determination:

For Time Of Flight(TOF), i.e. time taken by wave for travelling distance between tx and rx sensors, We are using correlation method, which basically finds the similarity between the two waves and hence report the time difference between transmitted wave and received wave.

This method is better over other methods like threshold method because it can handle disturbances and noise in waves sampled by ADC, for better results we can combine it with Fast Fourrier Transformation(FFT).

Below Image depicts the result of correlation b/w tx, rx wave.

wave

Circuit For Testing:

Since designing the circuit was not the first preference during the project, as for most of the time we focused on method for TOF determination, however for testing purpose, I have used two circuits, first one was using Arduino uno, in this method we try to establish the validity of TOF result obtained from correlation method , following circuit might need some improvement like voltage conditioning or regularisation

test

In second circuit we use following devices and boards

  1. HC-SR04
  2. LM-324 DIP IC
  3. Capacitor()
  4. Resistors
  5. MA40S4R

It needs to be built in two parts, One as in following picture, here for tx sensor, we use HC-SR04 board, it needs to be provided trigger, which is done by PWM module, hence the connections are as follows:

setup

unlike the picture, the rx part needs to placed in 15 cm apart in front of HC-SR04, circuit setup

and for other part I have the op amp, but do not have resistors and capacitors currently, but might be able to gather them in this week, until then this the circuit, we connect the output to the other channel i.e. 4 of the prudaq and then run the program to check results, the temp is here assumed as 25 celsius.

receiver circuit

check using oscilloscope if the PWM module is working as expected.