Let's Make Robots!

dual PWM test

Alright, so I'm just dabling with this stuff, but thought I'd see if I could create a small circuit that could split a pwm signal from a 08m/14m micro into a dual pwm output "for fine control of two motors". I wanted to control the output for each of the two channels even if the same pwm sig would be going to them, at least I could select which channel or channels would be on

This is the image of what it looks like. It has some fine tuning and I'll see about getting a schematic(thats not on a piece of paper).

dual pwm

It has a direct pwm input signal coming from the blue wire.

The red and yellow(the one on the right) wires are inputs that go high for each individual motor.

The black wire is used for testing of the led lights.

The yellow wire is an output wire that I was using to finetune the voltage.

The second output(where it says me) was what I was using for the base voltage since it was lower.

 The transistors are mps2222A npn's from radioshack, pretty cheap.

The pwm output I tested showed 1.12 to 4.85 volts with a +/- 0.02 volts variance between the two channels.not too bad, but we'll see how it affects the control....

 The yellow wire was used for some fine tuning/testing due to voltages being slightly off. The pot is used as a voltage splitter which allows for a finer control of the output voltages. I'll have to work on a better design that integrates the trim pots since as it is, this setup requires it . I'll figure something out later.

Testing of the setup at least from the outputs looks good. I need to get a motor driver to test how it will work with a dual motor setup.

I'm testing this with an 08m but this is meant to be used with a 14m as it has the 4 outputs, pwm out and a serial input that would be required for this to fully function(having variable speed reverse as well.).

So far this uses pins 1 and 4 for the channels switches and pin 2 for the pwm out signal. Pin 3 is slotted for serial input...though I recall some issue with it and serial com...I'll have to read up on it.

Let me know what ya folks think, good/bad, improvments...all that fun stuff.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
That is pretty smart thinking!
I don't understand what you've done. Scan that piece of paper with the schematic scribbled on it!

This is my attempt at using the eagle pcb/schematic app...and design something. Considering the first paper design didn't work as planned I had to do rework it on the breadboard.

jp1 is channel 1 out

jp2 is channel 2 out

jp3 pin 1 is ground for the led test leads.

jp3 pin 2 is the on/off for channel 2

jp3 pin 3 is the pwm signal input

jp4 is the on/off for channel 1

I may change r3 and r5 to 10 pots. repending on how this works out.



Surely this is a digital signal, and the exact voltages won't matter?  Or am I missing something?
You are correct, it is a digital signal, and measuring that frequency at the outputs, they both matched up. The voltages however did not match up which I was trying to correct most likely  at the wrong place or for the wrong reasons.  If this doesn't work, it'll be back to the books and drawing board.

I finally got the hbridge motor driver(sn754410) last night and was able to hook it up to my little device.

To my surprise, it worked as I had hoped...for the most part, but still there are some tests I need to do. I'll be working on ramping up the motor to full throttle, then bringing it down to a stop, set it to reverse then ramp that up. Should be a pretty cool test.

Alrighty, added some not so great video to this, but as you might be able to see, this is a 08m sending the pwm signal as well as the direction control for the motor to the circuit(described above).  As mentioned in the video info, it starts a ramp up them a ramp down, reverses direction and does a ramp up and down in that  direction.  simple test...