Comments (33)
Thanks!
I will look into that after I obtains needed parts a test it a bit...
from arduino.
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...
from arduino.
No since 1 cm is in my opinion enought I was planing to use it instead of rotary encoder.
from arduino.
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.
from arduino.
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/
from 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:
https://nortal.com/blog/cloud-controlled-work-desks-using-arduinos-node-js-polymer/
I am almost sure that this can solve the loosed steps solution with replacing the rotary encoder. What do you think?
from arduino.
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.
With echoing it would always be at around 1-2cm distance and will not decalibrate.
from arduino.
Ok so you mean to use it only for hard limits of table?
from arduino.
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.
from arduino.
Hi. Did you managed to get the ultrasonic sensors?
from arduino.
Hi, prepared POC, however didn't have time to test it maybe this weekend after I fix the coupler && shaft on my setup...
from arduino.
Nice.will test.metal shaft coupler works great.
from arduino.
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?
Another question are you ditching led screen on v2 because in v2 stl cover there is no more led?
from arduino.
- Yes it should be ready for testing, watchdog may needs tuning as it may false-posive triggers when you move legs under the table... that depends on sensor position...
- Yes, it's stated in
platformio.ini
dependencies - Not sue what do you mean its regarding #76 ?
from arduino.
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.
from arduino.
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.
For now I have tested it not mounted on the table yet but atm it looks like there are some security things that needs to be adressed.
If you select memory button the motor spins even, if the distance sensor does not report any measurement. Erro. should be triggered asap if no measure input comes from sensor and the motor spins.
Also as I have noted there is no need to constant doing the measurement since you can easy trig err. with legs.
Also it would be nice to have the watchdog tresholds in the platformio.ini.
I hope today I will mount it on the table and see how it works mounted on the table.
from arduino.
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.
It looks like it is not updating the measurement quick enough and then throws error.
But overall I think it will be better than rotary. It is important where to mount the echo sensor so it does not get disturbed from other things. I have temp. mounted it between legs and works good.
from arduino.
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.
from arduino.
Will look into it more this weekend... however:
- The logic of display wasn't altered, the reason why it doesn't dim is due to sensor, as its values changes even when the table isn't moving... and the display dims only when no change was made for period of time...
- Minimum stable sample rate of sensor is around 125ms, with anything lower the measurement deviation increases quite a lot and measurements aren't usable at all...
- Disabling the watchdog after table stops moving isn't good idea, as the sole purpose of watchdog is to detect unintended movement and deadlocks... Timeouts should be tweaked, and will add option to disable it via flag, however it should be enabled by default
Added most of the issues that can be addressed in the PR...
from arduino.
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 that library mentioned above would improve that or. not?
from arduino.
Do you think it would make sense to somehow combine ultrasonic sensor with rotary encoder to always auto calibrate min and max hight?
from arduino.
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
from arduino.
- library above did it with
delays(500)
so that wont solve it, as some period of time is needed for stabilization...
2.it could be used as end stops that have hardcoded values... however that will drop the option of custom end stop and may not work correctly if table cannot move properly... - updated the timeout to be more responsive and now invalid reading are skipped so display will dimm correctly and watchdog wont trigger randomly...
from arduino.
I have test it and those err. 1 are PITA., I can not set it to work without triggering error.
What can i do to make it more tolerant? Those settings are a little confused.
#ifdef USENSOR
#define WATCHDOG_TIMEOUT 550
#else
#define WATCHDOG_TIMEOUT 100
#endif
#define WATCHDOG_DEADLOCK_CHANGE 100
#define WATCHDOG_OTHER_CHANGE 100
#ifdef H_BRIDGE_MOTOR
#define WATCHDOG_TOLERANCE 20
#else
#define WATCHDOG_TOLERANCE 3
#endif
And is it normal that display sometimes blanks during the counting.
from arduino.
- try to increase
WATCHDOG_DEADLOCK_CHANGE
, however it seems strange that you have issues withErr-1
as I'm mostly experiencingErr-2
when accidentally trigered by legs... - It should blink only during calibration, when the issue occurs?
from arduino.
I have set the settings as other user reporting to:
#define WATCHDOG_TIMEOUT 2000
#define WATCHDOG_DEADLOCK_CHANGE 20
#define WATCHDOG_OTHER_CHANGE 100
#define WATCHDOG_TOLERANCE 20
And it seems that it now works. I have mounted the sensor so that I can not trigger it.
Maybe also it would be nice to migrate the option into platformio.ini the settings for the offset of the position that will be ignored. For example if i set the hight position to 1000 and the sensors stops at 980 if I press the button again it will go to 1000 even if there is no need and could be ignored. So if there is an option to set like 20 the offset ignored position it would do nothing if I press the button again. But if there would be more like 20 at 970 it will trigger and go to 1000.
from arduino.
yeah that would be nice to extract out of Motor.h
👍 , also I've updated min step when motor is running so that more changes are propagated to WD
to reduce err-1
could you check it out? Thx
from arduino.
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
#define WATCHDOG_TIMEOUT 2000
#define WATCHDOG_DEADLOCK_CHANGE 20
#define WATCHDOG_OTHER_CHANGE 100
#define WATCHDOG_TOLERANCE 20
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.
from arduino.
Could you provide logs when these issues occurs if possible? Thx
from arduino.
Can you please tell me where can i get logs?
from arduino.
you need to compile && upload firmware with -D__DEBUG__
and then via serial 9600
you can collect debug logs, however when you connect arduino to PC disconect it from PSU when testing ...
from arduino.
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
from arduino.
@iLLiac4 have you solved the Err 1 issue?
Yesterday I replaced the pulley with HC-SR04, and I'm getting a lot of Err 1.
I flashed latest ubridge with default settings.
I noticed that readings from HC-SR04 are not continues. I.e 0610 -> 0640 -> 0660 ... so this might be a reason
from arduino.
Related Issues (20)
- Are sensors required? rot vs hall vs sonar benefits? HOT 3
- What case(s) are required HOT 2
- Calibration fails, Arduino is rebooting? HOT 4
- Model sizes to small? HOT 4
- Home Automation integration HOT 1
- Problem installing "lib deps" HOT 1
- Error 3 HOT 1
- Easy way to build for ATmega168? HOT 1
- Female 8 pin socket as gnd/5v slot HOT 3
- Panel Cover V2 - Not semi transparent HOT 2
- CAD Files? HOT 1
- Wrong coupler size and link HOT 5
- Table not moving (H-Bridge version) HOT 7
- Rotary sensor STL missing HOT 4
- Update wiring diagrams for v2 cases, plus other improvements HOT 5
- M3-6mm seems to short for motor-sleeve in case_motor-v2 HOT 2
- Motor start when initiate? HOT 1
- Motor Tech Specs HOT 3
- [REQUEST] Working Firmware.hex for nanoatmega328-bridge or nanoatmega328-ubridge HOT 1
- Motor Hall Magnetic Encoder got Error 3 (wiring) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino.