Following a conversation with Richard off list, I invested in a picAXE microcontroller and came up with the following working circuit.
(https://forum.009society.com/proxy.php?request=http%3A%2F%2Fwww.hnorwood.co.uk%2Ffiles%2Fimages%2Fpicaxe_pwm.gif&hash=3a185731901313d5edf35e14bd37f435e6bdde44)
OK I know it looks complicated, but in essence there are only 3 important parts - the microcontroller, a rotary encoder, and the power MOSFET that drives the motor. The picAXE provides a PWM signal which is controlled by turning the rotary encoder, which is a device that has two switches in it that turn on and off in sequence as the shaft is rotated. From the pulses produced, the microcontroller works out if the shaft is rotating clockwise (to increase speed) or anti-clockwise (to decrease speed)
The STOP push switch makes the microcontroller stop the output dead.
Advantages? Well, it's completely programmable, so can be adapted to suit the situation it's used in. For example, in this unit, I have programmed the PWM for a 50 microsecond repetition rate (20kHz) and initially set the duty cycle to change in 1 microsecond steps. I found this was too small a step and I am about to reprogram it.
I appear to have fallen into the trap of jargonism.
I should have mentioned that PWM stands for Pulse-Width Modulation.
It is a method of sending signals - either information or for control, where the repetition rate of the pulses in the signal is a constant, and the information is carried in the (variable) width of the pulses.
(As opposed to Pulse-Position Modulation, where the pulses are uniform in length but vary in their distance apart).
think I would have been happier just thinking it was jargon. Sorry Hugh but I would be more interested in the effect it would likely have on train operating and, if good, the prospects of getting such a thing
Peter Smith
Well in that case all that one needs to know is that electronics relies on magic smoke. This is self evident because when the magic smoke escapes the thing stops working! :D
And your next project is to use a bigger picaxe to drive servos on your klax transmitter using stored messages or text from a keyboard.
Anon
Ah, you noticed...
Feedback controller article coming in the next issue of the News :)
I like it! So much simpler than the old Velleman kit I picked in '97 and still haven't built!
Send it off to MERG, I'm sure they'll publish it!
Where can you get the Rotary encoders and the picAxe?
Cheers,
Friso
Hi,
For the picAxe see www.picaxe.com (http://www.picaxe.com)
I got the encoder from farnells (Other electronics suppliers are available!)
The 009 NEWS has an article describing both PWM controllers...
Good luck!
Following requests, I have posted the BASIC code for the picAXE on my web site.
http://hnorwood.co.uk/files/pwm2b.htm (http://hnorwood.co.uk/files/pwm2b.htm)
Good luck!
{edit} the difference between the two MOSFETS in the NEWS article is that the ~FP version is fully insulated and does not require an insulating kit to mount it (the tab is encapsulated in plastic)