-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distance measuring via ultrasonic sensor #67
Comments
There is a library for this sensor with even possibilities to improve the measurment further with dht22 or. dht11. But I doubt that this will be needed :) https://dronebotworkshop.com/hc-sr04-ultrasonic-distance-sensor-arduino/ |
Just yesterday I have bought for a good price one stand desk and while searching for a hack to add controls to the desk I have found another use of ultrasonic sensor: I am almost sure that this can solve the loosed steps solution with replacing the rotary encoder. What do you think? |
Thanks! I will look into that after I obtains needed parts a test it a bit... |
Tried to adapt to ultrasonic distance measuing, however sensor precission was around +-1cm so the improvement istn;t that big at the moment. Also I suspect that precission will be different based on floor type (glossy wooden floor or capet)... Will look into it next weekend more... |
Yes I know that the precission is at around form 1 to 2 cm. But i think this is ok. The point is that it can not decalibrate since it always measures. With rotary it was decalibrating every time more and more until it was so much decalibratet that it would hit hard limit and burn motors or. fuse. |
Ok so you mean to use it only for hard limits of table? |
No since 1 cm is in my opinion enought I was planing to use it instead of rotary encoder. |
The calibration process could be the same as with rotary encoder. Maybee only it can display mm or. inches if choosen in code before compiling. Also the saftey feature that are already implemented should stay the same (if no change in distance and the motor is on it should stop). With rotary encoder I was loosing calibration in few ups and downs for more than 10cm. With ulrasonic I thing the recalibration will not be needed since it will always be at around the hight +/- 2cm. |
Hi. I have found another interesting project https://www.henrirantanen.fi/2016/04/18/smartdesk-sensor-upgrade/ it is for bekant version but it could be adoptable to this project and uses also ultrasonic sensor. |
Hi. Did you managed to get the ultrasonic sensors? |
Hi, prepared POC, however didn't have time to test it maybe this weekend after I fix the coupler && shaft on my setup... |
Nice.will test.metal shaft coupler works great. |
Hi. I saw that you have made the repo for ultrasonic sensor. Is it already functional and ready to test? Will it display the measured distance on the display? Are you going to use a library for ultrasonic sensor? |
|
Hi. Tnx for the answer. I will compile it and test the ultrasonic. Maybee just to avoid the misfiring of ultrasonic sensor maybee it would be possible to make it active only when the button is pressed and if there is no movement for 1 sec then they should stop be active. |
Hi. I have compiled and tested it on relay version. It does work. But there are some thing that can be improved and some bugs. |
Hi. I have tested it on the table. It works but there are still some problems with memory functions. It looks like that it sometimes misses the position and then throws err.1. It is more prone to errors owerall. |
There seems also to be a problem with led display not going into sleep mode. It looks like it does not go into sleep only when above 1000. |
Will look into it more this weekend... however:
Added most of the issues that can be addressed in the PR... |
The problem with updating the measurement is that it misses the stored position and it just overrides it. This happens when lowering the table since it is moving faster than when uplifting. |
Do you think it would make sense to somehow combine ultrasonic sensor with rotary encoder to always auto calibrate min and max hight? |
The ultrasonic sensor could be active only if motor relay is active. If not then there is no need to be active. An if there is no input from sensor and the motor is active then err. Is ok. Because even when setting treshold higher for example vacuum cleader will also triger err.2 |
|
I have test it and those err. 1 are PITA., I can not set it to work without triggering error. And is it normal that display sometimes blanks during the counting. |
|
I have set the settings as other user reporting to: And it seems that it now works. I have mounted the sensor so that I can not trigger it. |
yeah that would be nice to extract out of |
Hi. I have tested it and it works, but I have a feeling that there are now err1 more often then before even with those settings Also I do not know maybe just a feeling but there are now more occasions when motor during the drive just stops. Without error or any thing. When you press the button again it continues. This is just like the other user has reported. But I can tell you that this issue is not something that has been introduced lately but it exists from the beginning, if this info helps and is not rely or. hbridge specific. |
Could you provide logs when these issues occurs if possible? Thx |
Can you please tell me where can i get logs? |
you need to compile && upload firmware with |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
@iLLiac4 have you solved the Err 1 issue? |
Hi.
I was searching for some hacks on ikea desks and found an interesting article claiming that it is 1cm accurate.
This is the article:
https://www.henrirantanen.fi/2016/04/18/smartdesk-sensor-upgrade/?utm_source=youtube.com&utm_medium=referral&utm_campaign=video&utm_content=IKEA+Bekant+SmartDesk+with+Arduino
Using echoing sensor it could replace rotary encoder.
For example this one https://www.ebay.com/itm/1PCS-Ultrasonic-Sensor-Module-HC-SR04-Distance-Measuring-Sensor-for-arduino-SR04/193011377769?hash=item2cf05fe669:g:~d8AAOSwW4Bd6f5J
What do you think would this be an option. I think it is possible but you are the master coder :)
And it this works it will always work and will not loose steps anymore.
The text was updated successfully, but these errors were encountered: