Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[AVR] CP2102 USB to UART Bridge and Atmega328P circuit question

Status
Not open for further replies.

mahouny

Newbie level 5
Joined
Feb 6, 2016
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
103
Hi,

I am developing circuit based on Atmega328P (8MHz 3.3V) and I want to add CP2102 USB to UART Bridge form Silicon Labs. (CP2102 data-sheet)

The device is powered from the external 12V AC-DC power supply and Atmega328p is powered by ASM1117 3.3V voltage regulator.

The problem is that I can't figure out if I can connect the 3.3V output pin from CP2102 to 3.3V line of the PCB, to be able program the Atmega328P when the external 12V power supply is OFF AND when the external 12V power supply is ON also.

I'm afraid that when Atmega328P is powered from ASM1117 3.3V voltage regulator, it may damage CP2102.

Your help and suggestion will be appreciated.


Thanks,
Khamzat


P.S. Here is the schematic. 3.3V line is marked in green.
Arduino_with_CP2102_Schematic.png
 

The CP2102 should get its power from the USB 5V you should not connect the CP2102 3.3V to your circuit if it is powered by an external power supply. The regulator limits the current to 100mA so while you may not damage anything by connecting it, it is a bad idea to do so.
The data sheets don't specify what would happen if you connected the 3.3V to a supply that was slightly higher in which case it would be sinking current, but I doubt that it would be good, it would depend on the external power supply current limit.
 
Last edited:
Hi,

The CP2102 3V3 must not be connected to any other circuitry.

Just give it the name "3V3U" or similar.

All other 3V3 connections are OK

Klaus
 
Hi,
Thank you for the reply guys.

I think I haven't clearly explained why I would like to use the CP2102 3V3 inner voltage regular pin.

As far as I known, the microcontroller must be powered to be programmed. So some programmers and USB to UART bridges llike FTDI adapters can supply power to Atmega328p VCC pin, while with other programmers IC must be powered from the external power supply or battery.

My idea is to make the onboard programmer (trough bootloader) wich can supply power to the microcontroller's VCC pin, from the inner 3.3v voltage regulator, so I can programm the device when NO external power is supplied.
I can't use USB 5v line, because there are some components in circuit which can support maximum 3.3V.

Right now I use cheap Chinese FTDI USB to UART adapter connected to :RX, TX, DTR, VCC and GND pins of Atmega328p.
It work perfectly when the device is already powered and when there is no external power supplied.

However I don't want use FTDI because of the story with reir drivers which has damaged many devices around the world. (No matter if thise were coloned IC)

So I decided to use CP2102 , which seeems to me a good alternative to FTDI, and have the internal 3.3v OUT pin, which I thought I CAN use to power the Atmega328p when divice is connected to PC for programming.

Unfortunately I haven't yet received my CP2102 adapters and IC that I have ordered, so I can't make the real life tests as I did with FTDI adapter.

Maybe I should simply put a small Mosfet betweeen CP2102 3V3 pin and Atmega328p VCC pin, to protect the Bridge IC from the "reverse / back " voltage from the ASS1117 ?

What do yiu think ?

- - - Merged - - -

Sorry for many TYPOS, I posted reply from my phone.
:oops:
 

Hi,

Lets make a long story short.

Electronics is calculable.
Here you need to know about the currents.

How much current max. can your CP2101 (3V3 pin) supply?
How much current max. does your application need?

I can't use USB 5v line, because there are some components in circuit which can support maximum 3.3V.
You could use the USB 5V as input to your 3V3 external regulator..

FTDI:
I used, I still use and I want to use their devices in future.
So they need to survive. They can only survive if they earn money...by selling their devices.
Developing an USB chip costs maybe more than a million,
developing the drivers, marketing, advertisement, going to trade shows are additional costs..
All these costs a company that copies chips doesn't have..

Klaus
 

Hi Klaus,
Thank you for your prompt reply.
CP2102 can supply 100 mA maximum.
Circuit will draw 10-65 mA from 3.3v line.
Connecting USB 5V line to ASS1117 3.3v INPUT pin seems to be a good solution :) I have completely missed that out.
Thank you.

Regarding the FTDI chips, I do perfectly realize the cost of developing of electronic chips and electronic products.
Sometime I work on my projects 20-22h per day non-stop.
For example I'm working on this project almost 9 month (electronics, 3D design, programming...)

However I think that providing the driver update which kills devices (with non original chips) iwas a stupid move, because FTDI in the first place have "punished" final consummers and not the companies who maked clone chips.

Also, when I purchase original CP2102 i do support Sillicon Labs.
It's just my personal choice to support SL and not to support FTDI.

It's like purchasing AMD over the Intel :)

Regards,
Khamzat
 

I expect that the processor should be also useable without USB connection. If so you could use a diode combiner circuit in front of the 3.3V regulator.
 

Hi,

So it seems you could use the internal regulator as well as an external regulator.

Do you ever need that external 12V supply? 5V supplies are more common .. at least those USB style charging adapters (And also those USP battery packs)

****

OT:... about FTDI:
because FTDI in the first place have "punished" final consummers

I see this differentely:
FTDI did not punish their customers.
Those people never were customers of FTDI.
FTDI punished the custumers of the cloning company.
They people used drivers of FTDI but did not use (and pay for) the ICs from FTDI.

It's just my personal choice to support SL and not to support FTDI.
I agree with you. Thats how free market economy works.

Klaus
 

... you could use a diode combiner circuit in front of the 3.3V regulator.
I think that with the typical voltage drop of silicone diode 0.6-0.7V the remaining 2.6 volts will be not enough for some other voltage sensible components in circuit. The schematic in my first post only shows 1/4 of the whole circuit.

Regards,
Khamzat
 

Do you ever need that external 12V supply? /QUOTE]

Yes. The schematic from my first post only shows ~1/5 of the whole circuit. The part wich is related to USB to UART chip.

The device will be powered from 12-24V battery pack or power adapter.

So there is another 35V to 12V 8A stepdown voltage regulator circuit on PCB, wich supplies regulated 12V power to two 12V (3A stall current) DC motors (trough H-bridge controllers) as well to both ASM1117 voltage regulators.

First ASM1117 5V regulator is to power two H-bridge motor controller's VCC lines, and to power the following ASM1117 3.3V regulator which supplies the power to Atmega328p, RFM69W module, I2C IO expander, and four I2C magnetic rotation angle sensors.

The space is very limited my PCB, so I used two ASM1117 instead of additional step down regulators for 5 and 3.3 lines.

Regards,
Khamzat
 

I think that with the typical voltage drop of silicone diode 0.6-0.7V the remaining 2.6 volts will be not enough for some other voltage sensible components in circuit.
It's been said in front of the 3.3V regulator, where you have minimal 5V input.
 

It's been said in front of the 3.3V regulator, where you have minimal 5V input.

Hi,
sorry but I don't see the purpose of those diodes in font of 3.3.V regulator...

ASM1117 3.3V is not powered from USB 5v line, but from the first ASM1117 5V regulator's Output pin, which (regulator) is powered by 35 -12V step down regulator powered by 12-24V battery pack.

I think, at first place I will connect the CP2102 3.3.V pin directly to 3.3V power line of the circuit. If any problem occurs, then I will add a MOSFET between CP2102 3.3V pin and the rest of the circuit.
So when the device is unpowered USB connection will supply power to programmer and atmega328p.
If device is powered MOSFET should protect the CP2102 from the dammage if there is no internal protection on 3.3.V pin.

Regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top