Coder Social home page Coder Social logo

Comments (33)

aenniw avatar aenniw commented on August 28, 2024 1

Thanks!

I will look into that after I obtains needed parts a test it a bit...

from arduino.

aenniw avatar aenniw commented on August 28, 2024 1

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024 1

No since 1 cm is in my opinion enought I was planing to use it instead of rotary encoder.

from arduino.

iLLiac4 avatar iLLiac4 commented on August 28, 2024 1

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

aenniw avatar aenniw commented on August 28, 2024

Ok so you mean to use it only for hard limits of table?

from arduino.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

Hi. Did you managed to get the ultrasonic sensors?

from arduino.

aenniw avatar aenniw commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

Nice.will test.metal shaft coupler works great.

from arduino.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

aenniw avatar aenniw commented on August 28, 2024
  1. 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...
  2. Yes, it's stated in platformio.ini dependencies
  3. Not sue what do you mean its regarding #76 ?

from arduino.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

aenniw avatar aenniw commented on August 28, 2024

Will look into it more this weekend... however:

  1. 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...
  2. 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...
  3. 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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

aenniw avatar aenniw commented on August 28, 2024
  1. 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...
  2. 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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

aenniw avatar aenniw commented on August 28, 2024
  1. try to increase WATCHDOG_DEADLOCK_CHANGE, however it seems strange that you have issues with Err-1 as I'm mostly experiencing Err-2 when accidentally trigered by legs...
  2. It should blink only during calibration, when the issue occurs?

from arduino.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

aenniw avatar aenniw commented on August 28, 2024

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.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

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.

aenniw avatar aenniw commented on August 28, 2024

Could you provide logs when these issues occurs if possible? Thx

from arduino.

iLLiac4 avatar iLLiac4 commented on August 28, 2024

Can you please tell me where can i get logs?

from arduino.

aenniw avatar aenniw commented on August 28, 2024

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.

github-actions avatar github-actions commented on August 28, 2024

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.

ggajews avatar ggajews commented on August 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.