Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Ezb Rebooting With Tight Timed Loops

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:


repeatwhile( true )

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:


repeatwhile( true )

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)


Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

The EZ-B v4 has a small input buffer and will reboot if overflowed. The EZ-B v4.x/2 will never reboot because it's a faster cpu with a larger buffer. As stated before, there are significant differences between the versions.

No servo can physically move that quickly - what are you attempting to do with random servo movements every millisecond?
The above code is intended deliberately to trigger the problem, I have no need to update servo positions or speeds every single ms, but as you know, Im trying to "step" my servo's to get fairly smooth, variable speed motion with a PID loop, so I do need to update often (and with many servos). Looks like Ill need to upgrade my board and meanwhile "throttle" my output.
BTW, the approach Im taking is silly on the face of it. Im treating this as a stepper, but a servo is not a stepper, it has its own internal PID loop and it already varies motor speed to achieve a given position. Im putting a PID loop on top of that and giving it a ton of positions trying to mimic variable speed, but on each step the servo will have to speed up and slow down and come to a stop. Im under no illusions of what I can achieve with this, its clunky and will always be relatively jerky.

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.