PRO
Sproket
USA
Asked
— Edited
Hello everyone,
Im using the HC-SR04 , works well but when using the Radar it detects then bot move back and just keeps doing circles. I tried all different settings. The sensor is fixed not on a servo. What do you recommend?
Thank you all
Related Hardware EZ-B IoTiny
hi sproket
are you using a script or just the radar panel ?
Hi there- Im using the radar panel.
https://synthiam.com/Support/Skills/Ultrasonic-Distance/Ultrasonic-Radar?id=16101
I just want something simple, detect object, back up, then turn and continue.
I have been searching the forum and searching no luck yet.
Thank you for looking.
hi
here's a topic about that sensor . it seems you need a voltage regulator .
https://synthiam.com/Community/Questions/Hc-sr04-Shows-Only-255-1929
I have a voltage regulator, its a buck on it. Set to 5v.
https://www.amazon.com/dp/B08Y674Z6F?ref=ppx_yo2ov_dt_b_product_details&th=1
My sensor - https://www.amazon.com/dp/B01JG09DCK?psc=1&ref=ppx_yo2ov_dt_b_product_details
Connected to digital ports. D6 and D7
hi
what happens when you check the box "only scan forwart " ?
It jerks left and right moving closer to the target with only scan fwd. But doesnt do circles.
Thats with No reverse before turn
With reverse before turn enabled it detects and jerks left to right backing up some then spins.
there's another checkbox on the right for distants . you can try lower the number by half and see what happens.
Same thing is going on.
I can try another sensor.
If I scrip it pings are solid-
while(true){
var x = Ping.get(D6, D7); print(x); sleep(500);
}
Tested regulator 5v true with meter.
It sounds like your robot is experiencing an issue with the obstacle avoidance logic when using the Ultrasonic Radar skill. Since the sensor is fixed and not on a servo, it's detecting objects but may not be determining the correct direction to turn to avoid the obstacle, leading to the circular movement.
Here are a few steps you can take to troubleshoot and potentially resolve the issue:
Check Sensor Placement: Ensure that the ultrasonic sensor is mounted at an appropriate height and angle on your robot to detect obstacles effectively. If the sensor is too low or angled incorrectly, it may not get a clear reading of the environment.
Sensor Testing: Test the ultrasonic sensor separately using a simple script to ensure it's working correctly. You can use the
GetPing
command in a script to read the distance and verify that the sensor provides accurate readings.Adjust Minimum Distance: In the Ultrasonic Radar skill settings, adjust the "Minimum Distance Before Turn" value. If this value is too high, the robot may not have enough room to maneuver after backing up. Try lowering this value to give the robot more space to turn.
Modify Movement Logic: Since you're using a fixed sensor, you might need to create a custom script that better handles obstacle avoidance for your specific setup. The script could include logic to alternate turning directions or to choose a turn direction based on the last known clear path.
Check Power Supply: Verify that the power supply to the sensor and the motors is stable and sufficient. Power fluctuations can cause erratic behavior.
Review Skill Settings: Double-check the settings in both the Ultrasonic Radar and Ultrasonic Collision Detection skills to ensure they are not conflicting. For example, if both skills are trying to control the robot's movement simultaneously, it could result in the observed behavior.
Update Firmware: Make sure that your EZ-B IoTiny firmware is up to date. Firmware updates can resolve bugs and improve performance.
Consult the Community: If the issue persists, consider reaching out to the Synthiam community forum for additional assistance. Other users and the Synthiam team may have insights or experience with similar issues.
Remember to make one change at a time and test your robot after each adjustment to isolate the cause of the problem. If you need further assistance with scripting or adjusting settings, feel free to ask for more detailed guidance.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
if you hold your hand in front of the sensor , do you see the dots on the radar screen ?
Sometimes not consistent
Starting to think bad sensor.
ARC up to date of course.
what robot are you using ? can you mount the sensor on a servo as anthena says ? try another sensor . check wires . alsi pictures or video helps allot , in understanding the problem , just saying .
thats cool . do you have an rotatation servo ? you can by the smal parts separt. they are easy to mount then .
https://www.ez-robot.com/store/p47/servo-motor/rotation-servo.html
https://www.ez-robot.com/store/p70/rotation-servo-connector.html
Thank you. Work in progress.
I have servos. I will have to test more tomorrow. I can 3d print stuff as well.
Thanks again to be continued.
You're using a robot skill that requires a servo connected to the sensor. Here's the manual: synthiam.com/Support/Skills/Ultrasonic-Distance/Ultrasonic-Radar?id=16101
Oh, and also because the radar will behave unpredictably, given that the instructions state it requires a servo. But...
make sure your sensor is not pointing toward the ground. It'll pick up the floor if it is.
make sure the robot doesn't tilt and have the robot aim toward the floor. It'll see the floor and detect it as a distance
make sure the holder isn't vibrating when the robot moves. Sound is considerably slow for distance detection - compared to light. So, if your sensor is vibrating, the sensor might not pick up the signal correctly.
some distance sensors require 5v (not 3.3v). As your question states, if you're using an EZ-Robot IoTiny, it needs a 5v voltage regulator. Remember, the I/O of the iotiny is VCC, which is the voltage directly from the battery. So it'll become damaged if connected directly to battery voltage if above 5v
You can "sort of" get away with using that robot skill without a servo. But it'll only see things directly in front, and I'm not sure how the navigation avoidance will behave. Either way, it shouldn't have false positives. So make sure you remove all of the things i listed above that could trigger a false positive.
Thank you DJ - Its on 5v voltage regulator and tested with meter. Sensor datasheet is 5v.
Sensor is 90 degree forward no slant. Not at floor. Robot runs smooth bc of custom movement settings, not jerky.
I will try another sensor as well.
DJ - is there a skill for sonic sensor not requiring servo? Just looking for stop at obstacle, back up, then turn.
Or any helpful hints on custom code? I tried using Blockly for scripting but seems distance is left out or maybe it doesnt need it bc it goes by setting of sensor config, not sure how that works.
I have arduino turtle bot with sonar, rpi with sonar and opencv, just trying to find out how ARC does this.
I just ordered ezrobot camera for this but I would like to get the ping sensor working with a skill without servo if at all possible.
Thank you.
Replaced sensor same thing is going on. Not the sensor.
Kinda thinking its the skill needing a servo.
try it with a rotation servo . in your top picture it looks like there has bin some damage to wires .
Update- Replaced servo - when bot is not moving skill works as it should. Bot executes skill as should.
When moving and detects object it starts to execute skill but then gets lost and just circles.
I agree skill is ment to use servo, probably it.
can you show a screenshot of your radar settings ?
hi sproket
these are my settings for using only forwart detection . maybe this helps .
i use the original sensor from ez robot . one cable wire . i dont use the sero port .
hey jedi
i made a simpel script to detect forwart motion .
controlCommand("Ultrasonic Radar Scan", "PauseOff") sleep(300) ping_wait(d22,d22,lower,20) sleep(300) controlCommand("Auto Position", "AutoPositionAction", "Wow") sleep(1000) controlCommand("Auto Position", "AutoPositionAction", "Stand") sleep(300) sayezb(" stop that please ")
https://www.youtube.com/watch?v=SZP_WiOho1Q
I remember when I tried to do a proximity sensor setup with my Six Hexapod, it would always get stuck at a wall.
Nomad 6R I will check it out. Thanks man.
Stop it please, love it
Scripting seems the way to go on this for sure.
hi winterU
did you use the same sensor as in this topic ? if yes were did you placed the sensor ? ontop the six dome ?if yes you have to calculate that in your settings . cause you need to ad the distants from the dome to the front of the legs , before the sensor need to detect something .
hi jedi
if you want it in a loop . see picture .
use your own ports in the script .
some more actions to test .
https://www.youtube.com/shorts/z-PWWYJ-sp4
Yes loop
I was diving into that a little this morning
jedi
always make a small sleep(300) between motions to be sure they work . sleep(300) give time for the next motion to come when the previous is done . the longer a motion last the higher the sleep needs to be . sleep(1000) is one second. but you problably know this allreddy .
Yes good on sleep.
Shocked there is not a basic skill for Sonar. Such a great tool in the shed.
Unless it exist and I have not found it.
a few are there in the script help . and the pauze on/off . you have to look under "ping "
Here, use this: synthiam.com/Support/Skills/Ultrasonic/Ultrasonic-Collision-Script?id=22039
DJ -
Did you just make that skill? If so thank you Sir.
Issue resolved by new ARC skill.
Ultrasonic Collision Script
Thank you all, DJ and Nomad 6R