Thank you to the guys at HEGE supporting Badcaps [ HEGE ] [ HEGE DEX Chart ]

Announcement

Collapse
No announcement yet.

I need to make a fan controller.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    Re: I need to make a fan controller.

    Originally posted by Mad_Professor View Post
    Ok so I'm working in tinycad since veecad needs a netlist to place components.

    Anyways I just realized something, do I need to have digital outputs for each set *1k>tip120>fan* that say PWM on the arduino pin out or can I use one PWM output to control the 5 transistors?
    If I can't then can I use any pin that says digital I/O?

    http://arduino.cc/it/Hacking/PinMapping168

    This left side of the chip and place the chip to the right on the board.
    I was going to use,
    digital I/O PWM pin 3/actual: pin 5 on chip
    digital I/O PWM pin 4/actual: pin 6 on chip
    digital I/O PWM pin 5/actual: pin 11 on chip
    digital I/O PWM pin 6/actual: pin 12 on chip

    I want to use
    Digital I/O pin 7/actual: pin 13 on chip
    But it doesn't say PWM. I don't know if I can use it as PWM connection.

    I was going to put the pot on the right side of the board too and connect it to where it says analog PC0.

    Then below the chip put my DAPA header and run the lines to the right side of the chip.
    Then the left side can be used for tip120, diodes and resistors and headers.
    It has been a while since I checked out this thread. I say the easiest and most flexible way of achieving what you want is to connect each transistor to a PWM output. In theory, one could power all five transistors from one PWM output. However I doubt that the current output from the microcontroller will be able to power five transistors. Therefore you will probably need another transistor to provide the extra power required to energise all five transistors at once from a single microcontroller output.

    I would suggest to use the same PWM outputs as the Arduino. That way it is much easier to program using 'their' language. Not all Digital I/O pins can be configured for PWM use. Only one or two ports on the microcontroller will support PWM output. From memory, there are more PWM pins than what the Arduino's provide on their boards (this would have to be confirmed by checking the datasheet for the ATMega168), however if you use these pins, it will be difficult to make use of the Arduino C like language and their hardware libraries. On top of that, perhaps those extra PWM outputs are required for other purposes such as ICSP programming.

    For the software side of things, I tried a fair few free products and found them all to be quite difficult to use (to design stripboard layouts). I found Lochmaster very good and intuitive for stripboard design. Unfortunately you can not design a schematic in it. Therefore you have to verify your layout against your schematic manually. For your circuit, it should be pretty simple. However it would be a problem for complex circuits, however stripboard is not that effective for complex circuits so it's unlikely to be used for such complex designs.

    Comment


      #62
      Re: I need to make a fan controller.

      Got the parts today. Its on a breadboard. When I was putting it together I realized I made some errors in my schematics.

      My inductor was on the wrong pin, needed to be on AVCC. My 10k resistor for reset was connected to ground.

      Wrote some code but I don't know what board to compile for.
      Not to be vague but under tools > boards > ??
      Code:
      int fan1= 5;
      
      
      int fan1val = 0;
      int pot1 = 0;
      
      void setup() {}
      
      
      
      void loop() {
      fan1val = analogRead(pot1);
      fan1val = fan1val / 4;
      
      analogWrite(fan1, fan1val);
      }
      Tomorrow I'm going to get my old p3b-f board and load XP or linux, whatever I feel like using and hack up a parallel cable and make an attempt to load this sketch on to the chip.

      Also can someone double check and verify my breadboard setup, I don't want to fry something but I think it's correct.
      Attached Files

      Comment


        #63
        Re: I need to make a fan controller.

        For a basic one like that I think Arduino NG
        "Tantalum for the brave, Solid Aluminium for the wise, Wet Electrolytic for the adventurous"
        -David VanHorn

        Comment


          #64
          Re: I need to make a fan controller.

          Originally posted by Agent24 View Post
          For a basic one like that I think Arduino NG
          It looks like I can set the fuses through Arduino.

          I just copied and paste the section from NG w/Atmega168, and changed whatever I need.

          This is a snippet from boards.txt

          Code:
          atmega168.name=MYBOARD w/ ATmega168
          
          atmega168.upload.protocol=Parallel Programmer
          atmega168.upload.maximum_size=14336
          atmega168.upload.speed=19200
          
          atmega168.bootloader.low_fuses=0xe2
          atmega168.bootloader.high_fuses=0xdf
          atmega168.bootloader.extended_fuses=0xf9
          atmega168.bootloader.path=atmega
          atmega168.bootloader.file=ATmegaBOOT_168_ng.hex
          atmega168.bootloader.unlock_bits=0x3F
          atmega168.bootloader.lock_bits=0x0F
          
          atmega168.build.mcu=atmega168
          atmega168.build.f_cpu=16000000L
          atmega168.build.core=arduino
          atmega168.build.variant=standard
          EDIT:
          Remind me to NEVER BUY this again.

          http://search.digikey.com/us/en/prod...0982-ND/698225

          I can't get the fucking metal contacts out so I can hook up my wires to them.

          Worthless piece of shit.
          Last edited by Mad_Professor; 02-18-2012, 03:34 PM.

          Comment


            #65
            Re: I need to make a fan controller.

            There should be a piece of metal sticking out from the side of the contact that clicks into place in a hole in the plastic header.

            Just push this down with a pin or stiff wire and then push towards the opening. Or you can probably grab the other end with needle-nose pliers, or stick another piece of wire in through the bottom to push the contact out.
            "Tantalum for the brave, Solid Aluminium for the wise, Wet Electrolytic for the adventurous"
            -David VanHorn

            Comment


              #66
              Re: I need to make a fan controller.

              Originally posted by Agent24 View Post
              There should be a piece of metal sticking out from the side of the contact that clicks into place in a hole in the plastic header.

              Just push this down with a pin or stiff wire and then push towards the opening. Or you can probably grab the other end with needle-nose pliers, or stick another piece of wire in through the bottom to push the contact out.
              Yeah the metal slides on the side yeah I push those down it did not slide I attack from the top with pliers and damaged one of the contacts. I give up, I'll wired directly to the breadboard.

              Comment


                #67
                Re: I need to make a fan controller.

                Odd, it must be a different type of connector to what I am thinking of then, it might need a special insertion tool or something.
                "Tantalum for the brave, Solid Aluminium for the wise, Wet Electrolytic for the adventurous"
                -David VanHorn

                Comment


                  #68
                  Re: I need to make a fan controller.

                  Originally posted by Agent24 View Post
                  Odd, it must be a different type of connector to what I am thinking of then, it might need a special insertion tool or something.
                  I managed to get them out, but I had to use an ice pick and lot of pressure to get them out.

                  Comment


                    #69
                    Re: I need to make a fan controller.

                    IT WORKS!

                    I'm still having problems with the arduino software but the controller works as planned. Also I just realized I got the wrong voltage regulator, I got one with input 7v-35 instead of 0-35v Oh well I'll just stick it on the 12v anyway.

                    The problem I'm having with arduino software is when I made a board in boards.txt and tried to use the upload button but it spits out an error stating that it could not open port com 1 because com 1 is not a valid port for dapa it needs to be lpt1,2, or 3. But I can't find the setting to specify it.

                    I work around it using the upload via programmer option in the file menu.

                    This is pretty sweet.
                    Attached Files
                    Last edited by Mad_Professor; 02-19-2012, 02:33 AM.

                    Comment


                      #70
                      Re: I need to make a fan controller.

                      Upload is designed to upload through the serial port and the bootloader. If you don't have these in your circuit you must use upload via programmer. So that's not an error, it's by design.

                      Good to hear it goes!
                      "Tantalum for the brave, Solid Aluminium for the wise, Wet Electrolytic for the adventurous"
                      -David VanHorn

                      Comment


                        #71
                        Re: I need to make a fan controller.

                        What's the max amperage for 23 awg wire? I plan on running two wires, one for ground, one for 12v to the first tip120 header then daisy chain from there?
                        But not sure if 23 gauge is safe for a 5 fan load? The wire came out of short piece of cat6 cable I had laying around.

                        Comment


                          #72
                          Re: I need to make a fan controller.

                          See http://www.powerstream.com/Wire_Size.htm

                          It will do 5A easily, 7-8 amps with some heating up. But why daisychain... don't think that's best.
                          Last edited by mariushm; 02-19-2012, 08:43 AM.

                          Comment


                            #73
                            Re: I need to make a fan controller.

                            Originally posted by mariushm View Post
                            See http://www.powerstream.com/Wire_Size.htm

                            It will do 5A easily, 7-8 amps with some heating up. But why daisychain... don't think that's best.
                            Because having 10 wires going back to the molex connector is messy.

                            Comment


                              #74
                              Re: I need to make a fan controller.

                              Originally posted by Mad_Professor View Post
                              IT WORKS!

                              I'm still having problems with the arduino software but the controller works as planned. Also I just realized I got the wrong voltage regulator, I got one with input 7v-35 instead of 0-35v Oh well I'll just stick it on the 12v anyway.

                              The problem I'm having with arduino software is when I made a board in boards.txt and tried to use the upload button but it spits out an error stating that it could not open port com 1 because com 1 is not a valid port for dapa it needs to be lpt1,2, or 3. But I can't find the setting to specify it.

                              I work around it using the upload via programmer option in the file menu.

                              This is pretty sweet.
                              Pretty good that it worked first time.
                              Congratulations.

                              Now onto making a more permanent solution with five fan outputs.

                              Originally posted by Mad_Professor
                              Upload is designed to upload through the serial port and the bootloader. If you don't have these in your circuit you must use upload via programmer. So that's not an error, it's by design.

                              Good to hear it goes!
                              In one of my previous posts, it explains how to add another 'board' in board.txt file to use a programmer to upload a program to the controller. However the blog entry may have been a bit old and outdated.

                              I can't seem to find any upload via programmer option. Maybe it is because I don't have a USB connected programmer and my laptop does not have a parallel port.

                              Comment


                                #75
                                Re: I need to make a fan controller.

                                Originally posted by shadow View Post
                                I can't seem to find any upload via programmer option. Maybe it is because I don't have a USB connected programmer and my laptop does not have a parallel port.
                                Maybe, but do you have the latest version of Arduino IDE as well?
                                "Tantalum for the brave, Solid Aluminium for the wise, Wet Electrolytic for the adventurous"
                                -David VanHorn

                                Comment


                                  #76
                                  Re: I need to make a fan controller.

                                  Originally posted by Agent24 View Post
                                  Maybe, but do you have the latest version of Arduino IDE as well?
                                  That could be it as well.

                                  Comment


                                    #77
                                    Re: I need to make a fan controller.

                                    It is done! Fresh out of the oven!

                                    I shall call you FRANKENSTEIN!!!
                                    Attached Files
                                    Last edited by Mad_Professor; 02-20-2012, 08:13 AM.

                                    Comment


                                      #78
                                      Re: I need to make a fan controller.

                                      Good work. Looks nice.
                                      sigpic

                                      (Insert witty quote here)

                                      Comment


                                        #79
                                        Re: I need to make a fan controller.

                                        Powering up your circuit on a conductive anti-static bag probably isn't the best idea.
                                        "Tantalum for the brave, Solid Aluminium for the wise, Wet Electrolytic for the adventurous"
                                        -David VanHorn

                                        Comment


                                          #80
                                          Re: I need to make a fan controller.

                                          Originally posted by Agent24 View Post
                                          Powering up your circuit on a conductive anti-static bag probably isn't the best idea.
                                          scotch taped the bottom. But that's funny, I've put motherboards and other stuff on anti-static bags, never had a problem.


                                          Didn't know those were conductive.

                                          Comment

                                          Working...
                                          X