low duty cycle pwm help

Discussion in 'The Projects Forum' started by hashmaster, Oct 15, 2013.

  1. hashmaster

    Thread Starter Member

    May 30, 2012
    42
    0
    Ok so I am working on a little project to add lights to my rc car. I have a 3 channel Tx/Rx, channel 1 motor, xhannel 2 servo, channel3 un used. I planned on using channel 3 for the led's. On the Tx channel 3 is controlled by a switch, either on or off. When the switch is off channel 3 on the Rx has a frequency of about 60Hz and a duty cycle of about 11%, when the switch is on the duty cycle changes to about 6%. I have no way to change the percentage of the duty cycle so I need to work around it. First thought throw a not gate in there swit h everything around, but then it woux be 89and 94 precent. Theres no real gapbetween the duty cycles so I'm stuck. My ultimate goal is to be able to flip the switch and habe the lights either on or off, and I would like to isolate the led's from the main battery and run them from their own source so if mymain battery dies my car will still be lit upand easy un to find. Any thoughts?
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,123
    3,048
    You need to differentiate between the two duty cycle levels. One way would be to average the voltage, and compare the result to a reference with a comparator. The output could then switch your LEDs.
     
    GopherT and hashmaster like this.
  3. hashmaster

    Thread Starter Member

    May 30, 2012
    42
    0
    Ok so im stuck doing the comparator, I get a high output with the switch either on or off. Im using a rc of 27k ohms and 100 microfarads. It gives me an output voltage of 350mV when the switch is off and 190mV when on. The lag between the 2 voltages is less then a half a sec to switch between the two. I was trying to use a reference voltage of about 250mV and a 741 op amp, didnt work. then someone in an irc chat recommended using 2 op amps and two reference voltages, but no indication of what to make them so ive tried various reference voltages with no luck.
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,123
    3,048
    I think we need a schematic to go much further.

    Also I'd use a genuine comparator such as LM339.

    My guess is there is still too much ripple for the comparator to settle down and make a steady comparison.
     
    hashmaster likes this.
  5. hashmaster

    Thread Starter Member

    May 30, 2012
    42
    0
    Cant quite post schematics via my tablet, never been able to. I was using a 741because theres like 20 of them in my box. Although I did find a lm339n in my box. So ill switch to that. Someone said to u s e a lm393 comparator, which I dont have. Might be back aftera little googling.
     
  6. hashmaster

    Thread Starter Member

    May 30, 2012
    42
    0
    Ok here we go, used the non inverting with hysteresis, didnt have a 10M ohm resistor used 1Mohm this first attempt was off the schematics in the datasheet Edit:that first 16.5k ohm resistor in the rc circuit is supposed to be written as 26.5k ohms. Its a 27k ohm resistor that I metered for the rc circuit.
     
    Last edited: Oct 16, 2013
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    Post deleted
     
    Last edited: Oct 16, 2013
  8. wayneh

    Expert

    Sep 9, 2010
    12,123
    3,048
    Your reference voltage is 6.4/226.4 times the supply voltage. For a 741, that's probably too close to the negative power rail. The 741 has a useful range of 3V less than the supply voltage. (What is your supply?)

    Does the source of the PWM share a ground with the drawn circuit?

    [oops] Your drawing appears to be for the LM339? Ignore my comments about the 741. How is your circuit behaving? Can you meter the voltage on the input?
     
    Last edited: Oct 16, 2013
Loading...