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

Usb To Serial Connection Camera Option

With the option to use the EZB in serial to USB you lose the option for the camera since the connections use the camera port. Is it possible to add another EZB like the IO Tiny to connect the camera too, then hard wire both EZBs together? I can't use Wi-Fi on either EZB.

There is a very specific reason I want to use the EZB camera and not a usb webcam, but i still need the EZB wired to the computer.


Edit: Please visit post #37 for the update on the usb/serial cable I used, new wiring diagram and notes


ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
PRO
Synthiam
#1  
Connecting the ez-b via serial uses the camera connection. By doing so, you lose the ability to have a camera on the ez-b. This is okay because most scenarios use a usb camera wired to the PC - since the PC is obviously inside the robot due to the serial connection. Find out more here: http://www.ez-robot.com/Tutorials/Lesson/76?courseId=4

Now - you "could" connect a camera to a USB <-> UART adapter dongle that supports 3,333,333 bps and RTS/CTS. Those are easy to find
PRO
USA
#2  

Quote:

Now - you "could" connect a camera to a USB <-> UART adapter dongle that supports 3,333,333 bps and RTS/CTS. Those are easy to find


Any recommendations on a dongle?

And how then do you connect the EZ camera to this set up?
#3  
There do not seem to be many (not as many) that can support 3M baud! *eek*

I don't know that was a thing. DJ, does the adaptor need to support 3M baud or does it actually need to be higher, since you said 3,333,333 bps?

I did find this one which seems to fit, what do you think DJ?
https://www.amazon.com/GearMo-FTDI-UART-Adapter-Cable/dp/B004HX3XMI

The end would have to be cut to break out the wires.
#5  
Well DJ, you are raising the stakes! As Worf's son Alexander once said, "The Higher....The Fewer!" (STNG Episode: The Perfect Mate)

USB-UART is not as simple as I used to think it was. Reading through some information, it looks like some of the common FTDI chips are "capable" of up to 12M baud, but that does not mean the device they are in is capable of that.

https://www.alliedelec.com/ftdi-ttl-232r-3v3/70069395/?mkwid=syCqgdu9J&pcrid=224909203636&gclid=CjwKCAjwj8bPBRBiEiwASlFLFQADnzZKLqGy0RxMu5BtNARW4lwuEbuyZZ1CHuOSocv8wG5jz6pXghoC_4UQAvD_BwE

This one says "Maximum Baud Rates for RS232 Versions Is 1M Baud and for the RS422/485 Version is 3M Baud (Single Channel) and 10M Baud (Multi-Channel) "

My guess is the camera is not Multi Channel? My guess is also the camera device is preset to baud rate (no jumpers) so if the UART device can't specifically select that baud rate then the camera will not work, am I right?

DJ, could you help us find a dongle for the camera? I'm interested in one as well but I'm getting out of my depth of knowledge.
PRO
USA
#6  
Ok i’m Going to make myself more clear as to what I’m attempting.....by making a picture. In this example I have two EZBs instead of confusing things with the io tiny which has no uart.

1) 2 EZBs _0 and _1
2) EZB 0 is connected to computer via serial usb using camera port
3) EZB 0 is connected to Dynamixel chain via D5
4) EZB 1 is connected to ez camera via camera port
5) There is no wi fi only tethered via serial usb

Question: can I connect (wired) the two EZBs together and control via one ARC? To be clear really EZB 1 is transmitting Camera to EZB 0 and to the computer via usb/serial.


User-inserted image
PRO
Synthiam
#7  
No - that is not a thing. I answered question and the conversation has been on the same topic. You need a uart to USB adapter that can work at more than 3,333,333 baud. There are plenty which can.

Simply purchase a uart to USB adapter that can operate at a rate higher than 3,333,333 baud.
PRO
USA
#9  
Ok great thanks for clearing that up. I'm glad my first post was clear. And ok about not a thing connecting two EZB via serial, I understand that's not possible now. I will look further into uart adapter.
PRO
USA
#10  
My original post failed to mention I didn't want to poke another hole to add another cable, the reason I was trying to bridge two EZBs.

But now I will punch a hole because this resolves a camera space issue for me.

I will look for a proper cable. Will the camera plug and play without any additional modifications to windows?
PRO
Synthiam
#11  
Yeah - the camera will work with ARC... or at least should. The USB <-> UART adapter cable you will need must support at least 3,333,333 baud with RTS and CTS lines. Most any of the FTDI should be capable of that - specifically ones supporting windows 10.
PRO
USA
#12  
Copy that. Thanks!

I'll post the cable here first to make sure I don't waste money and time and I'll give it a spin.
PRO
USA
#13  
Actually having alot of trouble finding a cable. I can find 5v cables with top bauds speed of 12 megs 6 pin from china, but nothing above 3 megs for 3.3 volts. Anyone else have any luck?
PRO
Synthiam
#14  
what do you mean 5v cables? the ez-b camera cpu is 5v tolerant, if you're speaking about the signal.

Your cable needs RX, TX, RTS, CTS and must be greater than 3,333,333 baud
PRO
USA
#15  
OK, I've been searching 3.3v cables only, assuming it needed to be that voltage... 5v opens up the options then. Thanks!
PRO
USA
#16  
Ok update. So i found a 5v usb to serial cable using the Pl2303HDX chip set which supports upto 12 mbps baud. I ordered from Amazon at:


PL2303HXD

I've wired it to the camera using the wiring diagram (this was older image the drivers support win 10 which is the current operating system testing on):


User-inserted image


I installed the device driver and set the baud to 6 mbps:


User-inserted image


Plugged it in and I get power light (green LED)


User-inserted image


But issue is the camera does not show up in the camera drop down:


User-inserted image
PRO
Synthiam
#17  
Ooooh! Let me take a look. I might need to make a few changes to the control for a COM selection. Stay tuned...
PRO
USA
#19  
Will,

Your question was asked 6 months ago:
https://www.ez-robot.com/Community/Forum/Thread?threadId=10256

And i provided a solution too:
Post #15

And besides me is working for Merne too: Post #21

Before no one said it was possible, so when DJ mentioned:

Quote:


You need a uart to USB adapter that can work at more than 3,333,333 baud. There are plenty which can.


Quote:


Yeah - the camera will work with ARC... or at least should.


I didn't want to jump in with an answer, sometimes i easily miss some obvious details or/and tutorials.

So I guessed ARC already supported serial cameras.

I have at least 10 usb/uart dongles and none of them supports more of 3Mbps, so in my humble opinion is not easy to find the right one.

So I'm happy you got it quickly:) while you wait for DJ's new feature, you cant try my plugin.

It seems besides me and Merne and now you no one had interest in that feature.
PRO
Synthiam
#20  
You can try this test build of ARC i made for you: https://www.dropbox.com/s/cf87aey3e3hntv5/EZ-Builder%20Installer.msi?dl=0

Enter the COMx in the camera's address bar. Such as, COM1 or COM2 or COM3 or COM4 or COM5 or COM6, etc. and press START

If anyone has a custom baud rate, you can enter COM1:57600 or COM1:115200 or COM3:213967

ALSO you should be powering the camera off the ez-b 3.3v power. The I/O is 5v tolerant, but the power is still required 3.3v
PRO
USA
#21  
Ok Thanks I will give it a try! Good info on the voltage as i have it set up 5v now...i will rework it.
PRO
USA
#22  
And a double check i have TX and RX crossed over from camera to cable ...
Do i need to cross over CTS and RTS?
PRO
Synthiam
#23  
You don't need cts or rts actually. I realized there's enough buffer on the pc.

The tx and rx need to be crossed because, well, logic.


PRO
USA
#24  
! Perfect, thanks! You fellas sure do rock!
PRO
USA
#25  
Here is my epic fail today...maybe you can shed some light.

Here is how I have my camera, EZB and cable connected. I tried with and without the CTS and RTS connected :

User-inserted image


Here is how the com port is set up for the cable and in the camera connection:

User-inserted image


I get this error:

Camera Initialized: COM22:4000000 @ 320x240
UART Camera Error: System.TimeoutException: The operation has timed out.
at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count, Int32 timeout)
at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count)
at System.IO.Ports.SerialPort.Read(Byte[] buffer, Int32 offset, Int32 count)
at EZ_B.UARTVideo.MjorDt1ipt(Int32 , Object )
Camera Disabled
PRO
Synthiam
#26  
The ezrobot camera uses 3,333,333 baud. There is no point to enter that though, because the default is 3,333,333 if the baudrate is not entered.

Simply enter COM22 in the address, leave out the baudrate.

You cannot enter a baud rate that is not the correct baudrate.

Unless you have a camera specified to use 4,000,000 baud rate, you cannot use that baud rate.

The settings window of the com device has nothing to do with the baud rate that the application is using. Ignore the settings window for the com device. Close it down and never open it again. The only software that you need is ARC.
PRO
USA
#27  
Removed the baud rate and get the same:

Camera Initialized: com22 @ 320x240
UART Camera Error: System.TimeoutException: The operation has timed out.
at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count, Int32 timeout)
at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count)
at System.IO.Ports.SerialPort.Read(Byte[] buffer, Int32 offset, Int32 count)
at EZ_B.UARTVideo.MjorDt1ipt(Int32 , Object )
Camera Disabled

Perhaps this cable isn't going to be compatible.
PRO
USA
#28  
I see you have a green wire going to the CTS. its going to camera to...?


User-inserted image
PRO
Synthiam
#29  
Do not connect any RTS or CTS - it's not needed, as mentioned above. For safe measure, you could connect the camera's RTS line to GND.

Please connect TX to RX
Please connect RX to TX

I would recommend trying your camera with the ez-b to ensure it still works after providing it 5v. It may be damaged.

Next, you can specify the baud rate of 3,333,333 in the Serial Terminal (PC) to verify that data is indeed being transmitted to the computer over the USB UART cable.
PRO
USA
#30  
OK so tx to rx and rx to tx are connected correctly, no RTC or CTS connected.
Terminal shows a connection at 3,333,333. I changed computers and cameras to make sure com ports working and camera working. I'm now on com 3:

User-inserted image


On New computer and camera I get this error:

Camera Initialized: COM3 @ 320x240
UART Camera Error: System.UnauthorizedAccessException: Access to the port 'com3' is denied.
at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
at System.IO.Ports.SerialPort.Open()
at EZ_B.UARTVideo.MjorDt1ipt(Int32 , Object )
Camera Disabled
PRO
Synthiam
#31  
Denied because you're still connected to the camera using the terminal program. You can only access a COM port with one program at a time.
PRO
USA
#32  
.....well never trust a cable guide from china. The online image of the PL2023 wiring is incorrect. The TX and RX are mismarked. At the last minute I decided to try changing the TX and RX wires and Bingo I have a steady and fast frame rate!

Thank you for hanging in there with me.
PRO
USA
#33  
I will re edit all the correct wiring and repost so anyone else who wants to convert their ez camera to USB will have a correct wiring diagram if they use the PL2023.
PRO
Synthiam
#34  
Nice - glad it's working. I bet it works real fast and responsive too! The camera connected directly to the PC would be amazing fast
PRO
USA
#36  
Here is the wiring diagram when using the PL2303 to convert the ez camera to a usb camera. The PL2303 has baud rates up to 12mbps, so it supports 3,333,333 baud for the ez camera. It’s $10 and works great!

Please not DO NOT cross the TX and the RX, the wiring diagram from China is incorrect. Please connect TX to TX and RX to RX.

Do not use the 5 volts from the cable but rather connect 3.3v and ground from the EZB using the regulated 3.3v on the Analog ports. also connect a ground from the EZB to RTC.

Link to PL2303HXD from amazon: PL2303HXD

User-inserted image
PRO
USA
#37  
Hey guys I’m adding the camera to Alena. When connected to ARC and activated on the com port, I keep getting glitches in the image about every 30 to 40 secs. ( see below) Any idea what could be causing? I checked wiring and swapped out cameras and exhibits same behavior.


User-inserted image


User-inserted image
PRO
Synthiam
#38  
Either the rts and CTs are not connected correctly or the data wires are noisy
PRO
USA
#39  
Ok I didn’t connect at all because of the quote from #24. Maybe I misunderstood.

Quote:

You don't need cts or rts actually. I realized there's enough buffer on the pc


Maybe not enough buffer after all?!?
PRO
Synthiam
#40  
Oh right! Yes that’s right. I forgot, you don’t need CTs rts. The buffer is huge. Really huge.

So I’m guessing it’s noise on the signal line
PRO
USA
#41  
The lines are running across the top of a servo. Do you think that’s where the noise could be coming from? If so how can I shield the wires?
PRO
USA
#43  
Got it thank you!
PRO
USA
#44  
Ok still working through this issue. I built another one of these and have the same issue. I’ve tried twisting pairs I’ve tried ferrite rings and even aluminum foil! Lol.

I finally tried going back to the old ez double board cameras and I get less full frame glitches. But still glitchy.

Finally I noticed the pop up from below as I had not checked always show and here are constant error messages I am getting.


User-inserted image
#45  
This could be latency and or interference issue with the UART because I had similar issue with a questionable UART with my Omron camera (I do realize it is not 100% the same, but the challenges are similar), but mine actually blacked out the image every couple of seconds. My problems went away with a new UART because my was cheap to begin with.

I believe yours is a little higher end so I assume it's probably good. You followed DJ's suggestions which were good ones to rule out the most common hardware interference.

Aiming for less common now, I'd probably want to check the solder joints of the UART cable to the camera and maybe try a different cable or different wires to rule out a bad wire/connections.

Software side what helped my Omron UART latency also was a tip (Omron) had for going into the Windows Device Manager for the virtual COM port of the UART and then Advanced settings and then under Latency Timer, setting the value to less than 16 because it might improve performance. But adjusting it lower is an incremental playing game, because going too low can disrupt other things. Think of it like tuning in an old radio station, starting at 16, then 15, then 14, etc to see if the interference goes away.
PRO
Synthiam
#46  
Oh I never thought of that. The usb to uart adapter might be dropping packets. That’s a smart observation, and the most probable cause.
PRO
USA
#47  
Geesh I’m away for a day and came back to all these great forum reply’s and interesting posts. I will give that a try in the morning. Thanks!
PRO
USA
#48  
...i'll add since this came up in the feed..my issue was with my USB ports on both my laptops. I purchased a new computer and the issue went away completely for both my robots. Both those laptops were old.