Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Power Supply for PIC

(you are viewing a thread; or go back to list of threads)

Power Supply for PIC (by Bozidar)
Hello!
I need schematics of power supply for PIC which is immune from noises and switching power load.
Have problem that when I switch big load PIC reset it self.
BOD enabled.
I use supply with 7805.
Sun Dec 26 2010, 04:15:38
no subject (by simon)
use atmega . it is better for industrial aplications .
Mon Dec 27 2010, 04:43:57
(no subject) (by Max)

I have made some high power switching with PIC and Ldmicro... and never ran across this kind of problem

I have build a 5 Kw DC 24Volts PWM motor controller running at 200 Amp. continuous ... and also a grid tie wind turbine controller witch is connecting an 7.5 Kw induction generator to a 240 Volts grid without any reseting problem...

What are you using to switch your load? and what kind of load?
you may also post your schematics, will be easier to help you
Mon Dec 27 2010, 17:23:03
(no subject) (by Bozidar)
Thanks for helping me!
I am switching on -off 6KW UV-lamp.
Sometimes when lamp switches on PIC reset it self and LCD serial display.
Then I have to turn off power to PIC to reset it.

I tried to use Atmega 128 (Ispprog + STK200) in my application but something is not OK.
Program and serial LCD doesn't work like in simulation
(same program on PIC works OK).
No output for LCD.

Schematics for my power supply is transformer and 7805 as regulator.
Tue Dec 28 2010, 12:05:12
(no subject) (by Max)
6KW UV !!!!!!!

what the hell is that kind of lamp ??? the biggest I have ever seen is a 1000W UV HID lamp... and it was enough powerful to light up all the white thing in a 100'000 sq. foot area

Or you mean 6KV rather than 6KW...

What is your voltage source?
AC or DC, 12, 24, 48, 120, 240, 347 or 600 Volts

what is your switching device?
dry contact relay, mercury relay, solid state relay, triac, mosfet...

what is your load type?
inductive, capacitive, resistive or a mix of everything

QUOTE
{{Schematics for my power supply is transformer and 7805 as regulator}}

a basic power supply will have minimum

1-transformer
1-bridge rectifier
1-7805
2-Ripple capacitor
2-high frequency filtering capacitor
Tue Dec 28 2010, 13:48:13
(no subject) (by Jonathan Westhues)
With proper design, it should be possible to use either an AVR or a PIC, regardless of any nearby noise sources.

How do you know that the problem is with the power supply circuit? That's just one of many possibilities. For example, you didn't say how you were switching the load, but current could be getting injected through the control terminal of your switch (for example, through the gate of a FET), flowing back through the protection diodes on the I/O pin controlling it, and making something screw up due to that substrate current.

The problem could even be completely radiated (well, electrostatically or magnetostatically coupled), not conducted. For example, if your layout is bad, with large loop areas and without a solid ground plane, then the time-varying magnetic field when your load current switches could induce a current in that loop; so you could have random unintended currents almost anywhere in your circuit.
Wed Dec 29 2010, 03:38:57
It's a great program (by kelvin)
Hi John,

I've came to know about this Ldmicro, through my friend. This is just a great program. First of all, i would like to thank you, for your contribution in developing this Ldmicro. Actually I'm a person with a knowledge of PLC programming. but Micro controller is something new to me. Before this, i used to learn other programming language like Basic & Assembly. But i couldn't catch it. It comes with so much of text. So, i looked for a ladder based program for programming these micro controllers. Finally, i got the thing, that i've looked for. Thanks.
Wed Dec 29 2010, 09:36:48
(no subject) (by Bozidar)
It is Theimer Montakop 95 copyframe.
Original electronic died.
Relays switches contactors which switches lamp.
Wed Dec 29 2010, 17:23:19, download attachment PCB.pdf
(no subject) (by Jonathan Westhues)
First, for the stupid question: I assume the problem does not occur if you switch the contactor alone (but no load on the contactor), or the relay alone (but no contactor or load)?

If you ran the PIC off a battery (into the 7805), then you could rule out any problem with the incoming power; a line dropout, for example. But I doubt that will fix it. (If it does, then a bigger Al electrolytic on that rail will probably fix the problem for real.)

