Arduino Pro mini and USB connection D+ and D- as RX/TX interface ?

hello,

I'm using Arduino Pro mini as main board for my project.

The device case will be permanently glued, and for power +5V i'm using USB cable with standard A plug to put to computer or USB charger, and only cables connected are GND and +5V (D+ and D- are not connected to the board)

Now i was thinking how i would reprogram device if needed...

The best idea would be to add additional socket/connector for handling the serial for programming, but it would complicate the hardware design, and would be hard to get it waterproof in a cheap way.

So i was wondering what if I connect D+ and D- (data lines in USB cable) that are unused now , straight to the TX and RX (serial TTL) of arduino ?

I know that the connection would not be usable without USB/TTL converter, but the interface is only for my own service purposes, so i could build a "converter" with a USB socket and plug the device to that converter for programing.

The question is, if it is safe for USB HOST device, like computer port or USB charger, and for arduino board to that ?

Will it interfere with something, or maybe it will burn something ?

As far as i know there is a software solution to add USB 1.1 by emulating USB host on serial tel of arduino (LUFA) and the connection there is straight , so what if i'm not emulating nothing, and the D+D- lines are just serial TTL and connected to a computer USB port ? just for powering the device in normal usage, and for programming connected threw the USB to TTL adapter ?

Does anyone have got any idea ?

The arduino I'm speaking about is 5v 16mgz version.

You need a FTDI to program an Arduino Pro Mini.
.

LarryD:
You need a FTDI to program an Arduino Pro Mini.
.

Yes i know that i need for example FTDI USB to TTL , but i do not want to build it in tho the device.

I just want to "take out" the serial lines of arduino "outside" of the case using the spare D+ and D- lines in USB cable, because i only use two lines for +5v and GND, and the data lines in my cable are not connected right now to arduino.

I would use FTDI connected to the USB plug of my device if necessary.

My question is, when i solder D+ and D- (USB data lines directly to the Arduino Serial TX RX) and than connect that cable to computer will it do any harm to arduino or computer ?

I know that it will not be usable as programming interface in that form.

I just want to have the TX/RX lines available in the USB plug, because i cannot open the Device with arduino when it is assembled, the casing is permamenty glued and water sealed.

I would not want to use a USB connector for that if it were my project. It would most likely damage a USB host, as the D+ and - lines are not 5V levels. Have you considered using something else, like a Pro Micro or DF Robot Beetle? Or include the FTDI adapter in with the project?

As mentioned, do not connect D+ or D-

OK, thanks guys for quick answer. I have to figure out how to take out of the box the programming interface.

I could Use any of the "Leonardo" clones that already have USB build in, but client does not want to pay extra penny for the device, and they do not want anyone to have "straight" access to the programming interface of the device, so y thought that using data lines in usb cable just to forward the serial interface outside of the casing would be the fastest and best solution that solves the problem.

dmjlambert is saying there is a solution:

V-USB is working on digital pins, so it is possible to connect usb to TTL i think.....

That VUSB does not program the board, it just makes the board appear as a keyboard to the host. Fastest and best solution is turning out to be pretty crazy. In my opinion. I would not want to waste time with something like VUSB programming or intentionally mis-wiring interfaces, when a more reasonable solution is a couple of dollars away and much more predictable and reliable.

dmjlambert:
…when a more reasonable solution is a couple of dollars away and much more predictable and reliable.

:wink: I know that, You know that, my dog knows that…

… my wife knows that even

My client seems to have problems understanding some things.

We are speaking about a person that wanted me to make aluminum sticker on top of the RFID NFC reader That i was designing for them, because aluminum is cool looks good, and is shiny !

Explaining why it is a worst idea ever , and why aluminum Panel/case will not work for a RFID reader with bluetooth embedded inside, i assume that they did not understand a word. And Just because i said that i will cover the top of the device with carbon fiber, that is even more durable cool and can have many patterns for the best look they need made the progress in that discussion.

OK. for now topic closed, as i know everything i wanted to know.

cheers, and thank you for your help !

This is funny. I hope you are able to get a few dozen or hundred extra chargeable hours out of them since they don't want to spend a couple of dollars on the correct hardware that will just get the job done immediately and correctly.

I hope so too, I think that i will use Pro Micro with atmega 32u4 in place of Pro Mini that is build around 328p, and if they can't accept that, than i will add a 4pin micro jack socket that is water sealed as a separate programming interface at the bottom.

Sometimes it is so hard not to kill someone...

Besides the Serial data lines are 5V and USB is not, you would be a line short. Because besides RX and TX you also need a way to reset the Pro Mini.

If you don't want to add a extra socket I would just go for a Nano. It's barley bigger, had the USB and is still based around the ATmega328p so all the usual libraries just work.

septillion:
Besides the Serial data lines are 5V and USB is not, you would be a line short. Because besides RX and TX you also need a way to reset the Pro Mini.

True, but that can be done using a pinhole just above the reset switch, for inserting some paperclip or so, as i said it can be even glued using thermal glue to retain waterproof design.

The programming is only a option, when/if there will be problem with the firmware, but it is well tested and quite simple, i just do not want to change casing every time i need to open device.

Today they told me why they need that Pro mini board... they already bought 600 of them for that project before consulting with me.

===edit

I have solved the problem.

I just connected Bluetooth module to the Serial line instead of using Softwareserial with other pins defined.

That way i have got working BT interface for interfacing the device from mobile client device, and as the module work with SPP profile I also have got programming interface when needed. Just needed to change the firmware in HC06 to the one that uses DTR also (bare HC0x have got only TX and RX lines active, you need firmware similar to the RN42 module (same module different firmware) to get the control lines working.

I have solved the problem.

I just connected Bluetooth module to the Serial line instead of using Softwareserial with other pins defined.

That sounds too easy.
I think someone else thought of that already

Pro-Micro cost (roughly) the same as a Pro-Mini.. so I dont see what the problem is?

I get my Pro-Micro's for roughly $4.00 USD or so.. vs the $3.00 for Pro Mini's