Questions tagged [hc-sr04]
For questions about the HC-SR04 ultrasonic ranging sensor.
77 questions
0
votes
1
answer
105
views
A doubt concerning HC-sr04 mechanism of measurement
I'm trying to understand how HC-SR04 sensor works. I looked for detailed explanations online and read datasheets, but I still have a detail I don't get.
If I understood correctly how the "trigger&...
1
vote
1
answer
134
views
Problem adding IR receiver to smart car
I’m making a smart car using an arduino uno, sensor shield v5, motor control with a L298N and a servo motor + HC-SR04 ultrasound sensor. I want to add a IR receiver on the board so I can also control ...
1
vote
1
answer
827
views
How to drive two Stepper motors and use an Ultrasonic sensor together?
I am working on an autonomous robot using two 4-pin stepper motors, HC-SR04 ultrasonic sensor, 2 L298N motor drivers (one for each motor), and an Arduino Uno. My problem is that when I use the stepper ...
-1
votes
1
answer
98
views
It is required to turn on the LED if the distance to the object is less than or equal to 200 centimeters. Find the error in the code
int trigPin = 10;
const int echoPin = 8;
int led = 7;
const int distance = 200;
void setup()
{
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(led, OUTPUT);
}
void loop()
{
...
1
vote
0
answers
205
views
Problems using HC-SR04 with LED displays
I'm having problems using an HC-SR04 ultrasonic sensor in conjunction with an LED display module. The sensor appears to work fine when outputting values to the serial monitor, measuring distances up ...
0
votes
1
answer
135
views
Ways to detect if a ball has reached the wall?
I'm building a kind of pin ball machine, and I need to detect when the ball has hit the wall with the sensor attached.
The ball will hit the wall with a small impact, not large enough to push a button ...
0
votes
1
answer
753
views
Limit on connector cable for HC-SR04 ultrasonic sensor
Is there a limit for the connector distance between an arduino and a HC-SR04 ultrasonic sensor?
I have a set-up for measuring a liquid's level in a tank. The benchtop version worked OK, but when I ...
1
vote
0
answers
58
views
Problem regarding on HC-SR04 sonar with an additional stepper and SG90 servo motor
I'm making a project based on HC-SR04 ultrasonic sensor with a stepper motor and an SG90 servo motor. I have done some conditions for my stepper motor that is given below. Now I want to include my ...
3
votes
1
answer
2k
views
How to use HC-SR04 sensor to make a flowmeter?
I am somewhat familiar with Arduino and am trying to use two ultrasonic HC-SR04 modules to measure the direction of water flow inside a pipe. The sensors are kept as in the image below.
The direction ...
1
vote
0
answers
43
views
What is wrong with my code? (HC-SR04 using 433 mhz module);
I asked a question about this last time but I still couldn't make it work but it somehow gave me an overview about my project. Now I've created an another project that is similar to the last one, the ...
2
votes
1
answer
194
views
How do I get sensor values using transmitter and receiver?
I used an HC-SR04 sensor and connected it to an Arduino board (BOARD1) with a 433 MHz transmitter, and the other board (BOARD2) is connected to the 433 MHz receiver. I don't know how to see the sensor ...
1
vote
0
answers
260
views
How do you count objects (using ultrasonic sensor HCSR04) as 1, after they leave the trigger/echo path?
I found a simple code online that meets my goal to almost 100%, however when I place my hand in front of it, the number continues to count. I am trying to only count "1" when the solid ...
1
vote
0
answers
56
views
Ultrasonic HC-SR04
Having trouble with arduino
Ultrasonic Sensor Module
HC-SR04
I'm sure when you read this you're going to say how stupid can he be and you're probably right but I'm 82 years old and I'm trying very ...
1
vote
0
answers
409
views
ESP-01 and HC-SR04 problems booting up
I have a problem in a project that I am working, basically I need to use a ESP-01 to receive the measurements from a HC-SR04 and send it to another ESP-01 (which I won't cover here).
Basically my ESP ...
1
vote
1
answer
2k
views
Connecting multiple ultrasonic sensors(hc-sr04) to a single arduino board.(mega)
I am currently working on an alarm system using multiple sensors and one arduino board and I am getting readings from 2 of the sensors but one gives a constant zero and a constant buzzer sound even ...