Electronic – Slowly ramp up the PWM duty cycle with a 555

analogne555pwmsquare

I have a PWM signal being generated by a 555 timer and that is fed into a ESC for an electric skateboard.

My problem is that the PWM signal duty cycle can go from 5% to 95% in a fraction of a second.

I need a way to slowly increase the duty cycle but I don't want to used any sort of microcontrolers (arduino, pic, fpga). I want to be able to turn the throttle to max and have the the speed slow increase.

Best Answer

Don't.

You can probably do something like that with a very clever combination of 555s, analog filters, extensive measurements, adding analog security measures etc. I haven't fully read Bollock's answer, but I think it nicely illustrates how much knowledge and effectively, trial and error, you'd have to put into a 555-based design. The answer doesn't even scratch real-world trouble you'll enjoy, like component tolerances (especially for larger capacitors) and the resulting behavioral deviations, potential feedback loops, and all that stuff.

It's not worth it. What you describe is the classical use case of microcontrollers, and you already seem to know that. So leave that microcontroller fear behind; any ARM chip or especially Arduino will do what you want for a fraction of the effort and cost of what you're planning to do in analog. ARM eval boards start at below 5€ (this, for example, but I'd recommend you use anything that supports mbed, so these; you're probably best off price/benefit/size-wise using something like this board).

It's really not that hard to program a microcontroller, and I firmly believe in using the right tools for the job. And adjustable PWM is a job for a microcontroller. It also makes it possible to do "smart" things like allowing for emergency breaking with a higher PWM change rate, and also, any microcontroller PWM unit that I know can do 0%–100% duty cycle, not only 5%–95%. Later on, you can combine that with things like battery temperature supervision, that can throttle your motor if the batteries get too hot (that's actually a pretty good feature if you don't like fire but don't want to oversize your batteries too much).

And most interestingly: it would allow you to actually control the speed, assuming you have a sensor for that, in a closed loop control scheme; right now, you only control the PWM, but that's not inherently identical to speed (think of riding uphill vs downhill). Imagine you could control the PWM to make sure your skateboard rides at a constant speed rather than with a constant torque! You could, again, go the classical, 1960's route of doing that with an analog control loop, and then tuning parameters until things work out, or you could just do it in microcontroller software.