Go Down

Topic: How to hard wire a USB cable directly to arduino? (Read 248 times) previous topic - next topic

akhilanil

How can I connect the USB cable wires directly to arduino pins so that I can send and receive data without any loss? How to connect the "Data+ and Data-" wires of USB to arduino? Is this possible?

I'm a beginner with arduino!

Thank you.

pert

Clearly an XY problem. You should not be having any data loss over USB so the solution is to find the cause of the data loss and fix it instead of doing some insane soldering project.

To answer your original question. It would be extremely difficult and require advanced soldering skills. The resulting connection would be fairly fragile. You could glue the wire to the board to provide some strain relief for the solder connection, but you would still need to be very careful not to yank on the USB cable.

akhilanil

Clearly an XY problem. You should not be having any data loss over USB so the solution is to find the cause of the data loss and fix it instead of doing some insane soldering project.

To answer your original question. It would be extremely difficult and require advanced soldering skills. The resulting connection would be fairly fragile. You could glue the wire to the board to provide some strain relief for the solder connection, but you would still need to be very careful not to yank on the USB cable.
Thanks for your reply.
The thing I need to know is that to which arduino pins I will connect the Data +ve and Data -ve wires of USB cable.

pert



pert

#5
Sep 16, 2019, 08:33 am Last Edit: Sep 16, 2019, 08:35 am by pert Reason: Embed image
They are not on any of the Arduino pins broken out on the headers on your board. The USB data pins are on the small black chip that's near to the USB jack (either a ATmega16U2 or a CH340). The Uno actually makes access to these pins much easier than the newer boards with the surface mount USB jacks. The USB pins are exposed on the bottom of the board under the USB jack:



The above diagram is the top view of the board, so it will be mirrored if you're looking at the bottom side of the board.

So you could tack the USB cable wires on to those solder points.

It still doesn't change the fact that this should not be necessary. The only reason I can imagine you would have a problem with data loss over USB that would be solved by doing this is if you have a defective USB cable (in which case you should just replace the cable) or if you have a bad USB jack (in which case it might be reasonable, but I've never seen one of those type B jacks go bad, even on Arduino boards I've abused almost daily for 7 years).

akhilanil


groundFungus

#7
Sep 16, 2019, 07:16 pm Last Edit: Sep 16, 2019, 07:17 pm by groundFungus
How do you know that the data loss is due to bad USB and not bad serial receive code?

Paul__B


Qdeathstar

#9
Sep 16, 2019, 11:45 pm Last Edit: Sep 16, 2019, 11:46 pm by Qdeathstar
I smell a "my arduino isn't working" topic in the works and smoke...
A creaking creeping shadow
stiff against the freezing fog
glares at a tickless watch.

Time has failed him -- all things shall pass.

Paul__B

Well, the original question is clearly completely nonsensical, but
I'm a beginner with arduino!
apparently explains it!  :smiley-eek:

Go Up