Affordable PWM signal generator

*Split off from another thread

https://www.chiefdelphi.com/forums/showpost.php?p=1651597&postcount=23

https://www.chiefdelphi.com/forums/showpost.php?p=1651702&postcount=31

OK. Hooked it up to 4 used AA batteries. Works great.

The pot dial is kinda tiny. The pot is very smooth but has just a bit too much torque for such a tiny dial. I wonder how long it will last.

I may try removing the flimsy plastic “case” and Shoe Goo the guts to a small piece of oak to stabilize it. Then I can screw the oak down to a larger board when laying out a test setup.

I like this one:

https://www.amazon.com/GoolRC-Tester-Consistency-Helicopter-Airplane/dp/B00LTOD4F4

DIY

Our team has a few tester devices like these. They have two outputs, one for PWM and one for a spike relay. It’s neat little project to make your own. Our design doesn’t have a potentiometer, but is controlled by 10% increments with buttons. It’s actually a bit handy to be able to prototype with it and say “set it to exactly 70%,” and actually be able to know what it’s set to. There are 5 leds for -100% to 100% indication. They cost about $13 to build from scratch, but price was never really an issue for us. PM me if anyone wants more details.
https://goo.gl/photos/FxHSYWWJHSUJjgG99
https://lh4.googleusercontent.com/E30Xy9yjUZctT-Dk2jI0ie1QhalZnznRcA8Nr-_lzjY=w937-h623

Also a DIY option if you have an Arduino and a broken controller (we used an RC controller but a gamepad should work) of some kind sitting around: smrtswitch/smrtswitch/smrtswitch.ino at master · frc4646/smrtswitch · GitHub

Just did that this morning.

There are 2 chips: SS32 Schottky Barrier Rectifier and what appears to be a 556 (dual 555) timer chip.

The pot is supported by a metal bracket firmly solder into the PCB. Nice.









http://www.overclockers.com/pwm-fan-controller/

Should be a circuit like that.
Personally prefer using an Arduino with 4 AA batteries for the servo power.

What would it cost, including shipping, if you had to purchase one of each of those items? The 556 chip, 4 capacitors, 2 resistors, 2 diodes, potentiometer, stripboard, and PWM connector.

Personally prefer using an Arduino with 4 AA batteries for the servo power.

Personally I prefer driving a control pin on the LPT port of an old junker PC with a free version of TP7.

Rock-stable sub-microsecond accuracy and resolution of the pulse width with a large color user interface that lets you easily set up test profiles.

Agreed but at the cost in China and bought in large quantity it only makes sense. A 556 is easily cloned.

Personally I prefer driving a control pin on the LPT port of an old junker PC with a free version of TP7.

Rock-stable sub-microsecond accuracy and resolution of the pulse width with a large color user interface that lets you easily set up test profiles.

I agree with this - if you have that laying around and I surely do in my workspace - but not at the school.
Your work on this subject is still great by the way :).

One can get a Arduino UNO for less than $10 at MicroCenter.
A USB cable for a few dollars.
A 4 AA pack battery clip for $2.50.
If someone doesn’t want connectors on a ‘ProtoShield’ and all that jazz: it can be programming on most computers around with USB of any kind and sending PWM in minutes.

However - and there’s a catch - the output won’t be as clean as the signal from highly optimized code on a PC parallel port.

Last year I built a test fixture that uses an Arduino to output PWM to a Talon SR motor controller, and includes a meter for measuring volts / amps / watts.
We use it for testing motors and drivetrains, breaking in gearboxes, run-down testing of batteries (with a resistor bank), etc.

The Arduino code puts out very accurate PWM, and the 20-turn pot allows for dialing in a precise setting. It includes a USB output that allows you to log battery run-down data. The switch enables the output, and when the battery drops to 10.5v it disables the Talon SR and turns on a buzzer to alert the student to stop discharging the battery.

It has a standard battery connector on one side, and powerpoles on the output of the Talon SR. It is easy, quick, and self-contained for students to use.

See photos below.







By accurate do you mean the waveform is very square and clean?

and the 20-turn pot allows for dialing in a precise setting

Are you dialing in a precise pulse width setting, or a precise motor voltage setting? If the former, is there a digital pulse width readout somewhere?

By accurate, I mean the pulse width of the PWM signal to the Talon SR. The waveform was nice and square too, although that should not matter to the digital input port of the Talon SR.

I’m dialing in a precise pulse width setting, but I don’t have a separate display built on the box. (During development I wrote pulse width data to the USB port, and then later found it more useful to log voltage / current / time.) As it stands today, the students adjust the pot for either a current or desired motor speed. Then they monitor the motor current for changes.

The meter on the enclosure is a COTS wattmeter from Amazon that is capable of 100A. The meter always displays Voltage / Current / Power, but the “energy” reading is a bit awkward to use (since you have to press and hold the small pushbutton to reset it). the nice part is that gives you a watt-hour number to record when the buzzer sounds.

https://www.amazon.com/gp/product/B013PKYILS/

Not to be argumentative, but if you’re adjusting the pot based on the motor current or voltage or speed reading, you really don’t know how accurate or precise the resulting pulse width is.

I really like what you’ve created though. Seems very useful and well-thought-out !

Partially true, in that the user does not know exactly what pulse width has been selected via the 20-turn pot. They are observing the resulting drain from the battery as displayed by the meter. What I meant by precise and accurate is that once the pot is set (and read via the on-board A/D of the Arduino), the resulting PWM output to the Talon SR is precise and accurate.

If desired, the pulse width can be logged to the USB port, or an additional display could be added. Certainly if I were to make more, I’d make other improvements as well.

My goal was something useful for breaking in gearboxes and performing battery run-down tests.

What did you compare it to, to determine it is accurate? Did you measure with a high precision oscilloscope?

My goal was something useful for breaking in gearboxes and performing battery run-down tests.

I’d say you certainly succeeded. Nice job.

Yes, I used my HP Oscilloscope (named before the stupid Agilent / Keysight business).

If you want affordable:

There is probably better, but not likely cheaper…

Sorry Don. Nice try, but no cigar.