FT232 interfering with IR module

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here's a problem I've just spent several hours tracking down...

I assembled the avrlirc project on a solderless breadboard using an STK500 and a FT232RL using the breakout board from Sparkfun. The IR module is powered by the STK500 via the PORTD connector and has filter caps (47 uF and .1uF) on its supply pins. I've found that transmitting data via the FT232 will trigger spurious interrupts from the IR module. Here's what I've done to confirm this:

- I don't see this problem if I use the STK500's second UART instead of the FT232.

- I don't see the problem either if I power the IR module via batteries.

- the problem is lessened but still is present if I add a 100 ohm resistor between V_TARGET and the positive supply of the IR module (as suggested by the IR module datasheet)

I see this problem when I transmit at 115K baud as well as 38.4K.

Is there something I can do to achieve more isolation between the FT232 and the rest of the circuit? I'd like to put the FT232, attiny2313 and IR module all on one PCB eventually.

Thanks!

Links:

avrlirc: https://www.avrfreaks.net/index.p...

Sparkfun FT232RL breakout: http://www.sparkfun.com/commerce...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That FT232RL is not reliable. Im having different problems with it too. One project I used the 3.3v output from the FT232RL to feed an accelerometer. Big misstake since the 3.3v output is different if the USB-Connector is connected or not.

Second, the FT232RL seem to consume alot of power during pluggin in and unplugging the USB-Cable. Or there is some other problem with it. It hangs my AVR when I unplugg or connect. If I turn USART off, it works fine. Does it ground the TX-line from AVR during plug/unplug of cable? Havent found what causes it yet, thou Im sure it is the FT232RL.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I made a measurement device with FT245BM.

The FT chip is powered only from USB.
The AVR is powered from battery, but if USB is connected then it´s powered from USB.

To ensure proper operation and to be low power in battery mode i used special "LCX-family" driver chip for data and control signals.
This is usefull where both sides of the LCX chip can be either powered or not.

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AgwanII wrote:
That FT232RL is not reliable.
This has not been my experience.
AgwanII wrote:
Im having different problems with it too. One project I used the 3.3v output from the FT232RL to feed an accelerometer. Big misstake since the 3.3v output is different if the USB-Connector is connected or not.
Since the 3.3v output is derived from the USB 5v line, what else would you expect? Are you saying you have a dual source of 5v one coming from the USB and one coming from your system and you expect to be able to remove one or the other without affecting the system? They would have to be absolutely identical and your arrangement of diodes and conditioning circuitry would be substantial to prevent at least a short glitch of some sort.
AgwanII wrote:
Second, the FT232RL seem to consume alot of power during pluggin in and unplugging the USB-Cable.
On plug in it has to run the enumeration process, why would expect it not to consume a lot of power?

And for the OP. Could you clarify the problem with 'interrupts' from the receiver when you are transmitting IR. The way I read what you are saying seems to be exactly the way the system should work. That is, when you transmit, you will also receive what you are transmitting. I deal with this by locking out reception while transmitting.

Also, I'd be interested in knowing more about the OPs configuration since I am not able to get more than 4800 baud reliably with my system (I'm using a 38kHz carrier) and I'm curious as to how you get such high baud rates and what is your carrier pulse rate.

Finally, I presume that you guys know that you are only guaranteed 100mA from the USB bus. You can request more (up to 500mA), but if the system says no, then you have to have software in place to deal with it. Most IR leds alone will use 100mA.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@AgwanII: I use several home-brewed applications with the FT232R, and encountered no problems with them. I fancy these chips. But of course you must stick to the rules.

@Smiley: 4800 baud is already quite something @ 38 kHz. About 7 carrier-pulses per bit :!: And not plain uart-data I presume. The TSOP's need some bits to adjust .... almost human ;)

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
@Smiley: 4800 baud is already quite something @ 38 kHz. About 7 carrier-pulses per bit :!: And not plain uart-data I presume. The TSOP's need some bits to adjust .... almost human ;)

Nard

Now that I think about it, I think I limit myself to 2400 baud to get reliable reception, 4800 baud has too high an error rate with the TSOP I'm using.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

smileymicros wrote:

And for the OP. Could you clarify the problem with 'interrupts' from the receiver when you are transmitting IR.
Smiley

I'm not transmitting IR - avrlirc is a IR receiver. My IR (receiver) module output is connected to PD6. When I transmit via the USART through the FT232RL, for some reason it causes spurious interrupts on PD6.

