Charel
Hi ARC community,
I am enjoying ARC/EZ-B to power my lifesize R2D2, getting closer and closer to completion. At conventions, there is a queue for taking photos.
I do have a problem with connectivity. My internal configuration is one NUC running ARC on windows and three EZ-B's connected over the wifi (1 nuc wifi and 2 wifi dongles, AP mode). The wifi connection drops approx every 1.5 hours during Comicon conventions, having me reboot R2D2 at least six times every day. I tried several options like stronger USB wifi dongles, bringing wifi antennas closer to the EZ-B, rerouting the servo power to avoid browning out, etc, etc. Still, the weak point is the EZ-B wifi connection. I guess many connectivity/wifi signals in a convention are a problem, and the EZ-B is very sensitive. So I am asking you for feedback to consider my options on what should be my next step.
- First I will try to connect the EZ-B via USB/serial connection (https://synthiam.com/Community/Tutorials/76). The EZ-B in the dome is connected via a slip-ring, so hopefully, a USB/serial connection over a slipping will work. I remember I tried it in the past and had issues, but in hindsight, it probably had to do with I2C issues which also hang the EZ-B. I will try again.
- If that does not work I will swap out the EZ-B hardware for an alternative while keeping the ARC software (and the time invested in it). I was looking at the several supported platforms and was wondering what would be my best option. I think I will go for the Arduino mega (https://synthiam.com/Support/Hardware/Arduino-Due-Mega). Any suggestions and what should be my choice? I need a stable platform that can run for a day without issues.
Hey there. That’s really awesome to see your photos, thanks for sharing. I’ll have to be quick because I’m up early for a meeting over seas and only have a few minutes to contribute.
The ezb is still your best choice for hardware over alternatives. That’s because of the convenience of connecting servos and such vs arduino needing shields. So you’re on the right track there.
The only reason to choose an Arduino, in my opinion, is if you’re going to modify the ezb firmware for custom low level things. In your case, sounds like that’s not a thing.
I agree wifi is terrible for conventions and concentrated areas. Heck, I have trouble with wifi in large cities! So your solution will be to replace the wifi with usb. That’ll work amazing - and for a robot with an embedded pc, a no brainer.
here is the link to converting the ezb to usb. Keep in mind that it’s titled incorrectly because iotiny does not support this feature: https://www.ez-robot.com/learn-robotics-serial-usb-connectivity-ezb-smart-robot-controller.html
i am confident that you won’t have any issues with usb
This is a post I remember that discusses WiFi at conventions.
Click Here. See post number #11. Hope this can help you.
Many thanks for the quick reaction.
I will first try EZ-B via USB/serial connection and see if that works for me, my fingers are crossed.
I have rewired R2D2 to get the EZ-B's connected to the NUC (through the slipping, etc). Also updated my software. So, now the 3 EZ-B's have a wired connection. It is stable while running in my living room, and I am curious how it will hold in a convention setting. A positive by-product is that I got rid of the pesky windows configurations with multiple WIFI dongles. It always needed manual checking that the right wifi dongle was connected to the right EZ-B and not e.g. 2 dongles trying to connect to the same EZ-B. With multiple Serial/TTL Adapters, Windows seems consistent/persistent on the COM port allocation when restarting usb-hub/pc/EZ-B/etc. In other words, I can start R2D2, and it all connects automatically and correctly without manual intervention. I have two open points I still need to figure out:
Is there some try-except construction I could use? Or some other obvious thing I miss?
Thank for all the help!
Welcome back! It sounds like you are doing great with your R2. It's such a professional build.
I'll address your second question as best as I can:
I've had problems with the EZB locking up when I've sent bad commands through the Uart ports. I've read about other people having trouble like you with the EZB locking up when they have bad connections to the I2C or when sending bad commands through it. It's not uncommon. It would be nice to be able to simply send a command to reboot. However, the problem is, if the EZB is locked up, there is nothing to send a command to. The EZB wont hear the command. The only way to get the EZB back to a working state it to power cycle it. Power off, Power on and then reconnect.The only thing I can think of (and this is kind of sketchy) would be:
*Have an IoTiny in your build that starts with the robot, connects and stays connected to ARC the whole time. *Have this Iotiny dedicated and connected to a Arduino compatible relay that has the other EZB's power running through it (or one relay for each EZB). *You could have your INT script or any other looping script then looking to see if any of the EZB's failed to connect or lost a connection. There is a EZ Script command that will check a WIFI connection. I'm not sure it will watch a com port connection though. There may be other commands that would do that. *If a failed connection or lost connection is detected you can have that script send a command to the connected IoTiny attached to the relay to power cycle the disabled EZB. You would need to have that script wait till the ezb powers up and send a new connection command to the offending EZB. *You could even manually send a reboot command to operate the reboot relay connected to the EZB's from ARC.
Just some thoughts. Maybe a bit much though but all I can think of.
Great idea with the relays, I have had the annoying disconnect from WI FI for at least 5 years now, then any robot I have goes mindlessly ramming into walls,LoL!
Finally, I was able to repair the Arduino code so that EZ-B does not hang. See this post: https://synthiam.com/Community/Questions/Can-I-read-the-signal-from-an-RC-receiver-19798 with the Arduino code that works for a wifi connected EZ-B and Arduino code that works for a serial/USB connected EZ-B. Lots of trail-and-error.
Indeed "It would be nice to be able to simply send a command to reboot. However, the problem is, if the EZB is locked up, there is nothing to send a command to". I like your relay suggestion. A relay that cut/reboot the power for an EZ-B is then probably the best choice. I have a NUC/PC onboad with the ARC SW running, it detects if an EZ-B is not connected and could operate (via eg IoTiny, or some other board) the relay.