3
\$\begingroup\$

I am performing some experiments to drive n different inductive loads using the following circuit based on the PIC16F690.

The Power Supply part:

enter image description here

  • 12VAC and 24VAC come from the same power transformer. Regulator is 7805.
  • VSS and GND are common Grounds.

The control part:

enter image description here

  • A PIC16F690 with a Darlington array and a Schmitt trigger inverter are used to drive n inductive loads (Contactors CTC 1 ... CTC n).

  • The 24VDC relay is used with an external AC Contactor to switch a 400VAC 3Ph Motor

  • **The PIC and Schmitt trigger Vdd and Vss pins are not shown here due to Proteus limitation, same for the ULN2804 GND PIN ** however i included additional 100nf ceramic capacitors between Vdd and Vss for both of them with the minimum leads possible.

The inductive load part:

enter image description here

  • The above circuit apply for each Out1 ... Out n output in the ULN2804 to drive multiple inductive loads.

Notice that all the circuit shown to you here are in the same single face PCB.

Problem encountered:

After burning the circuit in a single face PCB i faced no problems and everything was working as expected until i realize that if i switch the Power supply OFF then ON the PIC won't starts and looks like blocked until i perform a hard reset using the MCLR button (sometimes i need to push the button multiple times !) after that the PIC get back to life, and everything return to normal.

I use the following FUSES XT,PUT,WDT,NOPROTECT,BROWNOUT,MCLR

What i did try so far:

  • Trying different type and values of capacitors near the PIC VDD/VSS and 7805 power regulator as i suspected a bad decoupling but without success.

  • I found out that when i switch the power OFF then ON before the Capacitors in the circuit discharge (last about 1 second), the PIC work without problem at the first shoot.

  • I found out too that when using the PIC in the same PCB to flash only some LEDs using some sensors or Potentiometers, everything is fine, however, if i switch one inductive load or a relay, the problem shows again.

As I'm only a hobbyist and printing PCBs is expensive in my region, i really need your help to find out what is wrong to avoid such problems in future. I'm curious to know what is the cause of the problem. Can anyone tell me what could be wrong here, please?

Thanks in advance.

\$\endgroup\$
  • \$\begingroup\$ What have you done with pin 9 on U1? It should go to GND. Why are you using BDX54s? ULN2804 will drive up to 500mA up to 50v. ULN2803 would be better for PIC, lower voltage input. Pin 10 should go to +24v \$\endgroup\$ – Neil_UK Nov 3 '15 at 21:55
  • \$\begingroup\$ PIN9 goes to Ground, not shown here due to Proteus limitation, sorry i forgot to precise that. I use BDX54 to get hight current output to drive loads up to 6A. You are right about Pin10 i should use it. For ULN2803 i thought they are the same, i will give it a try. Thanks \$\endgroup\$ – Vander_kw Nov 4 '15 at 10:13
2
\$\begingroup\$

There is so much messed up in the schematics, that it's pointless to read the words and delve into this more deeply. Fix the obvious things first, then come back.

  1. What voltage is Vdd supposed to be in the top left schematic?
  2. What regulator is being used in the top left schematic?
  3. Is that regulator really OK with just a electrolytic cap on the input? It probably wants something with low ESR. The electrolytic may be fine for bulk storage between power line cycles, but there should probably be a 10 µF ceramic right in front of the regulator in addition.
  4. The full wave bridge in the top right schematic is hooked up wrong. It will short the AC every other half-cycle. The transformer will get quite warm or the diodes will blow out.
  5. I can't even begin to guess what you think D19 is supposed to accomplish.
  6. 24 VAC (assuming sine) full wave rectified is going to be more than 24 V DC, even accounting for two diode drops in a correctly connected full wave bridge.
  7. You forgot to connect power to the PIC. It's not going to run without power. This really should be obvious.
  8. A 1N4001 is not a good choice for the flyback catch diode for the relay coil, although it will probably work OK in this case if you don't try to turn the relay on again shortly after having turned it off.
\$\endgroup\$
  • \$\begingroup\$ 1/ 5V 2/ 7805. Fixed in the schematic. 3/ I already looked for ceramic capacitors of order of µF but the highest value i can find in local stores in my region is not more than 100nF Ceramic, in µF order there is only electrolytic caps, and there isn't on line shopping service. 4/ Oups, sorry, i didn't notice that, it happened when i cleaned the schematics for publication here, in the PCB is hooked up in the right way. \$\endgroup\$ – Vander_kw Nov 4 '15 at 10:01
  • \$\begingroup\$ 5/ Thought it will help, i will remove it. 6/ Yes, but the load is tolerant to the input voltage, i use contactors. 7/ I precise in my post that due to Proteus limitation, i couldn't show those Pins, but they exist in the PCB and they have a 100nF ceramic capacitors between them and with the shortest leads. 8/ Any advice for a replacement is welcome, as i want to experiment many options with this PCB. Hope this clarified my problem. Thanks for your time. \$\endgroup\$ – Vander_kw Nov 4 '15 at 10:01
1
\$\begingroup\$

1) your power supply looks suspicious.

Are your 12 Vac & 24 Vac connections from the power transformer two separate windings (4 wires) or is this a 24 Vac winding with a center-tap?

If your transformer IS a single 24 Vac winding with center-tap, the power supply will most likely burn up. Draw the full schematic, showing the individual diodes in the bridge rectifiers to see why this would happen.

2) Pin 9 of the darlington driver chip should go to Ground (Vss).

3) If you connect pin 10 of the Darlington driver chip to the +24V rail, you can eliminate the clamp diodes across each relay coil. Note that diode D6 isn't doing anything useful in your circuit.

4) PIC microcontroller chips can have lock-up problems if the chip Vdd does NOT go all the way to 0V when power is removed. Try this: power down your circuit, place a 100R resistor across Vdd & Vss for a few seconds, then reapply power and see if the PIC starts properly. If it does, you then need to add proper power supply control for the PIC. This can be a dedicated reset controller chip.

\$\endgroup\$
  • \$\begingroup\$ 1/ Power comes from a secondary of a transformer with 9VAC,12VAC,24VAC outputs sharing the same Neutral, so 4 wires enter the PCB, 12VAC and Neutral then 24VAC and Neutral. I corrected the Bridge layout for the 24VDC, sorry for my mistake,happened during arrangement of the schematic prior to publication here, it is placed correctly in the PCB. \$\endgroup\$ – Vander_kw Nov 4 '15 at 10:06
  • \$\begingroup\$ 2/ It is, PIN9 goes to Ground, not shown here due to Proteus limitation, sorry i forgot to precise that. 3/ You are right, i was very careful. 4/ Tried what you recommended with a 100R resistor for 10 seconds without success, the problem stills here. \$\endgroup\$ – Vander_kw Nov 4 '15 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.