Connect with us

Decoding PWM

Discussion in 'General Electronics Discussion' started by Joosh, Mar 18, 2017.

  1. Joosh

    Joosh

    14
    0
    Feb 25, 2017
    Hi

    Looking for some help from anyone that has experience with this, any useful info or even a ready made alternative. I am in the process of building a robot and require a higher than normal current DC motor driver. As these are quite expensive to buy I want to have a go at building one.

    Basically I have a spektrum receiver that runs on 5-6V and outputs a PWM at 22ms, 1ms to 2ms, 1.5ms in 'neutral'.

    What I would like to do is turn this in to a useful signal to drive h bridge transistors. Ideally by using cheap components (no arduino etc) and for it to be reliable.

    I am wondering if there is a way to monitor the signal then output it in a PWM voltage that could operate PNP or NPN transistors depending on the input.

    For example:
    Receiver in 'forward': PWM 1.51-2ms ~3.5V
    -> 0 to 100% duty PWM at 5v.

    Receiver in neutral: PWM 1.5ms ~3.4V
    -> 0 % duty.

    Receiver in 'reverse': PWM 1-1.49ms ~3.3V
    -> 0 to 100% duty PWM at -5v.

    I am thinking some sort of timing op amp circuit?

    Any thoughts from the more electronic savy or should I just start saving up my money for a proper driver? Lol.

    Josh
     
  2. Bluejets

    Bluejets

    3,517
    713
    Oct 5, 2014
    Different signal.
    Not what you think. RC signal is a span over 20ms.
     
  3. Alec_t

    Alec_t

    2,693
    712
    Jul 7, 2015
    If you are trying to control the speed of a powerful motor by PWM then your PWM frequency will need to be much greater than the 50Hz (20mS period) RC signal. Also, you will be increasing the duty cycle range from the present RC 7.5%-12.5% to a 0%-100% range. Those are not trivial tasks. Doing them without the use of a microcontroller (Arduino or other) would not be simple or cheap and would take a lot more than a "timing opamp circuit". How are your programming skills?
     
  4. BobK

    BobK

    7,642
    1,662
    Jan 5, 2010
    Alec,

    He is not trying to control the speed, just the direction via a remote that is intended to drive a servo. Simply running forward if the pulse width is > 1.5 and backward if < 1.5 and stopped if nearly 1.5.

    What you need is an integrator and a window comparator. On the falling edge of the signal the outputs of the comparator would be latched and would then control the motor direction until the next pulse is seen.

    Bob
     
  5. Alec_t

    Alec_t

    2,693
    712
    Jul 7, 2015
    Maybe. So why the reference to 0-100% duty cycle PWM?
     
  6. BobK

    BobK

    7,642
    1,662
    Jan 5, 2010
    On rereading, I think you are right.

    Much more complicated now. Only a microcontroller would make it easy.

    Bob
     
  7. Joosh

    Joosh

    14
    0
    Feb 25, 2017
    Hi

    Thanks for your replies and input, appreciated. What I listed was best case. One speed may effect the handling too much for it to be used. Could possibly get away with two speed.

    After having a look in to window comparators they seem feasible with a bit of logic, however the PWM frequency issue...

    The motors are 24V, the common type you would see on wheelchairs. If you are sure the 22ms PWM is not enough to run the motors smoothly, then I will have to invest in a shiny new microcontroller and find some good tutorials!

    Josh
     
  8. BobK

    BobK

    7,642
    1,662
    Jan 5, 2010
    Easier would be to use a remote that was not designed for something completely different.

    Bob
     
  9. Alec_t

    Alec_t

    2,693
    712
    Jul 7, 2015
    22mS is not enough. The motor would buzz horribly at ~50Hz. From what I see online the typical PWM frequency for a motor of that sort is >1kHz.
     
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

-