+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Newbie level 3
    Points: 193, Level: 2

    Join Date
    Jan 2012
    Posts
    4
    Helped
    0 / 0
    Points
    193
    Level
    2

    Newbie: Need to convert a pulse to flat

    Hello everyone,

    I am new to electronics. I am using a variation of an arduino board.

    I have an LED that is refreshed constantly (I can control the rate in my program,lets say 1000 times a second). Instead of having the LED on or off, it is turned on and off 1000 times a second. of course it looks like it is on to human eye.

    I want to drive a fan when the LED is on (well, looks on). Using a transistor (PN2222) and a power supply I tried to connect the legs of LED to the fan with no luck. I am almost sure it doesn't work because the power to LED is cut of 1000 times a second.

    Is there any electronic component that I can use to flatten this pulse of power?

    •   AltAdvertisment

        
       

  2. #2
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2357 / 2357
    Points
    69,512
    Level
    64
    Blog Entries
    4

    Re: Newbie: Need to convert a pulse to flat

    After reading your post, it appears you are attempting to implement a DC motor control using what is referred to as Pulse Width Modulation (PWM).

    Although it is not clear from your post, the purpose of the LED in the DC motor control circuit.

    Are you attempting to create a visual feedback with the LED intensity as a reference to the DC motor speed?


    The principle behind PWM DC Motor Control is by maintaining a set frequency, while varying the duty cycle of the square wave you can effectively control the speed of a DC motor.

    Obviously a duty cycle of 100% is in effect a study voltage, equivalent to the peak voltage of the square wave.

    As you decrease the duty cycle the delivered average voltage drops until you finally reach a duty cycle of 0%.

    For unidirectional control, a transistor or Darlington transistor can be utilized. However, for bidirectional control an H-Bridge, like a L298D, is commonly employed.

    The appropriate device required to drive a DC motor, is largely dependent on the specifications and requires of the DC Motor being driven.

    Whenever you drive a device with an inductor/coil you should ensure there is protective circuitry to protect against Back EMF from the coils magnetic field collapsing, like a diode across the motor terminals and make sure you are have an appropriate base resistor in place.

    Simple Transistor DC Motor Driver Schematic:




    Here are a few projects you might find of interest using Arduino and PWM:

    Using PWM outputs with an Arduino and a LED

    High-Power Control: Arduino + TIP120 Transistor

    Tutorial 5 for Arduino: Motors and Transistors

    Arduino controlling fan or motor speed with PWM

    Arduino Programming Part 3

    DC motor control with a SN754410 motor driver IC and the Arduino board

    Arduino’s AnalogWrite – Converting PWM to a Voltage

    Secrets of Arduino PWM

    Arduino Motor Shield

    Arduino H-Bridge DC Motor Control



    If you post your code and a schematic of your circuit, I maybe able to assist you further.

    Hope the info helps in your endeavors,

    BigDog



    •   AltAdvertisment

        
       

  3. #3
    Administrator
    Points: 38,245, Level: 47
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    alexan_e's Avatar
    Join Date
    Mar 2008
    Location
    Greece
    Posts
    11,893
    Helped
    2093 / 2093
    Points
    38,245
    Level
    47
    Blog Entries
    6

    Re: Newbie: Need to convert a pulse to flat

    Please don't make requests for help in private using PM. Create a thread in the forum so that other members can benefit from the posted answers.

    Consider reading this before posting : How To Ask Questions The Smart Way



    •   AltAdvertisment

        
       

  4. #4
    Newbie level 3
    Points: 193, Level: 2

    Join Date
    Jan 2012
    Posts
    4
    Helped
    0 / 0
    Points
    193
    Level
    2

    Re: Newbie: Need to convert a pulse to flat

    thank you guys for the reply. There are lots to learn.

    I tell you about our project.

    I am trying to get 120 digital outs. The pins are connected to 120 DC motors (fans), a series of fans pushing air in and out of 120 inflatable pillows. The fan motors are not reversible so the work around is to use two fans stacked on top of each other in different directions and toggle between the two fans to inflate and deflate the pillows. Also each motor needs to be addressed individually.

    The idea was to work with Peggy (Peggy 2 Light Emitting Pegboard kit) to get enough outputs, and with the existing library we would be able to use the patterns and examples that are available to start with.

    Basically I was after a mega-mega arduino.

    I assembled the board (Peggy2LE) and soldered the LEDs but legs their leg long enough to be able to connect a wire to it. Then I ran the wirs to a 1k resistor and a transistor (PN2220) that should turn on a fan (12v ,0.4ma). Using a 12v power source and the transistor I wish to turn the a fan on when an LED turns on.

    I am very new to electronics. I read the articles you sent me but still not quite suite what to do? do I need a capacitor?

    Any suggestions on how to do this?

    p.s. what software do you use to draw schemetics?



  5. #5
    Super Moderator
    Points: 255,216, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,468
    Helped
    13547 / 13547
    Points
    255,216
    Level
    100

    Re: Newbie: Need to convert a pulse to flat

    In my view, you would want to apply a DC voltage to each fan motor to make it run at full speed. Any multiplexing logic should be placed before the motor driver, but not feed a pulsed voltage to the motor itself.

    For the driver transistor selection, you need to know the fan motor specification, nominal voltage and maximal current consumption.

    I think, that the output interface can be most simply implemented by a single 120 bit shift register chain, preferably using standard serial-in/parallel-out devices like cd4094, 74HC595 etc. It should be able to update the outputs in less than a millisecond.



--[[ ]]--