Hog barn ventilation controller

Discussion in 'Technical Repair' started by Eversr007, Jan 14, 2019.

  1. drc_567

    AAC Fanatic!

    Dec 29, 2008
    531
    74
    ... not trying to mislead you, but there could be a small ... maybe 1 uF decoupling capacitor across the microcontroller between V+ and ground pins. The decoupling capacitor will pass any spikish sort of voltage waveform to ground, and could make a difference. ... Just a 1uF non-polar capacitor would do the job. ... If you can look at the microcontroller voltage with a scope ... can't say for sure if anything would actually show up, since scope probes have built in capacitance that could influence the reading. ... Maybe just try a 1 uF non-polar capacitor between the micro-controller V+ pin and it's ground pin as an experiment.
     
  2. Eversr007

    Thread Starter Member

    Apr 10, 2016
    40
    2
    Ok I tested with capacitor and when it got done counting down it showed 1.5 milivolts with meter on ac. Will try the other capacitor also. I was thinking about buying a rigol Ds1054z oscilloscope. Would it help a lot in tracking stuff down like this.
     
  3. dendad

    Well-Known Member

    Feb 20, 2016
    2,278
    598
    1.5mV sounds like it is not switching so you will have to back track the reset circuit to see why it is held at 1.8V. I would expect 5V or close to 0V, not 1.8V.
    An oscilloscope is a real help when working on electronics. They are not called "truth Meters" for nothing.
     
  4. Eversr007

    Thread Starter Member

    Apr 10, 2016
    40
    2
    Yes I need to get one for sure. I wish manufactures would give out the dang schematics. These two boards and the box as a unit is. $1000-$1300. So its worth spending a little time. Ok so I have been tracing crap for a while and goes to a comparator. Just to try something I touched a jumper from 5 volt rail to pin 32 on microprocessor and it came on and worked fine. I unplugged it and plugged back in. It didn't come on by itself so I put 5 volts on the ouput line at the comparator that goes to the microprocessor and it came on again. I think it might be the comparator itself. I tried to draw the circuit on paper. I have 2.8 volts on the output 4 on the LM339N and need 5. The way I read the data sheet on the LM339N if voltage on 4in+ is greater than the voltage on 4in- it would go high. Im trying to understand this circuit. IMG_6614.jpg
     
  5. dendad

    Well-Known Member

    Feb 20, 2016
    2,278
    598
    Is SW5 the reset switch? What does it do if you push it?
    Can you post a good quality picture of the PCB underside? It does sound like the reset circuit is the problem. It probably is monitoring the power supply voltage and only allows the PIC to run when the supply stabilizes. Tracing the circuit can be hard, but a worth while skill to invest some time in.
     
  6. Eversr007

    Thread Starter Member

    Apr 10, 2016
    40
    2
    The SW5 controls secondary functions. Says on outside of box push to set. So would it be a lot easier to have a scope and look at voltages and clock signals to get a lot better idea of what is going on? I think I might order one tomorrow. The paper I drew is probably hard to follow but I'm pretty sure that is the whole circuit on pin 32. But what chip would lower the voltage? Does one of the chips go to ground and lowers voltage? All the electrolytic capacitors look new. He had sent this board to someone and it came back not repaired. Also what is X1, is that where the clock signal comes from? So I'm trying to figure out this circuit and google what each chip does and function. So that one particular circuit for the reset starts at the voltage regulator at 18V, goes to R16 which is channel 4 positive input on the LM339N comparator.
    Channel 4 output has positive feedback through R18, and the #4 output also goes to the octal D-type flip flop on pin #1 which is an Active low clear input. And from there it goes to microprocessor through R19 to pin #32 on controller. Top of R19 is linked to R20, R22, R8 and R66 and then to pins 24, 25, 26 on micro controller.
    pin# 24 RA2 is high voltage , high current, open drain input/output port

    pin #25 RA1/T0CKI can also be selected as an external interrupt input, and the interrupt can be configured to be on positive or negative edge. RA/TOCKl can also be selected to be the clock input to the Timer0 timer/counter

    pin #26 RA0/INT can also be selected as an external interrupt input. Interrupt can be configured to be on positive or negative edge.

    So on the LM339N comparator, if channel 4 in+ is 8.5V and channel 4 negative input is 3.6 shouldn't the output of channel 4 be high?
     
  7. Eversr007

    Thread Starter Member

    Apr 10, 2016
    40
    2
    Also here is a pic of the back side of the board. I had marked with a sharpie were stuff was and connected. I shined a flashlight behind board from both ways to make sure I saw every trace on that line
    IMG_6616.jpg
    Screen Shot 2019-01-20 at 9.50.18 PM.png
     
  8. Eversr007

    Thread Starter Member

    Apr 10, 2016
    40
    2
    I also tried this and still didn't work. I looked at board and C4 is a decoupling capacitor. I tried another but still nothing
     
  9. dendad

    Well-Known Member

    Feb 20, 2016
    2,278
    598
    Later tonight I will try to trace the reset circuit out if I can.
     
    Eversr007 and drc_567 like this.
  10. drc_567

    AAC Fanatic!

    Dec 29, 2008
    531
    74
    ... merely theorizing here ... shooting in the dark, so to speak, not being able to clearly see the actual circuit layout.
    ... Just wondering if the large black cylinder, described as an inductor, is being used as a filter choke or whether it is in some manner connected with the two SCRs operation. The relevant question is whether there is some sort of high voltage inductive voltage peak that may be a result of the inductor current being abruptly terminated ... similar to a spark plug ... resulting in subsequent damage to unprotected components like various ICs. If you can get a scope, then the thing to do, maybe, would be to try to observe any interesting events ... just probing around the circuit board, as the SCRs turn on and off. ... Trying to come up here with a plausible reason for the successive board failures.
    ... try cycling the board power switch on, then off, while observing the DC bus for voltage anomalies. ... who knows.

    ... even without a scope, it may be possible to determine if there is something different, not quite right, at the inductor coil. Put one voltmeter lead on one lead of the inductor coil, and the other meter lead on the opposite coil end. Then, see if you can somehow get a current to cycle through the inductor. .. Can't say if the inductor feeds the SCRs or exactly what it is connected to. Try cycling the board power on off, looking at the voltmeter reading.
     
    Last edited: Jan 21, 2019
  11. Eversr007

    Thread Starter Member

    Apr 10, 2016
    40
    2
    Ok so I got my scope in and hooked up. On the reset line that should be 0 or 5 volts it is way fuzzier that the circuit on the good board and half of the voltage. So that would be a bad cap somewhere right like you all suggested earlier. Should I start with the caps that are on that circuit and c11 at the voltage regulator? Or should I just replace every cap on the board?? Could a bad cap cause it to drop in voltage or do I have other problems too?
    Thanks
     
  12. dendad

    Well-Known Member

    Feb 20, 2016
    2,278
    598
    By "fuzzier" do you mean it is not a stable voltage?
    If it is noisy, that is your problem. Check the signals on the LM339 pins.
     
  13. oz93666

    Senior Member

    Sep 7, 2010
    300
    63
    Look at all this complicated circuitry just to keep some pigs from overheating !!!

    Keep it all simple ! ...circuitry will fail in challenging environments ... just get some 12v computer fans (they will run up to 18V with no problems ) and connect them directly to a 20V open circuit voltage solar panel ...put the panel on the roof right next to the fans ... when the sun shines the fans operate ...

    It won't keep the piggies at constant temp . but they'll be fine.
     
  14. Eversr007

    Thread Starter Member

    Apr 10, 2016
    40
    2
    Ok so I kept comparing voltage on scope with good and bad board and I guess the scope just makes things look worse than I thought. Looks like both 5 volt lines have noise on them. From best I can tell they are varying only about .2 volts. But I did stumble across that the rest pin that should be 5 volts have a restance to ground that is only 53 ohms. well I thought that would be enough to take the circuit below 5 volts. I did notice the other day it was a little lower on both sides of the voltage regulator. So I thought I would pull every capacitor on the 5 volt rail cause they are usually the first to short to ground. I pulled them and then all the chips that are connected even the eprom. So I think the only thing left are diodes and resistors. I used multimeter and checked diodes and they all seemed fine. Could a diode be barely shorted to ground ? And as far as resistors go don't they go open when they go out and not the other way around. Im about to give up on this thing. I want to fix it just to figure it out now. Thanks
     
  15. Eversr007

    Thread Starter Member

    Apr 10, 2016
    40
    2
    Ok so I got all of them fixed. The one had the eeprom was shorted but wasn't a dead short. It was enough to pull the 5 volt rail down. The other was a shorted out Microprocessor and bad Lm339. I finally found the bad processor but still didn't work until I changed the LM339. I didn't change any caps on it either. Thanks for all the input. Glad they are done......
     
    dendad and drc_567 like this.
Loading...