INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Dimmer

RE: Dimmer

What does your supply voltage look like, i.e., how do you know its electrical noise? If that chip series supports it, did you turn on the brown-out detector/reset circuit?

Dan - Owner
http://www.Hi-TecDesigns.com

RE: Dimmer

(OP)
The circuit works fine until I switch some fluorescent lights or a driller. Even the motor of a freezer turning on/off was making the Pic to reset. I have captured the noise on the supply line with the scope which goes down to about 2V (ns) and so the BOR kicks in. I always leave the BOR turned ON in my projects - would not like a semi reset and not knowing the state of the micro.
After adding inductors and capacitors (10nF, 100nF , 1uF, 10uF all ceramic in parallel near the Pic) I noticed a little improvement but not as much as desired.

RE: Dimmer

A quick look at the PIC part you're using indicates that GP3 can be configured as a reset. All of the pins have multiple functionality, so debugging how the noise is upsetting your processor gets complex. NOTE - I'm not familiar with all of the PICs available, and the last time I did software was, well - - - the previous century.

People sometime try to kill noise with larger capacitors. Actually, a lot of noise issues can be stopped with a very small capacitor applied to the right spot with SHORT LEADS. Long leads on capacitors can negate their effectiveness.

You have I/O ports that are unused - ground them if they're inputs, or at least put a pull-up or pull-down on them even if you're not using them (you might have them active in your code without realizing it, and a long noise burst causing multiple interrupts and quickly put a uP into confusion and into reset. Put a 1nF or 10nF cap on the other inputs. You appear to have plenty of capacitance and filtering on your power supply - enough to power it for a few seconds with power removed. And don't forget the simple tricks - aluminum foil if you suspect a radiated path and not a conducted noise path.

RE: Dimmer

If the supply line is dropping too low, you need more capacitance to take up the slack. You can't squeeze blood from a turnip... if the power isn't available, nothing short of a power reserve is going to save you.

Dan - Owner
http://www.Hi-TecDesigns.com

RE: Dimmer

If it's an EMI issue, then the cause might not show up on the schematic. It might be a board layout and/or wiring arrangement issue.

How much power is being switched by the TRIAC?

If you use a little 7w light bulb as the load, does it still malfunction?

(This is just another possibility for the list...)

RE: Dimmer

(OP)
When I said the supply dropping I meant with noise and not due to not enough capacitance.

I will design another PCB with more shielding and see if it works better.

My last trick would be to save the state in eeprom and read it on reset but that's a little dirty :)

RE: Dimmer

EMI design in a nutshell:

You know antennas? Do the opposite.

Good luck.

RE: Dimmer

Quote:

My last trick would be to save the state in eeprom and read it on reset but that's a little dirty :)

Yeah.. That will get you in trouble because you really don't know how many times it's going to happen. You can very quickly burn out the EEPROM. Been there.

Keith Cress
kcress - http://www.flaminsystems.com

RE: Dimmer

Noise works from a baseline... if you're losing power to the PIC, your baseline is too low. You can't have a solid 10V coming into your '05 and have a "noise" spike lower the output voltage to <2V.

Include a screenshot of the scope so we can see what you mean by "noise"...

Dan - Owner
http://www.Hi-TecDesigns.com

RE: Dimmer

(OP)
At the moment the unit is at the client cos he needed it so he took it as it is.
I will re-design the pcb and test again and post back - maybe nest week.

Thanks for all the tips suggested.

RE: Dimmer

You're redesigning a PCB that you don't truly know what the problem is... I wish I had that kind of free time.

Dan - Owner
http://www.Hi-TecDesigns.com

RE: Dimmer

Likely the only PCB issue would be to have the high voltage and potentially high current up at one end, and the processor at the other. The wire dressing within the case would be equally important.

Did you investigate if it had any relationship to the current in the load? The 7w light bulb test?

Good luck.


RE: Dimmer

Is the turning on or turning off of the triac causing the noise? You might want to try a snubber across the triac. You may also want to drive it with an optoisolator.

RE: Dimmer

(OP)
@Brian - Yes the Triac turn off was cousing some noise but the Pic was reset from external noise. It is driven with an opto already.
@VE1BLL - I was testing with a small bulb about 25W - dont think a 7W would make much difference.
@MacG - Actually I have another unit ordered and I need to add some things and since the components were through hole I want to change to SMD now. I wish I have more free time but this is partly a hobby for me :)

I am attaching the old PCB design maybe someone can spot any problems. PS - the Inductors and not shown as they were added afterwards.

RE: Dimmer

I think that you should make a new PCB.

The one you show has so many issues that I'm surprised it works at all.

There's no ground plane. Your ground meanders around the board from P2-2 to S1-2 like a Monza Circuit. Pour copper for a proper ground plane instead. That is, as I see it, your first and main problem with the design.

There are quite a few more. If this is going to be a commercial product, it will never survive in the market. Too expensive. Too many components. An example of a succesful commercial design is shown below. One of the simplest PICs ever, no A/D. No transformer and still does timing temperature control and humidity control.

We designed that sixteen years ago and the product has now been replaced with a smarter one. So esign is free. It works off a 230 V 50 Hz grid and we had a few problems during beta testing. Adding a ground plane solved those problems.

Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.

RE: Dimmer

(OP)
I know the ground track runs a little around but adding the inductors and capacitors near the Pic should have solved the noise issue.
Anyway I designed that some time ago and tried to use only 1 layer. I will change to smd now and add proper ground plane.

But I still prefer to use a transformer in my projects instead of the RC circuit.

RE: Dimmer

In addition to adding the close coupled capacitors on the inputs (as mentioned above) you might try dropping the value of the 10k pull-up resistors.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close