The layouts aren't great; it would be much better to use a two-layer board with one layer filled as much as possible with ground plane. But it can probably still be made to work.

I guess the other IC on the PIC board is some kind of power driver to switch the relay coils? And I assume that the relays and contactors have appropriate snubber networks across their coils?

And is there a snubber of some type across the output of the contactor? I'm guessing that the load is inductive due to the lamp ballast, so you probably get a decent voltage spike when that switches.
Wed Dec 29 2010, 18:03:20
no subject (by simon)
Hi Bozidar
Try this diagram
Thu Dec 30 2010, 12:45:23, download attachment pcb.rar
(no subject) (by Bozidar)
Thanks Simon for reply.
Output IC is ULN2003 which has diodes inside.
I found this schematics. Will this work? Any suggestions.
Thu Dec 30 2010, 17:32:56, download attachment Power Supply.pdf
(no subject) (by Max)
Does your MCU hang wile the relay activate or release or it just hang randomly ?
Thu Dec 30 2010, 19:17:19
(no subject) (by Jonathan Westhues)
The schematic that you posted is bizarre. It seems to start with a 60 Hz transformer, follow that with a switching buck regulator, and finish up with a 7805. This completely misses the point of a switching power supply in a least two different ways: you still have the bulky 60 Hz magnetics, and you still have bad efficiency.

My suggestion would be that you take the steps that I outlined above.
Thu Dec 30 2010, 22:11:18
TL494 +5Vcc (by simon)
An orriginal suggestion from manufacturer
Fri Dec 31 2010, 09:49:07, download attachment TL494.pdf
(no subject) (by Bozidar)
If I put PIC board in metal box and then ground it, is it same as two layer board.
There is no snubber on contactors (coils and contacts).
In the machine there are around 10 contactors, they switch
24VDC, 220VAC for motors.
My idea is to make universal power supply which I can install in any machine and not to think about rewiring hole thing.
After TL494 there is low voltage AC signal running at 40KHz.
Sat Jan 1 2011, 09:25:58
(no subject) (by Jonathan Westhues)
A metal box isn't as good as a ground plane, but it's still probably okay.

A snubber on the relays and the contactors is advisable; otherwise, you probably have very high-voltage transients there. This would typically be an RC network, maybe a TVS or an MOV. If the problem is some kind of coupled noise, then that may fix it. You can test whether that's the problem as I outlined above.

Did you test with a battery for the power supply? If the problem is with the power supply, then that should quickly confirm; and if that's the case, then some filtering (more large electrolytic capacitance, maybe some series inductance) is likely to fix it.

If you have an oscilloscope, then you can measure your power supply voltage, and the voltage at the contactor outputs when the system switches. That should quickly show you what's going on.
Sat Jan 1 2011, 12:41:28
(no subject) (by Bozidar)
Thanks Jonathan.
With battery everything is OK!
Can You please suggest which capacitor and inductor to use and how to connect them.
Yes there are a lot of spikes which comes to PIC supply.
Sun Jan 2 2011, 04:46:53
(no subject) (by Jonathan Westhues)
From your unregulated DC rail (at the input to the 7805), perhaps a 470 uH inductor. Then from the other side of that inductor, perhaps a 47000 uF capacitor to ground. (Make sure that the capacitor is rated for the voltage across it, and the inductor is rated for the current through it, which is roughly equal to the current drawn by the load.) Then let the input voltage to the 7805 be the voltage across that cap.

Though any big cap that you happen to have lying around might work, and the inductor could be replaced with a resistance of around ten ohms, or with just a wire. There should also be some ceramic capacitance in parallel with your electrolytic, perhaps on the order of 1 uF.

What's the amplitude and width of the spikes on the power supply, with and without the filter?

Of course, the easiest thing to do would be to just buy a wall wart. Probably cheaper too, if you buy the switching kind, and smaller and more efficient.
Sun Jan 2 2011, 14:54:30
(no subject) (by Richard Herzberger)
I had a similar glitch show up on a circuit using a ULN2004 to switch a 5 volt relay which only required 80 ma. I also thought the internal diode in the ULN2004 was enough, it wasn't, I had to add a diode across the coil of the relay to stop the micro from resetting every time it turned on the relay.

Add a diode across the coil and it will help solve your problem.
Wed Feb 2 2011, 12:05:37
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):