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
Resolved Resolved by Athena AI!

Iotiny Wifi Is Dropping When The Camera Is Started.

Why is my IoTiny wifi dropping connection when the Camera is started?

User-inserted image

Related Hardware EZ-B IoTiny


Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

Sorry you are having all these problems. I agree with DJ make it as simple as possible mains power, EZB (or IoTiny) and camera but it sounds like you did that and it seems to work until under load.  

I am fortunate enough to have enough spare parts to be able to just swap out components until the problems go away.  I have a box of servos, cameras, EZB etc  labeled suspect  that I will eventually get around to looking at (or maybe not).

If you have an intermittent faulty device it can also be load or heat related.  Example Camera or EZB gets hot (dry solder joint or faulty component).  When I was a young field tech I used to keep a hair dryer and a can of spray freeze in my tool kit so I could heat up circuits and spray freeze components to try and find the faulty one.  

Fault finding sometimes doesn’t even resolve by swapping out components. Sometimes it is external. Example wifi issues can occur when someone turns microwave or other electronic device on.
#40   — Edited
Sherlock Holmes? I thought it was Spock from Star Trek.xD

Troubleshooting is a science. You can quote me on that. LOL.
I completely agree with you on root cause analysis as this is what I do for a living tracking down systems problems and process problems within three large data centers that control the flow of trillions of dollars a day. 

I have tried everything listed above to answer DJ question the camera stops working first then 60% of time the connection Wi-Fi drops after that.  

I have top quality network hardware with more than enough bandwidth the router this is connecting to is 5 feet away from it.  I am having this issue no matter what the power source is my UBEC’s or bench power supply I am having the issue connected to the IOTiny or any of the other two EZB4’s with nothing else connected to them.  I have tested the cable that came with it and re crimped each connector. I also made a new cable and tried that and had the same results.  Sometimes it seems to work ok for a bit and then stops. 

The only thing that I have not changed out is the camera itself.
@Redzone, thanks for this post this is the only thing I have not tried I will give that a try and see if it makes any difference.
okay, the camera and wifi are not related. The wifi and camera have no relationship with each other. What I mean is, if the camera stops working or is disconnected, the wifi will not disconnect. The wifi will maintain a connection for ever, even if the camera is disconnected. 

But I need clarity on this statement you made. I want to see if you accidentally meant something different.


I am having this issue no matter what the power source is my UBEC’s or bench power supply I am having the issue connected to the IOTiny or any of the other two EZB4’s with nothing else connected to them.  

It sounds like everything that you are using (IOTiny and EZB) are behaving the same way. Is that what you meant?
DJ yes that is what I mean the camera freezes and stops and you can’t restart it unless you turn off everything and start them up again.  No matter what board you use with nothing else connected to it.  This also holds true when they are connected to the bench power supply or the bench power supply is connected to the UBEC’s connected to the boards.  I miss spoke on the Wi-Fi disconnect percentage as I was also dealing with the MPU6050 causing the ezb4’s to disconnect from the Wi-Fi during this same timeframe. I had said 60% it is more like 30% for just the camera testing.   I know you said they are not related but it does not change the fact that it happened while testing.
DJ, also just to be clear this happens both in client mode or AP mode.
#46   — Edited
Well, it sounds to me like the only common denominator in all this is the camera. Seems like you have tested everything and in every way. If it were me I'd get a different camera and cable and see if that solves the issue.
#47   — Edited
@Dave,  I have ordered the new camera and cable already just waiting for it to get here.  I also ordered some Super Caps to try that solution also they should be here tomorrow I think. This sounds like it maybe just a good thing to do anyway even if it is not the solution for this issue.  So more to come...
Well another update I tried the super cap solution today and have the same problem so that did not address the problem so now I wait for the new camera and cable to get here.   More to come soon...
#49   — Edited
OK I got the new EZ-Robot camera today in the mail and have been running it for hours without it disconnecting on me connected to the EZB4 but when connected to the iOTiny I am still getting the disconnects, so at this point I think the problem is still not fixed with the iOTiny but has been working good so far on the EZB4 and the old camera would not work on the EZB4 So I know the old camera had issues. The only other thing I can think of is the iOTiny board has some kind of issue.  I will update this if anything changes in the next few days.
#50   — Edited
DJ,  As I stated above with the new camera I still get disconnects with the iotiny without the wifi dropping now and it happens regularly.  With the camera connected to the EZB4 it has worked for hours without disconnecting and the wifi connection is not effected.   I get this could be just a blip in the wifi coms to ARC from the camera.  

