Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Building serial interface for an avr using a ft232rl in self powered mode

Status
Not open for further replies.
Hi
I'm using the ft232rl chip in a self powered configuration i.e. it's powered by an on board 5v 7805cv regulator.

In the datasheet it said I need to setup a voltage divider to produce 3.3v which should be powered by the usb port. I was wondering does it matter which ground I connect it to because I connected to the gnd of my regulator simply because it happened to fall into the same column on my stripboard. However I was told the gnd pin for the usb port should be connected to my regulator. So is it not effectively the same?
 
Last edited:
Yes, all grounds need to be connected together and are the same (for low frequency or DC signals).
 
I wouldn't do it in that particular case. (connecting all grounds).

I suggest to use optocouplers. 6N139 have an extremely low forward current for the transmitters (0.5mA) and can be connected directly to the AVR µp.

That way you might keep USB ground and VCC separated from your device.

I'm using this setup for my DDS-function generator without any problems.

Boncuk
 

Attachments

  • USB-RS232-SCH.gif
    USB-RS232-SCH.gif
    30.8 KB · Views: 1,389
I wouldn't do it in that particular case. (connecting all grounds).

I suggest to use optocouplers. 6N139 have an extremely low forward current for the transmitters (0.5mA) and can be connected directly to the AVR µp.
That won't work for what the op's application. He wants to use the USB power to generate a voltage on his board so he needs to have both grounds tied together.
 
Hi Carl,

I don't know where the problem is.

The FT232RL has an internal voltage regulator and puts out 3.3V at pin 17, which can be used to supply other circuitry.

This voltage should not be connected on the return path to circuit ground of the slave circuit.

Regards

Hans
 
Here are two examples to power additional devices using USB power.

The FT232RL has to be initiated in both cases!

There should not be a problem connecting circuit ground and USB ground as long as there is no possibility to "create" ground loops.

Boncuk
 

Attachments

  • USB-BUS-POWER.gif
    USB-BUS-POWER.gif
    23 KB · Views: 781
  • USB-BUS-POWERED WITH 3.3V_5V.gif
    USB-BUS-POWERED WITH 3.3V_5V.gif
    23.7 KB · Views: 1,415
of late, there are software based usb support, and that can become part of the AVR firmware. Perhaps, it may be slow, but it works.
one such example is AVR_USB_asp programmer design. here is the link for one such
https://www.fischl.de/usbasp/
 
I think the better Way is to power the FT232R by the USB Port.
So the FT.. can always be initialized by the PC.
When you power the FT232 by your internal Power supply it can only work if this power is present.
The next Problem - Boncuk has described that already - is the possibility of ground loops.

When your device is connected to the PC and that device has Connections to other components that are conected to the PC, it is possible that the GND is tied together through the whole system.
At measurement equipment it is possible to get wrong results, or damaging of some parts.
I've made that experience with my LiPo Volt Meter.
There was a Charger with RS232 and the LiPo Voltmeter with USB both connected to the PC. First there would be shown wrong results. Then the A/D Converter of LiPo Voltmeter was blown. After installation of optocouplers the problem was solved.

When such one is planned in your case, you should use optocouplers to get galvanic isolation. The easyest place to do that, is at the TxD and RxD Connections between the FT232R an the rest of the circuit.
So the FT232 would be powered by USB and the circuit behind the optocouples has it's own power supply.

To create an USB by software in an tiny AVR like ATMEGA88 isn't an good idea.
Nearly the whole capacity would be used for serve the USB Port.
When you want to do that you'll better use an AVR with USP capability like the AT90USBxxx controllers.
 
Last edited:
I have Elektor "Software defined radio" designed by Burkhard Kainka of Germany, that employs FT232RL. I have changed to internal power instead of USB.

The moment I connect it to PC's USB, it starts working. as start the sdr file.
perhaps it has built in sequence to load an init_cal file. but i don't load the FT driver daily.

Hope this info helps.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top