I think it's a power issue. I see the problem when the IR module is powered by the STK500. I don't see the problem when the IR module is powered by separate batteries (the 2313 is still powered by the STK500). Also, the problem is lessened if I put a 100 ohm resistor on the IR module positive supply. Of course, the FT232RL is powered via USB.

Another strange thing -- I can cause the 2313 to reset (watchdog timer) if I disconnect the USART RX line from the FT2323RL. I realize that doing this will cause spurious bits to be received by the USART, but avrlirc responds to single byte commands, so I'm not sure why it's hanging.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

smileymicros wrote:

Quote:
Since the 3.3v output is derived from the USB 5v line, what else would you expect? Are you saying you have a dual source of 5v one coming from the USB and one coming from your system and you expect to be able to remove one or the other without affecting the system? They would have to be absolutely identical and your arrangement of diodes and conditioning circuitry would be substantial to prevent at least a short glitch of some sort.

Why would the 3.3 volt have to be derrived from the USB 5 volt? If I feed the FT232RL from another powersource it should use that source to make 3.3v, 5 volt from USB-Bus is only connected to the reset pin using a voltage divider. You say that the FT232Rl uses power from resetpin so power 3.3V?

Just do the measuring your self on a self powered chip. I thought it had something to do with the amount of load, so that when only the accelerometer was connected the stepdown circuitry coult not regulate. I experimented with a 50% load all the time, no differance. The voltage jumps. Atleast 50 mV. Enough to not beeing able to run sensors on it. And it does not occur if you load the outputpin for its maximum, only cable connection.

smileymicros wrote:

Quote:
On plug in it has to run the enumeration process, why would expect it not to consume a lot of power?

So you are saying that it should consume enough to crash the micro controller connected to it. And that trough the USART-pins. When I turn both USART-pins to inputs before I pull the cord there is no problem.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What IR receiver chip is it? Do you give it 3v3 or 5v supply voltage? Have you read the datasheet what voltages you can give to it? For example TSOP17xx devices only like 5V supply, newer devices can be run from 3v to 5v.

Also do you have a capacitor in addition to the 100R resistor on the IR supply line?

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AgwanII wrote:

Why would the 3.3 volt have to be derrived from the USB 5 volt?
...
Just do the measuring your self on a self powered chip.
...
So you are saying that it should consume enough to crash the micro controller connected to it. And that trough the USART-pins. When I turn both USART-pins to inputs before I pull the cord there is no problem.

Didn't say 3.3v has to be derived from the USB 5 volt - but there is a configuration for the FT232R that generates 3.3v from the USB power.

I'm not sure what you want me to measure, I'm not having any problems with any of my systems.

Didn't say any of what you are saying I'm saying.

Bottom line: in my experience and my designs the FT232R is a reliable product and I haven't had any problems using it. I was offering what I hoped would be helpful suggestions.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jepael wrote:
What IR receiver chip is it? Do you give it 3v3 or 5v supply voltage? Have you read the datasheet what voltages you can give to it? For example TSOP17xx devices only like 5V supply, newer devices can be run from 3v to 5v.

Also do you have a capacitor in addition to the 100R resistor on the IR supply line?

- Jani

The IR module is a TFM 5360, and I have filter caps on its supply pins (see original post). In all scenarios, either the IR module is powered by the STK500 (at 5 V) or by batteries (presently at around 4.7 V).

Since I don't see the problem when I use the STK500's second serial port instead of the FT232, I think the problem has to do with the FT232.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm only trying to help and that primarily because I will be soon embarking on a similar project for using the FT232R with IR. I've already done an FT232R IR wireless setup using an ATiny11 for the 38kHz carrier, all on breadboards and with no problems. I've also used the FT232R in a bunch of other designs that were prototyped on a breadboard, again, no problems with the FT232R. The only problem I had was accidentally overloading the USB power and causing Widows to go BSOD on me.

At the risk of offending, do you have your FT232R ground connected to the ground of the IR transmitter and of the STK500?

Can you show a photo and or schematics of your setup?

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

smileymicros wrote:

At the risk of offending, do you have your FT232R ground connected to the ground of the IR transmitter and of the STK500?

Can you show a photo and or schematics of your setup?

Smiley

No offense taken. My grounds are all connected. Here's a pic of the whole thing -- it's a pretty simple setup. I'm using a 11.0592 MHz crystal in the STK500.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, it looks okay and I can't think of anything else to check. I don't use the SparkFun board, but their products are good in my experience. If you are sure you wiring on your header is correct and if you've checked the paths from the FT234R to the ATMEGA and the paths are okay, then I don't know what it could be. When you figure this out, I'd really appreciate it if you'd post what went wrong.

Smiley