Need help with an ultrasonic sensor interface circuit to ev3

Click For Summary
SUMMARY

The discussion focuses on building an interface circuit for the SRF04 ultrasonic sensor to connect with the Lego Mindstorm EV3 brick. The user has completed the trigger circuit using a 555 timer configured in astable mode with Rb = 220 kOhms, Ra = 1 kOhm, and C = 0.1 µF, resulting in a period of approximately 31ms and a 50% duty cycle. The main challenge is converting the echo output from the ultrasonic sensor into a format readable by the EV3 brick, considering its sampling rate of 1000Kz. Suggestions include creating a voltage proportional to the echo return time or utilizing an interrupt signal to process the delay.

PREREQUISITES
  • Understanding of 555 timer operation in astable mode
  • Knowledge of ultrasonic sensor functionality, specifically the SRF04
  • Familiarity with Lego Mindstorm EV3 hardware and its sampling limitations
  • Basic circuit design skills, including the use of op-amps and voltage regulation
NEXT STEPS
  • Research how to convert ultrasonic echo signals into voltage levels suitable for EV3 input
  • Learn about interrupt handling in the EV3 programming environment
  • Explore advanced circuit design techniques for interfacing sensors with microcontrollers
  • Investigate alternative ultrasonic sensors with built-in compatibility for Lego Mindstorm
USEFUL FOR

Robotics enthusiasts, hobbyists building Lego Mindstorm projects, and engineers designing sensor interfaces for microcontrollers.

btpolk
Messages
38
Reaction score
0
I'm currently building a robot using Lego Mindstorm with an ev3 brick that will follow a pre-determined path (marked by black tape), maintain a certain distance behind another robot, and coming to a stop at the end of its journey. The ev3 will be connected to 2 DC motors, 3 light sensors, and an ultrasonic sensor.

The specifics of the test are irrelevant because I just need some help with build an interface circuit for the ultrasonic sensor (SRF04). I have the trigger circuit completed. I'm using a 555 timer in a-stable operation with parameters: Rb = 220 kOhms Ra = 1 kOhms C = 0.1 uF. Parameters are defined by the TI document (http://www.ti.com/lit/ds/symlink/ne555.pdf) on page 11. This gives me a period of about 31ms and duty cycle of about 50%. Now I need to convert the echo output of the sensor to be readable for the ev3 brick. I was thinking average value but I'm not sure if that's correct or how to go about it. Any ideas?

Available lab circuit elements: capacitors, resistors, op-amps, 555 timers, voltage regulators, and diodes.
 
Engineering news on Phys.org
Sound travels at 1ms per foot, so you need to be able to sense the reflection delay with that in mind. The ev3 only samples at 1000Kz, so you will need some external circuit. You can create a voltage that is proportional to the echo return time.

Or, possibly you can create a trigger signal that interrupts the processor and have it figure out the delay.
 

Similar threads

Replies
4
Views
2K
Replies
2
Views
6K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K