My question is can't this connection issue be self corrected in the ARC application without having to shut the ezb4 down and restarting it to get the camera back online?  I just think this code can be made to have more resiliency.

Also note there is nothing else connected to this EZB4 currently and I have also tested this in AP and client mode with the same outcomes.
@smiller29 May I ask if the camera cable is bent or in an area where the wires are heavily manipulated by servos? I have seen a camera disconnect due to the wires losing connection due to heavy manipulation before. I haven't ever experienced an IoTiny disconnecting due to a camera before, the only times I have heard of an IoTiny or EZ-B disconnecting is due to I2C lockup or loss of signal. Are you hearing the disconnect chime?

May I ask what you are using as a power supply?
The Wi-Fi dropping has stopped with the new camera but it still disconnects in ARC requiring the Hardware to be turned off and restarted to get it back online.  

User-inserted image

if it is connected to the IOTiny it is closer to more wires and also disconnects faster than when it is connected to the ezb4

User-inserted image

I have to tell you this is crazy that this stuff is so touchy.   Same thing with the MPU6050 it will also lock the ezb4 up sometimes forcing a restart.  When you have a few thousand dollars in your robot the last thing you want it to do is lockup and need to be restarted all the time.  I really want to love this hardware platform but I have to tell you it has proven to be a challenge.  I am not sure if it a hardware design issue or a software issue.  

If you think about this is just like a webcam and it should not be so touchy.   

My first camera which I never used before this project was ordered over a year ago along with the IOTiny I had at the start of this post would also cause the Wi-Fi to disconnect when it failed like 30-40% of the time with the new camera that no longer happens to the Wi-Fi it just stops for no reason.   

before this post I had everything powered and it was working for just over an hour and then stopped working in ARC
#53   — Edited
Here's the thing, it isn't so touchy. That's why a few of us here are puzzled. We are trying to figure out what you have that is different.

Here are a few hardware areas that I see that are different:

1. You are using a CCTV 2.1mm barrel plug power connector. Internally these plugs have 22 gauge wire that connects the terminal blocks to the barrel, in high-current-demand situations these small wires to heat up, increase in resistance, and cause brownouts. I would recommend a different barrel plug for higher currents or open it up and solder thicker gauge wires from the terminals to the barrel.

2. You are using 3rd party servos, as I can see by the red-orange-brown wires. We have no idea what kind of noise-related issues servos from other manufacturers can cause. We have tried our best to make the highest quality product possible but if the servos are very low quality it is very difficult to mitigate such a thing. When you are developing a completely DIY solution with parts and pieces from many different suppliers they may not jive together perfectly. You are likely running into the same sort of challenges that we had in developing our product from the ground up. Not everything works together perfectly the first time, you need the right tools and knowledge to diagnose the challenges you are facing. 

3. I still am unaware of what you are using as a power supply. Are you using a LiPo battery or wall power? Wall power is difficult to use with servos, as the inrush current can cause brownouts (which can lead to disconnects). The supply usually needs to be rated for a current rating 3-5 times the demand you think you'll need. For example for a display JD that we sent to Brookstone stores for a demo, it had 10 servos, we only expected to have peak current use of ~5 Amps and in the end, a 5V 20Amp wall power supply met our needs.

I have more to discuss and clarify, but I'll leave it at this for now.
Ok let me try and explain what I have.  The connector on the IOTiny came with the stuff I ordered from EZ-Robot.  The two EZB4 are hardwired to two 16amp UBEC’s one set to 6v which is connected to the EZB4 with the camera connected to it.  The other UBEC is set to 8.4v and that one has the MPU6050 connected to it.  The IOTiny is being supplied by 6v and up to 16amps if needed.  The EZB4 with the camera also has a set of super capacitors connected to the ADC +/- per another post I seen here on the site that if I remember right you posted.  

