How to use an Arduino as a USB to TTL converter || Arduino tutorial

  Рет қаралды 124,048

ElectronFun.com

ElectronFun.com

10 жыл бұрын

This short video is a tutorial on how to use an Arduino as a USB to TTL (also known as COM or RS-232) converter. I was using a dedicated converter bought from eBay in my previous video: • How to unbrick a TP-Li... . If you have an Arduino lying around, it will easily substitute a USB to TTL converter.
See all my Arduino tutorials here:
• Arduino tutorials
Subscribe to get notified about my new videos:
kzbin.info_c...
----------------------------------------------------------------------------------------------
KZbin channel: / electronfuncom
Google+: plus.google.com/+Electronfuncom
Facebook: / electronfunpage
Twitter: / electronfun
Website: ElectronFun.com
----------------------------------------------------------------------------------------------
Video, edit, voice by Chris Lorkowski
Music by Jason Shaw - Keep It Real
www.audionautix.com

Пікірлер: 132
@debdinoogmai
@debdinoogmai 8 жыл бұрын
Fantastic. I just bricked my tp-link router and this is exactly what I need to fix it today instead of waiting for a usb to ttl converter.
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+Raspoetin a Great, I'm glad my video helped you solve your problem. Good luck with the unbricking process!
@debdinoogmai
@debdinoogmai 8 жыл бұрын
+ElectronFun.com All done and dusted :) It took me more time to find and configure a decent Terminal Emulator and TFTP server for Mac then connecting and un-bricking my router. btw, your vid on opening the TP link was very handy as well. Thx
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+Raspoetin a Thanks a lot :)
@barebooger
@barebooger 6 жыл бұрын
This worked with my older Arduino Duemilanove, thanks! I was having trouble programming the PID on a Tarocco servo controller with a 3.3v USB to serial cable. This did the trick. I think it needed the full 5V.
@renzevenir4853
@renzevenir4853 7 жыл бұрын
Truly a life saver! Thanks! I have to customize my STOSD and I have no USB to TTL converter.
@ElectronFunCom
@ElectronFunCom 7 жыл бұрын
Thank you! I'm glad I could help :)
@davebutler95
@davebutler95 2 жыл бұрын
This worked like a champ for Tasmotizing a few Sonoff Basics after also connecting 3.3V on the Arduino to 3.3V on the Sonoff.
@melbourneonrails5721
@melbourneonrails5721 5 жыл бұрын
Used it to connect my C64 mini to pc. Works well! Thanks for this amazing video!!
@liquidpower
@liquidpower 9 жыл бұрын
this helped so much i was trying to use a real usb to ttl the ftdi232 and every time it gave me an error watched this threw my arduino on it and bam i can upload the firmware now thanks!
@ElectronFunCom
@ElectronFunCom 9 жыл бұрын
Jason Brown I'm glad I could help you :)
@calebtshionza2308
@calebtshionza2308 6 жыл бұрын
To the point and helpful advice thank you
@bxeagle3932
@bxeagle3932 2 жыл бұрын
Does this method works for stm8 board?
@tuliog4178
@tuliog4178 4 жыл бұрын
Mindblown! I mean, after i blown an arduino before, I still can use it. like this. Great.
@memogarcia9470
@memogarcia9470 8 жыл бұрын
Hi, in this case I have the arduino 2560, what is the sketch for make it work? thanks
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+Memo García Hi, unfortunately the Arduino Mega 2560 doesn't have an FTDI chip, so it's not as easy as with Arduino Uno. I haven't tried that with the Mega 2560, but the below link might help you: forum.arduino.cc/index.php?topic=287584.0
@theUsesOFnot
@theUsesOFnot 4 жыл бұрын
How can I connect a USB barcode scanner to an Arduino - do I need some kind of USB host? I just want to get the barcode via. serial port.
@eaingraham2415
@eaingraham2415 9 жыл бұрын
I'm trying this with an Arduino Leonardo, and when I make the connection between RESET and Ground (similar to whats shown in the video), the connection between my computer and the arduino gets reset (sounds reasonable when you think about it) ... How do I get my computer to speak to/through the arduino once the atmega gets put to sleep?
@ElectronFunCom
@ElectronFunCom 9 жыл бұрын
Eain Graham Hi Eain, your Leonardo behaves properly. Arduino Uno has 2 microcontrollers: the main unit and another one for USB communication. When you disable the main ATmega the USB connection remains unbroken. Leonardo has only one microcontroller for running the sketches and USB communication. That's why your connection gets broken when you reset the ATmega. See more details here: www.arduino.cc/en/Guide/ArduinoLeonardoMicro?from=Guide.ArduinoLeonardo.
@Ahmadnaweed786
@Ahmadnaweed786 4 жыл бұрын
What about logic level ? Because the router is 3.3 v and atmega328p is 5 v?
@pascalbeucher3829
@pascalbeucher3829 9 жыл бұрын
Hi, then you connect a USB cable between the computer and the Arduino? USB PC ---> USB Arduino _ TX/RX Arduino ---> Device serial port ?
@ElectronFunCom
@ElectronFunCom 9 жыл бұрын
It goes exactly like you wrote. Just remember to connect TX to RX and RX to TX. Pay attention to the marks on the Arduino board: RX1 (1 is actually RX and TX from another device should be connected here).
@leon111333
@leon111333 5 жыл бұрын
Really great! Thank you very much!
@saikatd9037
@saikatd9037 3 жыл бұрын
How to program the external atmega ic using this technique?
@xephael3485
@xephael3485 4 жыл бұрын
What's your voltage reading on ground to RX or TX?
@nischalpoudel3042
@nischalpoudel3042 3 жыл бұрын
does this work for nodemcu esp8266?
@ercost60
@ercost60 2 жыл бұрын
Thanks, worked fine to program a Picaxe once I swapped the Tx and Rx lines. Just as you said, Tx goes to Tx and Rx goes to Rx. That seems switched to me but it's a frame of reference thing.
@akmadsen
@akmadsen Жыл бұрын
I think it's because they're swapped internally again when bypassing the ATMEGA328 chip. That's how I read the schematics for the Arduino Uno (rev3) at least.
@dnsshetty2430
@dnsshetty2430 9 жыл бұрын
When using a normal USB to TTL device, we connect RX of the device to the TX of router, and TX of device to RX of router. However, in this video you have connected RX to RX and TX to TX.. am not too sure, but is this a correct configuration?
@ElectronFunCom
@ElectronFunCom 9 жыл бұрын
You are right, we connect TX to RX and RX to TX. Pay attention to the marks on the Arduino board: RX1 (1 is actually RX and TX from another device should be connected here). I agree, it is not marked clearly on the Arduino.
@dnsshetty2430
@dnsshetty2430 9 жыл бұрын
ElectronFun.com Ahh.. makes sense now. Thanks :)
@onil3372
@onil3372 6 жыл бұрын
can i have the code.?
@alexissalguero6875
@alexissalguero6875 8 жыл бұрын
can you use this method to program a adruino mini pro?
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
I guess you mean my other video entitled: "How to program an Arduino on a breadboard". To answer your question - it is possible to program Pro Mini using another Arduino as ISP, see here: www.instructables.com/id/Program-Arduino-Pro-Mini-Using-Arduino-Uno
@chriskaprys
@chriskaprys 3 жыл бұрын
I'm so glad this is here. I was about to purchase a USB to TTY serial converter, but then wondered if I couldn't just use one of my arduinos to do the same. Arduino to the rescue! I'm wondering how I actually interface with the device once it is connected, though. If I open the serial monitor I will only have a passive view of what's happening on the device, right? How would I send commands over a terminal once the device is connected? Thanks! *edit* Ignore me. I just realised the text field with 'Send' is at the top of the serial monitor. So blind sometimes 😎
@ElectronFunCom
@ElectronFunCom 3 жыл бұрын
It should work in exactly the same as a regular USB to TTL converter, if I recall corectly.
@viniciuscavalcanti6479
@viniciuscavalcanti6479 7 жыл бұрын
Hi, I tried with arduino mega 2560 and could not get it to work. Do you have any idea?
@ElectronFunCom
@ElectronFunCom 7 жыл бұрын
Arduino Mega 2560 doesn't have the FTDI chip, so it will not work as shown in the video, sorry.
@matthewgutz
@matthewgutz 7 жыл бұрын
I got this method to work using my arduino uno, but when trying with my arduino leonardo it doesn't seem to work. Any advice?
@ElectronFunCom
@ElectronFunCom 7 жыл бұрын
Arduino Leonardo is much different than Uno. The following webpage should be helpful: petervanhoyweghen.wordpress.com/2012/11/08/using-the-leonardo-as-usb-to-serial-converter.
Жыл бұрын
Why with this method can`t flash SIM900A ? but without a usb to ttl converter does it work? I still don't understand.
@doniherald7745
@doniherald7745 5 ай бұрын
someone say i need to connect CH_PD or EN pin to GND, but i can't find it in my Wemos D1 R1 board. turn out Reset pin to GND also works, Thanks!
@dwhollrah
@dwhollrah 8 жыл бұрын
Thanks, I've been looking for just this answer. I'm attempting a connection between the PCM on my truck to my laptop. Baud rate 8192. If I can manage this connection the Uno will pay its way. One thing I don't get..my truck forum has the RX and TX terminals pigtailed together into one terminal of the truck(5V). The only other connection is ground from board to truck terminal. Does this make sense to you? TY
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+dwhollrah I guess you've just found a new application for an Arduino board :) The thing with TX and RX pins pigtailed together does seem odd to me too. Can you give me the link to this forum post? When it comes to cars, I'm forced to rely on my mechanic, but I'll try to help if I can :)
@dwhollrah
@dwhollrah 8 жыл бұрын
+ElectronFun.com I used your connections and went ahead with the connect to truck and got it working perfectly...tons of sensor data spilling out of my lappy now. This is worse than texting while driving. Here's that link. www.dieselplace.com/forum/63-gm-diesel-engines/21-6-5l-diesel-engine/457933-how-scan-your-obd1-6-5-less-than-10-a.html
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+dwhollrah What about the TX and RX pigtailed together? I can see it does look like this in the photo.
@dwhollrah
@dwhollrah 8 жыл бұрын
+ElectronFun.com Yes, they are both joined to one lead running to a single terminal on the truck. The only other wire is ground just as you show. I've used it flawlessly for two days now....well a few boot hiccups.
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+dwhollrah I'm happy it works for you :)
@MZeroTolerance
@MZeroTolerance 7 жыл бұрын
If I connect Arduino's TX to RX (loopback), then I will see in Serial Port what I send? Or not?
@ElectronFunCom
@ElectronFunCom 7 жыл бұрын
I haven't checked such a case, but it's a nice idea for an experiment :)
@alonsomatos9447
@alonsomatos9447 6 жыл бұрын
Yes, i had just tested it and works flawlessly
@sweetclara
@sweetclara 8 жыл бұрын
Please do me a favor?Can I use Arduino instead of Serial port to USB gender?Now I want to use 4,6 pin ( DSR/DTR) of serial ports cable with my device, but I don't have Serial port cable.So, I connect with my device (there are two cable to connect 4,6 pin actually) to Arduino.I am not sure it is working or not...
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
I'm not sure if I understand your situation. First of all - what device do you want to connect to your Arduino?
@stephencrown
@stephencrown 8 жыл бұрын
Can i connect esp8266 to a PC in this method ?
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+Stephen Crown Yes, you can, because this method bypasses the ATmega chip and uses the USB to TTL converter integrated into the board.
@lioneltechreviews9740
@lioneltechreviews9740 7 жыл бұрын
yes, when the reset is grounded.
@salimshahzada4786
@salimshahzada4786 5 жыл бұрын
GREAT, SIR
@thebug2782
@thebug2782 8 жыл бұрын
sir, please explain the connection of an esp8266MOD smart wifi module to connect into a pc directly
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
See this: www.instructables.com/id/Getting-Started-with-the-ESP8266-ESP-12. It explains a lot.
@user-gm5dj7qo8h
@user-gm5dj7qo8h 9 жыл бұрын
Hello tell me you need to use the library for this example?
@ElectronFunCom
@ElectronFunCom 9 жыл бұрын
No, you don't need any code or libraries for this example. This Arduino board does not even need the Atmega microcontroller. It is only used as a USB to COM (also called TTL or RS-232) converter.
@matanbenyamin
@matanbenyamin 9 жыл бұрын
ElectronFun.com can it damage thearduino or the ttl device? if the device works with 3.3 v?
@ElectronFunCom
@ElectronFunCom 9 жыл бұрын
Matan Benyamin No, the router board from this video works with 3.3V and everything went just fine. There was no magic smoke and both devices work perfectly well until this day.
@user-kg9hk2wk6w
@user-kg9hk2wk6w 4 жыл бұрын
After setting arduino as a usb to ttl converter how can i turn it back to normal ? I did as you said but after that i cant upload code to my arduino !
@RajivDeo
@RajivDeo 4 жыл бұрын
Just remove the link between reset and ground.
@ram_psara
@ram_psara 8 жыл бұрын
is it possible to use this technique for a gsm modem(serial to usb).... i tried but didn't work out..
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+THULASI RAM I believe it should work. What modem module do you have?
@ram_psara
@ram_psara 8 жыл бұрын
sim900a...using pl2303 usb to serial converter..
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
Should work. Do you want to issue AT commands? How did you connect the USB to TTL converter to the GSM module?
@ram_psara
@ram_psara 8 жыл бұрын
gsm modem serial port tx, rx, gnd to prolific usb rx tx gnd..tested using gsm modem tester software.....thank you for your quick reply..
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+THULASI RAM Have you tried using PuTTY to issue AT commands?
@sudoname
@sudoname 9 жыл бұрын
Thanks a lot for sharing this ! I just started playing with Arduino, so pardon my noob queries, Google didn't help me much . 1. Why would connecting "reset to ground" turn Arduino into TTL converter ? 2. Is Arduino capable of working on both TTL and RS232 signals ? I was assuming all MCUs need TTL.
@ElectronFunCom
@ElectronFunCom 9 жыл бұрын
ShinchanPyara Hi, 1. Normally to reset ATmega you need to connect the reset pin to GND for a short while. When it's constantly connected the ATmega is disabled and you can use directly the USB to TTL converter chip that's on the board. 2. Actually it's not - Arduino can't work with RS232 signals without additional hardware.
@sudoname
@sudoname 9 жыл бұрын
Thank you !
@ElectronFunCom
@ElectronFunCom 9 жыл бұрын
ShinchanPyara No problem :)
@Abdul_rejman
@Abdul_rejman Жыл бұрын
Sir. Great
@vitalikstaricov1677
@vitalikstaricov1677 8 жыл бұрын
Как прошить arduino Uno с помощью USB TTL ch340g. Куда какие провода ставить
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+Vitalik Staricov I'm sorry, I don't speak Russian.
@serial507023
@serial507023 8 жыл бұрын
Hi I am trying to use this to program my UV-5R radio, Usually it requires cable which has USB to TTL adapter, I made the cable and trying to use arduino as USB-TTL adapter, But it does not seem to connect... Tx-Rx line flashes once then it Chirp software gives error that it cannot detect the radio. Software: CHIRP Reference: www.miklor.com/COM/UV_ProgrCable.php www.miklor.com/COM/UV_CHIRP.php
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+Dhananjay D I have never used CHIRP software, but have you set up all the COM port's parameters?
@serial507023
@serial507023 8 жыл бұрын
I know about baud rate, Is there anything else I should set up...:)
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+Dhananjay D Have you tried swapping TX with RX on one end of your cable?
@serial507023
@serial507023 8 жыл бұрын
Yes...It was not working I recently got USB-TTL converter, will try that, and debug this later :P, Thanks
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
+Dhananjay D No problem, hope it helps :)
@SantoshTupsy
@SantoshTupsy 2 жыл бұрын
Use this code upload to arduino(no need to connect wires): void setup(){ pinMode(0,INPUT); pinMode(1,INPUT); } void loop(){ }
@jonnyphenomenon
@jonnyphenomenon Жыл бұрын
anyone else horrified by his choice of wire colors? red to voltage, brown to ground! GAH! Other than that, good info! :D exactly what I came here for.
@AlistairSutter
@AlistairSutter 7 жыл бұрын
Hey man! Experimenting with my Uno here - trying to access the serial port of a router: a CradlePoint Ctr35. Used this link: www.devttys0.com/2012/11/reverse-engineering-serial-ports/ to find what I think is the headers. One weird thing with the TX though is that it goes to HIGH on boot, fluctuates a bit, then rests at LOW for however long I leave the device powered. Which makes me think that maybe I haven't found the right header? I was able to use the ground and vcc to power it up however, no problem. Running Kali Linux, I connected the UNO through USB, launched minicom - connected to /dev/ttyACM0 (Only tty I could find) and started testing all the different baud rates with the boot of the router. No success, even inverting the tx and rx connections. Not even garbage in the tty. Then tried testing the UNO-> connected tx&rx together and tried echo test > /dev/ttyACM0. And it worked. I think maybe I need to solder the wires on the router. What do you advise?
@ElectronFunCom
@ElectronFunCom 7 жыл бұрын
I haven't played with CradlePoint Ctr35, but I'm thinking maybe you are testing a wrong tty, but it's just my thought.
@AlistairSutter
@AlistairSutter 7 жыл бұрын
ElectronFun.com I thought so too but there isn't that much other pins on it. I'm thinking the board uses 3.3V serial - any DIY advice?
@ElectronFunCom
@ElectronFunCom 7 жыл бұрын
The pin may be right, but maybe it's another tty in you Linux.
@AlistairSutter
@AlistairSutter 7 жыл бұрын
Ah no - I can connect to a Belkin router through serial with the arduino using the same tty - problem is with the ctr35. The belkin uses 5V and the ctr35 uses 3.3V.
@ElectronFunCom
@ElectronFunCom 7 жыл бұрын
Nothing more comes to my mind now - helping remotely is not easy :|
@djkadakamc1889
@djkadakamc1889 4 жыл бұрын
It works with routers and other stuff but unfortunatelly not for programming radio frequencies
@sebastianelytron8450
@sebastianelytron8450 6 жыл бұрын
or just use an FTDI chip and save yourself the hassle....
@ElectronFunCom
@ElectronFunCom 6 жыл бұрын
You could do that, if you had one on hand.
@cyancoyote7366
@cyancoyote7366 8 жыл бұрын
Will this work on a nano?
@ElectronFunCom
@ElectronFunCom 8 жыл бұрын
I haven't tried that with Nano, but see this: forum.arduino.cc/index.php?topic=278222.0.
@Aw4yed
@Aw4yed 3 жыл бұрын
Hey, so have you try it?
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,7 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 37 МЛН
Using Arduino as USB to TTL converter
3:26
Alija Bobija
Рет қаралды 32 М.
Hacker's Guide to UART Root Shells
17:40
Flashback Team
Рет қаралды 472 М.
Sensors - which one to use
17:06
Electronoobs
Рет қаралды 1,3 МЛН
How to use Rotary Encoder with Arduino
14:44
Mario's Ideas
Рет қаралды 41 М.
How to Convert Laptop Webcams to USB Webcams
5:29
DIY Perks 2
Рет қаралды 665 М.
From Idea to Schematic to PCB - How to do it easily!
11:05
GreatScott!
Рет қаралды 1,8 МЛН
FTDI FT232RL USB to Serial Module (AZ-Delivery) Detailed Review
16:50
Robert's Smorgasbord
Рет қаралды 32 М.
Bluetooth connected successfully 💯💯
0:16
Blue ice Comedy
Рет қаралды 1,4 МЛН
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 1,1 МЛН