Author Topic: [Answered] CH340C powered by USB issue  (Read 387 times)

0 Members and 1 Guest are viewing this topic.

Offline josefmtd

  • Contributor
  • Posts: 5
  • Country: id
  • YG0OAT
[Answered] CH340C powered by USB issue
« on: September 27, 2018, 08:50:54 pm »
Hi! I have designed a CH340-based Arduino compatible standalone board for my project, I designed two of them, one is powered by 5V directly from USB port, the other is powered by 3.3V from AP2112-3.3V regulator from USB port. The 3.3V powered CH340 works just fine, however the CH340 powered by 5V does not seem to work at all, I hooked it up to Raspberry Pi 3, my dual-boot Ubuntu 18.04, or Windows 10, none recognize the USB device.

What I have tested:
- Different ICs (tested 6 of them, none of them work when supplied by 5V, tried 3 CH340 on my 3v3 board, all work without a hitch)
- Tested the voltages, CH340 receives 5V on VCC and the internal regulator does output 3.3V on the V3 pin
- Checked the connection, USB differential pair, VCC, and GND, all seems to be connected without a problem
- Added bypass capacitor (I forgot to add 5V-GND bypass capacitor in the design, ended up soldering a ceramic 100nF between pin 16 and 1)
- CH340 driver, I have the correct driver, my 3v3 board is detected and works just fine on my Raspberry Pi, dual-boot Ubuntu 18.04 or Windows 10

What I have not tested:
- Supplying 3V3 externally to the V3 pin

Does anyone have experience with this chip and can share something I'm probably missing?
Thanks in advance!
« Last Edit: September 28, 2018, 10:48:15 am by josefmtd »
Junior Electronics Engineer
 

Offline t1d

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: us
Re: CH340C powered by USB issue
« Reply #1 on: September 27, 2018, 09:13:56 pm »
Well, we could use some additional information... You say you designed the boards... Did you make them, or did you use a board house? With either, you could have made a design mistake, with a connection, or there could by a manufacturing defect. You should do a point to point continuity test, on the board. Compare it to the other board.

Do you have an oscilloscope?

Is the CH340 5v compatible?

Is the oscillator oscillating?

Did you remember to tie the ground, between the CH340 and the board.

Tell use more... Post you schematics and board layout, for whatever design program you use. Also post these in pdf format.
« Last Edit: September 27, 2018, 09:46:18 pm by t1d »
 

Offline josefmtd

  • Contributor
  • Posts: 5
  • Country: id
  • YG0OAT
Re: CH340C powered by USB issue
« Reply #2 on: September 27, 2018, 09:54:43 pm »
Well, we could use some additional information... You say you designed the boards... Did you make them, or did you use a board house? With either, you could have made a design mistake, with a connection, or there could by a manufacturing defect. You should do a point to point continuity test, on the board. Compare it to the other board.
Thanks for your response, I designed the board with Altium, manufactured the board on JLCPCB, I did test the point to point continuity, all seems to work just expected.

Well, we could use some additional information... You say you designed the boards... Did you make them, or did you use a board house? With either, you could have made a design mistake, with a connection, or there could by a manufacturing defect. You should do a point to point continuity test, on the board. Compare it to the other board.

Do you have an oscilloscope?

I do have access to an oscilloscope

Is the CH340 5v compatible?

The datasheet suggests so, Arduino Nano I have with CH340G works happily supplied by 5V, I assume it should work fine for the CH340C (the built in crystal version)

Is the oscillator oscillating?

I have yet to test that, I'll probably try checking tomorrow morning GMT+7

Did you remember to tie the ground, between the CH340 and the board.

Tell use more... Post you schematics and board layout, for whatever design program you use. Also post these in pdf format.
I like to think that I have done that countless of time to not forget tie all the ground together  ;D

I forgot to attach the snippet of the schematic, here it is.

Layout 3v3 shows the AP2112, ICSP 6, regulator capacitors, a molex full size USB PCB edge, and the CH340C
Layout 5V shows the micro usb port, decoupling capacitors, a micro USB molex USB PCB edge

You may notice I forgot to use the DTR to control the ATmega328p's reset, yep that's one of my dumb mistakes
« Last Edit: September 27, 2018, 09:58:27 pm by josefmtd »
Junior Electronics Engineer
 

Online Peabody

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: us
Re: CH340C powered by USB issue
« Reply #3 on: September 28, 2018, 12:10:06 am »
There's a datasheet somewhere that says C1 should be 4.7-20nfd.  I don't know if that really makes any difference, but it might be worth trying it.

 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 1675
  • Country: gb
Re: CH340C powered by USB issue
« Reply #4 on: September 28, 2018, 01:27:14 am »
Is the net name for the USB 5v pin changed from Vusb to Vcc in the 5v design?
 

Offline ThomasDK

  • Regular Contributor
  • *
  • Posts: 95
  • Country: dk
  • B.Eng. EE
Re: CH340C powered by USB issue
« Reply #5 on: September 28, 2018, 01:40:23 am »
The 5V version has no decoupling on the VCC line... That's probably the problem.

Edit: Didn't see you put 100n on it. That might be too little. Try a couple of uF.
« Last Edit: September 28, 2018, 01:42:44 am by ThomasDK »
 

Offline bson

  • Supporter
  • ****
  • Posts: 1219
  • Country: us
Re: CH340C powered by USB issue
« Reply #6 on: September 28, 2018, 06:28:59 am »
Where's the pullup?  Take a look at this:



The wire heading up leads to a TPS7B6933 3.3V regulator that provides system power, but it could also be used as-is for a legacy 5V design.

Oh, and please get in the habit of drawing complete sub circuits.  Just using net names and a bunch of scattered parts I have no idea if you have a pullup somewhere else not shown.
« Last Edit: September 28, 2018, 09:31:09 am by bson »
 
The following users thanked this post: josefmtd

Online oPossum

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: us
Re: CH340C powered by USB issue
« Reply #7 on: September 28, 2018, 09:40:50 am »
The micro USB pinout is wrong. D+ and D- are swapped.
 
The following users thanked this post: josefmtd

Offline josefmtd

  • Contributor
  • Posts: 5
  • Country: id
  • YG0OAT
Re: CH340C powered by USB issue
« Reply #8 on: September 28, 2018, 10:47:34 am »
The micro USB pinout is wrong. D+ and D- are swapped.

O my Lord! I messed up real bad! No wonder it won't work! Thank you so much for pointing out my stupid mistake!

This is my worst fuck up so far  ::)

Thanks for everyone for pointing out some of the flaws, I'm grateful for your valuable inputs!
« Last Edit: September 28, 2018, 10:59:11 am by josefmtd »
Junior Electronics Engineer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf