Set your homing speed negative if you want it to drive backwards. Use config.is_active_high to change the default state of your endstops. I will fix the enums.py issue, sorry about that
Hi
@Riewert
My config current was not high enough, thanks
@Wetmelon
Negative homing speed doesn’t work, how is this possible?
Cheers
Carelsbergh Stijn
Hi
When I set ‘is active high = true’ it already thinks it is homed, is this a bug?
Here you can see it, the first eindstop state is not pressed and the second one is pressed:
Cheers
Carelsbergh Stijn
is_active_high means there is voltage on the pin when the switch is pressed. Yours is reversed, so you need to set is_active_high = False
Hi
Yes I get that, but if I do that, it immediately thinks it is homed, so I think the code isn’t changed to look for false when it is configured in my way.
Otherwise I don’t know what I’m doing wrong
Cheers
Carelsbergh Stijn
Hi
Startup homing is not working, it goes straight to closed loop control, afterwords it’s possible to do it manually.
Cheers
Carelsbergh Stijn
Can you double check that odrv0.axis0.config.startup_homing = 1
? Also, the second picture looks like it is configured properly.
Hi
It is enabled, also it goes to closed loop control, but normally it should first home. In the code, the homing proces is configured like this: home -> offset -> closed loop control. So I don’t get why it’s not homing.
Cheers
Carelsbergh Stijn
Hello
I still have 2 problems:
-
Normal closed end switches not working, it emidiatly thinks it is homed but it’s not.
-
When stratup homing is set True, it doesn’t home but it does go straight to closed loop, in the code homing means: go home, do the offset, go into closed loop control but is looks like it skips the first 2 Steps
Cheers
Carelsbergh Stijn
Hi Stijn,
I am so sorry to see you struggling…
Please could you give us some more information about your mechanical construction?
- How is the position of the endswitches in relation to the hard stops (drawing, picture? ) Whats the travel distance from hard-stop to the endswitches?
- From which position of your actuator do you start homing? In case the load of your simulator is on the actuators it will be the lower hard-stop? What kind of switches do you use? Reed switches?
-Did you try homing also with normal open switches?
kind regards
Wickie
Hi
On startup, the motor and encoder colibration are done, after that it should normally do the homing but it doesn’t, it goes straight to closed loop control. After that I can do ‘manual’ homing with the odrivetool, however, when using normal closed switches, it thinks it is already homed, with normal open switches it does work. I’ve also tried homing with normal closed switches configured and pressed them from the beginning, and then the motor started rotating until I didn’t press the switch anymore.
The normal open or normal closed switches are not so important, I will just use them in normal open state but Is really want to solve the automatic startup
Cheers
Carelsbergh Stijn
Again, you need to set is_active_high
differently. There are four setups:
Most 3D printer endstops, like these for the RAMPS boards are configuration 4
As for the startup sequence, homing only makes sense if startup_closed_loop_control = True
. If you’re not saving parameters between runs, then the following must be true:
<odrv>.<axis>.min_endstop.config.gpio_num = correct GPIO number
<odrv>.<axis>.min_endstop.config.is_active_high = select correct value from table above
<odrv>.<axis>.min_endstop.config.enabled = True
<odrv>.<axis>.config.startup_motor_calibration = True
<odrv>.<axis>.config.startup_encoder_offset_calibration = True
<odrv>.<axis>.config.startup_closed_loop_control = True
<odrv>.<axis>.config.startup_homing = True
<odrv>.save_configuration()
<odrv>.reboot()
If you are using an index pulse or absolute encoder, you still need to enter closed_loop_control at startup, or the homing sequence will not fire!
Hi
Thanks for the reply with the scheme.
I will just use NO switches because I’ve tried everything with configs and it doesn’t work it keeps thinking it is already homed, maybe something wrong with my switches.
I will set closed loop control on startup and test it. If it doesn’t work, I will let you know.
Thanks for all the help guys
Cheers
Carelsbergh Stijn
Homing works reliably on my system of three ODrives with 6 motors. One of the Odrives is 3.6-56V and two are 3.5-48V. The motors are surpass hobby 4270 2000kv with built in hall-sensors. The endstops are Hall Magnetic Sensor, connected to axis0=GPIO2 and axis1=GPIO5.
odrv1.axis0.min_endstop.config:
gpio_num = 5 (int)
enabled = True (bool)
offset = -30 (int)
is_active_high = False (bool)
debounce_ms = 100.0 (float)
Hi
Weird problem needs to be solved within 5 days!
I have one 3.6 and one 3.5 controller running succesfully running with homing and everything with each 2 actuators. But my other ODrive 3.6 always thinks the ene switches are pressed and I’ve tested them on my other ODrives and they work. I’ve already reflashed the controller but this doesn’t seem to fix it. And if I measure voltage on the GPIO’s, it doesn’t seem to have the pullup resistors working.
Any thoughts?
Any suggestions?
Any solutions?
Thanks in advance!
Cheers
Carelsbergh Stijn
Hi
try an external pullup. 10k.
Hello guys,
Ik think the ODrive is broken , I did nothing and now it doesn’t show up in the odrivetool anymore. However, I inspected the board and I saw some corrosion that I cleaned of and after that, it didn’t work anymore. The corrosion was at testpoint J10, it looks like the black part between the two points is gone now. What can I do? Should the two points be connected @madcowswe ?
Thanks in advance!
My project needs to be finished by the 7th next week, I can’t order one anymore because the EU stock is sold out
Help me please!
Cheers
Hi all !
I have a new question regarding homing:
When I start Odrive with the actuator in the lower hardware stop (fully retracted) homing is running quite good. This means the rod extends a little until the lower (min) endstop is reached and then the rod drives faster to the middle position between the min and max endstop. So far so good.
But when I start Odrive/ the actuator from a position between the min and max endstop, the homing run doesnt stop at the max endstop.
Does anybody have an idea why it doesnt stop! This crashed my ballnut screw a few days ago!
(Note: Apart from homing the max endstop is working good)
Thanks in advance!
kind regards
Wic
It should never home to the max endstop. This is not a supported use case.
I’d like to try use your branch with the endstops, but I’m confused. These are the only instructions I can find. How do I “compile from scratch”? I was looking for a .elf or .hex file to upload with the STLink, but I can’t find it…
should I be following the instructions here:
thanks