I am having problems with my ezb rebooting occasionally. I suspected a brownout, so I replaced my lipo with an industrial 60A power supply running at 7v. It still happens.
I did some troubleshooting and there are a few ways I can trigger a reboot rather quickly, by overwhelming the ezb with instructions. For instance:Code:
repeatwhile( true )
servorandom(D1,40,120)
sleep(1)
endrepeatwhile
Will trigger a reboot usually within a few seconds, it may take 10. Even when no servo is connected to D1 (or any other port). Increasing the sleep time will make it take longer, but it will still reboot eventually.
(Note that this must not be run from the script editor, as the debug output of the script editor slows the execution down by some orders of magnitude. Run the script outside the editor)
The same is true for just changing servo speed:Code:
repeatwhile( true )
servospeedrandom(D0,0,5)
sleep(1)
endrepeatwhile
Nothing else is running, no camera, you dont even need any servos attached.
For the record Im using a ezbv4/1. I would appreciate if someone could test this with a /2 to see if that makes a difference.
(edit: this has nothing to do with mobile builder, sorry, misclicked)
Asked
— Edited
No servo can physically move that quickly - what are you attempting to do with random servo movements every millisecond?
The same is true even when you use a constant slow servospeed. Rather than slowing the servo motor, you are making the servo move/stop/move/stop and each step the servo motor does its own speeding up and slowing down. If you look at the goal you are trying to achieve, say slowly and smoothly move the servo arm to some position, and what the servo motor is actually doing, its a terrible way to achieve that goal.
since you are producing your own servos and controller, I wonder if there is no opportunity here to give the ezb control over the servo PID loop. I dont know if its fast enough to actually take over the PID loop, but it might just reconfigure the PID values. I dont think I have ever seen something like it, but you could get super smooth movements this way by actually slowing down the servo motor rather than make it jerk in steps.