Connect with us

PIC08 Circuit To Control 12v PC Fans

Discussion in 'General Electronics Discussion' started by Exceptional_Joe, Nov 27, 2012.

Scroll to continue with content
  1. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012
    Hi everyone, just looking for some help on an electronics project I'm doing at school. I'm making a PIC08 circuit which controls three 12v computer case fans using a Thermistor as an analogue input. However I discovered that the output voltage I'm getting from the PIC isn't high enough to actually start the fans so I'm having to change my plans slightly.

    I'm hoping to change the power supply of the circuit to 12v but use a voltage regulator to bring the voltage going into the PIC down to 4.5 (or 5) volts. However I'm having trouble finding a voltage regulator which has these specifications.

    Can anyone recommend what I should do? I will update this post with circuit diagrams later once I have time.

    EDIT: Here's the PCB I'm currently using. If possible I don't really want to have to make another.

    EDIT 2: Corrected - I am hoping to change the power supply to 12v then bring down the voltage with a regulator.
     

    Attached Files:

    Last edited by a moderator: Nov 27, 2012
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    10,810
    2,438
    Nov 17, 2011
    There is the 7805 or the LM317, for example.
    You will need a buffer stage to bring the output of the PIC to 12V. A simple transistor circuit is suitable (scroll down to "Connecting a transistor to the output from an IC")

    Harald
     
  3. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012
    Last edited: Nov 27, 2012
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    10,810
    2,438
    Nov 17, 2011
    That is right.
    You'll have to add filter capacitors right before and after the regulator, see the datasheet. Depending on the current you draw you may also need an additional heatsink. The regulator has an input-output differential voltage of 7V (12 V - 5V).
    For example: at a moderate 500mA this translates into 7*0.5 W = 3.5W which is converted to thermal enrgy. You need to get this energy away from the regulator otherwise it will overheat and can be destroyed.

    Your circuit probably needs much lesss current. You should know.

    Harald
     
  5. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    You could also use a 78L05, which comes in a TO92 case, like a transistor.

    Bob
     
  6. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012
    Thank you for your advice. How would I use a heatsink? Also if it makes a difference, the circuit will be inside of a computer which means it should in theory get some extra cooling.
     
  7. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012
    Thanks for your advice. Would this provide better heat dissipation? Or would it just be smaller?



    On a side note, can anyone see anything blatantly wrong with my original PCB drawing? I've breadboarded the circuit and it did work with 3v motors (like are seen on the drawing). However I have no way of knowing how the thermistor works, and what values to set my PIC program to.

    Thanks.
     
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,449
    2,809
    Jan 21, 2010
    It's just smaller (and can't handle as much power)
     
  9. Harald Kapp

    Harald Kapp Moderator Moderator

    10,810
    2,438
    Nov 17, 2011
    A heatsink is screwed onto the regulator. It may be required even within a PC case. It depends on the power dissipation which we do not know because we do not know how much current is drawn from the regulator.

    Harald
     
  10. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012

    Attached Files:

  11. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012
    Bump.
     
  12. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,449
    2,809
    Jan 21, 2010
    1) Placing a 9V battery in series with AA cells isn't the greatest idea.

    2) running power past the motors then to the PICAxe is a bad ides (the power supplies need decoupling)

    3) The PICaxe will have a fit if you give it 12V (actually it will probably just quietly die) OH, is that a 3 terminal regulator? You really should have an output cap (plus the decoupling mentioned above)
     
  13. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012
    Thank you for your advice.

    1) How could I replicate 12v using a battery?

    2) I have searched decoupling and this requires a capacitor? What type of capacitor would this be, and where would it be placed in the circuit?

    3) How do I put an output cap on a voltage regulator?

    Finally, would it be easier to have 2 circuits with 2 different power supplies and connect them with an opto-isolator?
     
  14. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,449
    2,809
    Jan 21, 2010
    1) Using 10 AA cells is a good approach.

    2) In your case it is an input capacitor for the regulator. It would also be valuable to run a separate track from the power input to the regulator. Placing a diode between the battery and the regulator (before the input capacitor) would be useful.

    3) Look at the datasheet for the regulator. It will almost certainly describe exactly how to do it.
     
  15. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012
    1) Using 10 AA cells sounds like a better idea then, thank you.

    2) I've added a different track running to the voltage regulator, and I've also added an input capacitor with a diode before it (placed the right way, I hope). I've added an image of my updated PCB design below: is this what you meant?

    3) I've taken a quick look at the data sheet and I can't find anything about output caps. Surely the regulator will cap itself? At 10v input, it says that the minumum output is 4.8v and maximum is 5.2v. I'm not sure if this will change as I'm using 12v?
    Here's the datasheet: http://html.alldatasheet.com/html-pdf/100156/ETC/TS7805CZ/116/2/TS7805CZ.html

    I also have a new problem: on the data sheet it mentions something about linking all of the pins of the voltage regulator to the same negative rail. I've added a diagram below from the data sheet to explain what it means, but do I have to do this?

    Thanks.
     

    Attached Files:

  16. davenn

    davenn Moderator

    13,721
    1,913
    Sep 5, 2009

    seriously ? ;)

    the first page shows the input and output capacitors :)
    as does your reproduction of it above

    Dave
     
    Last edited: Dec 18, 2012
  17. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012

    OH. How stupid of me! I thought 'caps' was about capping the output voltage, not capacitor!

    Thanks for your help :p So can anyone see any problems with my circuit?
     
    Last edited: Dec 18, 2012
  18. Exceptional_Joe

    Exceptional_Joe

    11
    0
    Nov 27, 2012
    Programming Thermistor As Input For PIC08

    This thread follows on from a previous thread regarding a project I'm doing to make an automated PC Fan Controller. The original thead can be found here: https://www.electronicspoint.com/pic08-circuit-control-12v-pc-fans-t254710.html

    I am wondering about the values when programming the Thermistor as an input. I would like the fans (all 3 of them) to be activated when the internal PC case temperature is above 35 degrees (for example - I haven't decided on exact temps yet). However, I have no idea what this temperature would be in terms of resistor values or in terms of PIC values.

    I will include screenshots of my initial plans for the programme below.


    As you can see on the image, it says "b0>10" and "b0>140" it is these values that I am confused about. What do these values (10 and 140 in this example) mean in terms of real world temperature or resistance?


    Thanks in advance.
     

    Attached Files:

  19. Harald Kapp

    Harald Kapp Moderator Moderator

    10,810
    2,438
    Nov 17, 2011
    Please stay in one thread for one topic. I therefore merged these threads.

    The "real world" resistance of the thermistor you will find in the thermistor's datasheet. What this means in volts at the ADC-input requires that you show us a schematic (not the topography of your layout, as above).
    What that voltage means in terms of ADC output values depends on the reference voltage used and the operating mode of the ADC. Someone more familiar with the PIC controllers than I am should be able to answer that off the cuff.
     
  20. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,449
    2,809
    Jan 21, 2010
    All you can say with any sort of certainty is that the temperature when the reading is 10 is different from when the reading is 140.

    The ADC probably has a range of 0 to 255 (that's 8 bits). This (typically) corresponds to 0 to 5V at the input pin of the chip.

    Depending on your circuit, and the type of thermistor, a count of 10 may indicate a
    high or a low temperature. My guess is that it indicates a high temperature. The Yes and No are backwards on the b >10 test (or the test should be b < 10).

    There are several ways to determine the correct values to use.

    One is to look at the datasheet for the thermistor and figure out the resistance, then use that to determine the voltage reaching the chip, then use that to determine what the ADC would return (and this is close to the correct way).

    The other way is to connect it all up, run a program that reports the ADC value (you can do that in the Picaxe development environment) and after verifying that the count goes up and down with changing temperature, you can subject the thermistor to the temperatures you wish it to switch at, and read the ADC value reported.

    Typically the second method requires hot air (or hot water and insulation for the thermistor) and a thermometer to determine the actual temperature (if that is important)
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-