PDA

View Full Version : wpua



xnihilo
- 31st October 2008, 16:19
wpua=%000001
Will enable pin0 as input with internal weak pull up set (provided individual wpu are set via option_reg).

i sometimes get false trigger that I can't identify. Is it possible that internal wpu are not enough?
Should i add external 10k wpu to make sure i don't get false triggers??

Thanks :)

xnihilo
- 3rd November 2008, 22:30
Nobody has any idea if it is better to use external weak pull ups instead of enabbling pic internal WPU?

Bruce
- 3rd November 2008, 23:18
Have you tested this with the external pull-up? My only preference to external VS internal is that I control
current consumption, and, if needed, I can use a stronger pull-up.

xnihilo
- 3rd November 2008, 23:39
Have you tested this with the external pull-up? My only preference to external VS internal is that I control
current consumption, and, if needed, I can use a stronger pull-up.

Not tested, it takes more place on the PCB if I use external WPU. I was just wondering if using external WPU would reduce the risks of unwanted triggering of the interrupt on portA change. As you say, I may choose a stronger pull up...

Bruce
- 4th November 2008, 05:16
A stronger external pull-up may help, but it's hard to say without knowing more about your
hardware setup, PIC type, code, etc..

xnihilo
- 5th November 2008, 23:38
A stronger external pull-up may help, but it's hard to say without knowing more about your
hardware setup, PIC type, code, etc..

-> This is a big project actually.
The main board features a PIC16F690. On each porta pins A0 to A4 I connected a TSOP4840 IR sensor demodulator at 40KHz with its 10UF capa and 100 ohms resistor (almost what's recomended in the DS).
When a PWM signal at 40KHz arrives on the sensors, the DATA lead of the TSOP pulls the PIC pin to GND so the PIC can receive the incming signal and decode the 16 bits.
I was just wondering if the internal WPU of the pic are good enough to prevent a false triggering... I didn't find the value of the internal WPU in the PIC DS.

Bruce
- 6th November 2008, 00:36
I've done quite a few IR apps with Vishay IR modules, and I've never needed any additional
pull-ups for anything less than 40kHz carrier freq.

The internal pull-up built into the IR module has always been sufficient, BUT, you can
improve pusle-forming with a stronger external pull-up for high-speed applications.

Doesn't really apply to your app, but just FYI.

Our Fyre-Fly high-speed IR transceiver module used an external pull-up of ~2.2K for
improved pulse-forming at higher data rates.

Some of the lower frequency IR modules may be influenced by ambient light sources, so
you may want to look into better shielding. Red filters help, and recessing the IR module
back into an enclosure to help block ambient lighting helps too, but you want a very stable
and clean DC power supply as well to reduce false triggering. Shoot for <20mV peak-to-
peak noise or hash on your power supply rails for solid operation.

A few more tips;

Modulate your carrier as close as possible to the center band-pass frequency of your IR
module for best range.

Use an IR LED with a wave-length as close as possible to the peak spectral sensitivity
region of your IR module.

Block as much ambient light as possible with filters.

Make sure to locate your IR module as far as possible from your PIC, oscillator, and use a
star configuration for power. A star power route is just separate traces directly from your
regulator + output to each IC.

Then make your lower layer a solid copper pour, connected to ground, and route each
ground connection from each IC directly to the ground plane with a short trace to a via.

If you do add an external pull-up, make sure it doesn't exceed the current capacity of your
IR module when active.

xnihilo
- 10th November 2008, 11:48
Thanks for the answers.
Bruce, I'm doing all the things to tell but using the light filters. What kind of filter should I user, and where can I find that?