As you can see by the below picture it is connected to a bench power supply set to deliver up to 10amps if needed and currently with the only three servos connected to the IOTiny in a holding position everything is only drawing .339amps. 

The black board next to the EZB4’s on the right is just a servo power breakout board to power some other servos at 11.2v and the buck converter next to that is getting 8.4v on it’s input and providing 5.2 on it’s output but is not have anything attached to it. 

User-inserted image

User-inserted image

User-inserted image

User-inserted image

It should also be noted the audio is connected only to the IOTiny there no audio connected to the EZB4’s

The other thing to note is that in this office I have a lot of computer equipment that all uses Wi-Fi and Bluetooth.  This does seem to be an issue for any other equipment, and yes I have checked the noise level and the channel usage with a scanner should not be an issue.  I am also a HAM operator and all my radio equipment is off.   My main network router is 6 feet away from the EZB4’s and IOTiny.  I also have high speed fiber internet service.
#55   — Edited
Awesome!! Thank you for sharing those pictures, it's given me a bit more context!

I have a bit of knowledge to share with you about current draw and inrush current. Average current draw is fairly easy to mitigate as it is predictable and steady, you can be fairly confident when you spec out a power supply that you can trust that it can deliver the current you need. This goes out the window with DC gear motors that have a huge starting-up (inrush) current to get them to move their gears. The current demand spikes up to a large level that will take the voltage supply down to the point of a brownout or just low enough to cause issues. Inrush current happens so fast that it's very difficult to measure, a clamp meter is sometimes used for larger motors, but for smaller motors it gets a bit trickier. An oscilloscope can be used to measure it but there are some challenges involved. It seems that I was a bit off with my numbers above, I just found a webpage that says the following "Inrush current can be 4 to 10 times greater than the normal running current". Don't just take my word for it, do some searching and check it out for yourself.

Using a bench-top power supply can cause issues, I know this because I have first-hand experience with it. I have a Chinese 30V/10A power supply on my bench that does not do well with inrush current or with noise. It can't handle too many servos and adds additional noise to the audio circuit which means the power coming out of it is not clean. It works in a pinch but it is problematic at times.

I would recommend testing your setup with a Lead-acid or LiPo battery to see if some of your issues get resolved. If you can eliminate a few other variables it will get you that much closer to a solution. Voltage regulators, UBEC, and Switching power supplies also have issues with inrush current, you may have to question them as well. I also don't have much experience with UBECs so I don't know what to expect from them.

For noisy servos, tank capacitors across the power rails can also help. You could add 100-1000uF electrolytic caps across the power rails directly at the servos to see if that cleans up the power issues as well. As I'm sure that you're aware since you're a HAM operator: Don't reverse the polarity of your caps when connecting to power or they may explode.

I'm not as worried about the WiFi interference as it does take quite a bit of interference to disconnect an EZ-B. Like a trade show's worth:D

In my experience, most weird electronics issues are 90% power related.
#56   — Edited
Jeremie,  Thanks I have not ordered my battery packs yet but I will decide what I am going to use I need at least 11.2 - 12v but at the same time weight is kind of an issue I would rather have a lead acid because they are easy to maintain but they are heavy.  I thought about running a few 11.2v Lipo's in parallel also.  What solution do you prefer?  There are going to be 40 servos in the robot build, and 15 are going to be 105KG to 150KG power hungry servos.
I would use LiPo's for sure as they are the best right now in terms of the weight-to-power density ratio. Testing with Lead acid batteries is ok but for a final version, you'll want LiPo's.
Ok thanks for your input.  BTW Zac is going to call me Monday.  also FYI I have had everything on now for over three hours and No camera or MPU drop outs going to leave it on for another three hours and see if we will be ok...   The head tracking is on so as I am working here at the desk the servos are moving the head around so things are working well right now LOL.