Electronics > Projects, Designs, and Technical Stuff
Interference on a circuit using PIC micro
(1/3) > >>
iqqy:
I'm new here, hi everyone!

I have a problem with a circuit I'm building. I get strange interference that I can't figure out.

The circuit has 3 channel PWM to control the colour of an LED, it also has 4 logic outputs that control a 4 digit 7 segment LED display. These are controlled by a PIC16F737. It runs off 3 AA cells, using a voltage booster to get 5V.

The interference occurs on the LED display. The number 6.66 is meant to show there (for testing). When I turn it on, this number comes up, but then very slowly fades to 7.77/6.76/ variants thereon. If I move my hand near, or tap, the 4 logic outputs or the wires from the PIC, the number changes randomly and suddenly. However if I ground myself (by touching my laptops metal case) this effect does not occur at all.

The PWM functions as expected, and drives the LED perfectly.

So far I have made sure that the unused inputs on the PIC are pulled high/low, and check my connections. I can't be sure that I've done either of those things properly though since it's been a while since I worked on this project.

Any help very much appreciated! Thanks.

Edit: Here's a video of the same problem manifesting itself in a slightly different way. You can see that when I ground myself it affects the display. How can I fix this?
migsantiago:
You can add some 0.1uF capacitors between Vdd and Vss, the closest you can to the PIC. Also make sure that the crystal you are using has a couple of 22pF or 15pF capacitors connected to GND.
jimmc:

--- Quote from: migsantiago on April 04, 2010, 07:10:28 pm ---You can add some 0.1uF capacitors between Vdd and Vss, the closest you can to the PIC. Also make sure that the crystal you are using has a couple of 22uF or 15uF capacitors connected to GND.

--- End quote ---

Good advice but that should be 22pF or 15pF.

Also check for unconnected (floating) inputs, a technique that I use (don't laugh I'm serious) is to rub a plastic ruler on my sleeve and then wave it above the circuit (no closer than 1 - 2 inches).
If things change then odds on there's a floating input somewhere.
CMOS inputs are such high impedance that the static field from the ruler can change their state.

Jim
Mechatrommer:
sorry i'm also a newbie. but i also have similar head scratching problem like this recently (all my logic went on and off randomly). i found out that i've not commonly grounded all components at the same level. stupid mistake isnt it? but stupid question will be, have u checked all the ground wires on all of your components? i've programmed several pics and atmel projects but never got this kind of noisy problem unless i stupidly miss the common ground wires or if i got high powered (noisy) brushed motor running nearby and i dont put any those small small bypass caps.
alm:

--- Quote from: migsantiago on April 04, 2010, 07:10:28 pm ---Also make sure that the crystal you are using has a couple of 22uF or 15uF capacitors connected to GND.
--- End quote ---

This should obviously be 22pF or 15pF, in case anyone got confused. I'd really be impressed by a crystal that's able to swing with 10uF of load capacitance. I'm sure Microchip has an appnote similar to AVR042 (AVR hardware design considerations), but couldn't find it quickly on the Microchip website, does any PIC user have a link?

You didn't post a schematic, but I'm guessing you're using some kind of display driver IC or shift registers to drive the displays? I'd also look into their power supply (is it properly decoupled?). Does the voltage booster give a stable 5V? A scope would be very useful to debug this, but I'm guessing you don't have one. If you do, I'd inspect the power supplies and the signals to the display drivers. It's quite hard to change a six into a seven on the parallel side, so I'd guess it's somewhere on the serial side (PIC or display drivers). Did you try swapping the display drivers? Do all IC's have a proper power and ground connection, or does it use the inputs for power/ground? Did you connect power/ground to all Vdd/Vss pins on the PIC?
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod