Robert Rolf wrote:
{Quote hidden}>
> Stef Mientki wrote:
>
>> hi All,
>>
>> I just spend a lost hour on a weird idea: controling a motor and
>> detecting the load with minimum pin use.
>> I'm interested if anyone else tried this kind of uncommon motor
>> controlling,
>> or knows any links concerning this subject.
>>
>> You can find the schematic here:
>>
http://oase.uci.kun.nl/~mientki/pic/jalcc/examples/example_motor.html
>> <
http://oase.uci.kun.nl/%7Emientki/pic/jalcc/examples/example_motor.html>
>>
>>
>> I haven't looked into the circuit in detail,
>> but most important questions at first sight seems to me
>> - how to calculate components, so the PIC detects the desired
>> maximum motorload
>> - if larger motors are used, will the flyback current damage the PIC ?
>
>
> Of course it will fry with the way you've wired it.
> The diode should connect to back to the supply rail.
You're right, I didn't draw (and use) the flyback diode,
because it's an idea, not a design.
In an idea, I think it's better to leave out all non-essential components.
>
>
> To achieve what you seem to be wanting, use a zener rated for the
> supply voltage, wired back to the supply so that the motor can
> produce up to the zener voltage as back EMF that you can measure..
That might be a good idea.
I now think also a small capacitor is needed in the base of the transistor,
to prevent the transistor starts conducting if the back EMF is large
(high motor speed and/or low torque).
I'll get back, when I've done some more experiments.
{Quote hidden}>
>
>> And of course, I want more ;-) - 2 digital pins to control the motor
>> in both directions
>> - detecting the exact speed, based on commutator pulses,
>> with the same 2 digital pins
>
>
> Just get a bigger PIC with more available pins. Or use
> SPI and 74HC595 74HC594? to get outputs/inputs.
>
That's what I do in my other part of life: a 16F877 for each motor to
control.
But in my spare time, I like to design by the KISS principle ;-)
thanks,
Stef Mientki
>