Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Controlling the stepper motor from a floppy drive

Status
Not open for further replies.

MrData

Newbie level 4
Newbie level 4
Joined
Jun 15, 2014
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
78
Hello, i'm new to electronics and i was following a project i saw on youtube where you could control via parallel port with pins 12,18 and 20 the motor of the drive.
I replicated the solution but there is some problem i can't figure out.
When i connect pin 12 to my drive the led will light but blinks instead of a solid green, the other issue is when i'm probing the pin 20 for step the motor this actually works but in a jerky form, it moves in both directions and never go past a couple millimeters for the start. If i manually push the motor forward, and then probe pin 20 i have a backwards steady motion until it reaches the track zero. And restarts the jerky movement again.
From what i've read some drives control the head of the drive to be at zero when they are connected. I think this is whats happening but i have no clue on how to fix it. I tried with 3 different drives and the result is identical, so its not a malfunction. I also have one 2.88mb drive and that one works as intended, the visual difference to me is that on the drive interface the 2.88 drive has all 34 pins and the other 3 drives (1.44) they miss pin 3.
Can you help me out understand how to solve this issue?

Thanks in advanced
 

It's difficult to give a definite answer but I would guess the problem is due to the way you 'probe' the pins. In a normal floppy controller circuit each step is decided by a timer so the speed is relatively low and constant. If you are simply linking the pins to ground manually, the connection will make and break several times as they are bridged and released and the speed will be almost random. In a conventional switch situation we would normally use a 'de-bounce' circuit which prevents the switch producing multiple signals by introducing a delay between the contacts closing and being seen to be closed and then ignoring and sudden breaks and makes for a few milliseconds. I suspect what you are unintentionally doing is sending so many pulses so rapidly into the step pin that the motor and it's driver circuit is getting confused.

Try this, it isn't a full solution but it should prove whether I'm right or not:
Connect a 1uF capacitor across the step input and ground then wire a 1K resistor in series with your probe. They will make a crude filter that slows down the rise and fall of voltage at the step input so it becomes less sensitive to rapid signals.

Brian.
 

Hello Brian,

First of all let me thank you for your inputs and also for your time.
I don't think the problem is with the probing, because i connected a parallel port with the driver (shorted pin 12 to turn the drive On, data pin0 of parallel port to pin 18 on drive for direction data pin1 pf the parallel port to pin 20 on the drive and parallel port pin 25 gnd to pin 1 on floppy).
Used some software to turn parallel port pins from low to high and tested with the same results.
Even probing with a delay of seconds i can move the motor but it completly ignores the direction pin.
The problem is with one pulse or two the motor moves in one direction and on the third pulse moves in the oposite direction. (Without me changing the direction pin)
Now i've read somewhere that with the newer drives the have an optical sensor so sense track zero, and when the drive is turned on the head wants to move there to always start at track zero.
One more thing i noticed is with the drive off if i manually move the screw like shaft so the head start the furthest from track zero and then probe pin 20 the motor works in the same direction (towards track zero) and when it reaches track zero the motion gets jerky again, moving forward and backwards.
From my very limited understanding it seems like a sensor must be trigged so the direction pin can be "unlocked".
Another thing to notice is, on a older 2.88mb drive i have the same procedure works by default.
i will try to make a small movie of both situations and upload to youtube and hope you can give me some insight.

Thanks in advanced!!!
 

Read the data sheet of the integrated circuit that drives that stepper motor.
And consider pull-up/down resistors on the direction and step command pins.
 

Here brian

This first video is me showing the not working versio, in fact i just discovered today that blocking the optical sensor i get the drive moving in one direction oposite to the normal movement without blocking the sensor. But the drive really doesn't care of the dir pin...

Not working version
https://youtu.be/MXYsCELFijw

The working version, exactly the same pinout the same method and this drive also has a zero track optical sensor, but i don't have to use it to work as intended.

Working version
https://youtu.be/MXYsCELFijw

Hope this helps... thank you once again
 

Thank you externet,

Unfortunately i don't know enough of electronics to do just that.
I can probably get the data sheet for the microchip controlling the step motor, but i wouldn't know what to do with it...

Thanks anyway!
 

Floppy drive are actually quite dumb machines, the mechanical controls just move the mechanism and the signal pins just read back whatever is under the head.

A few things come to mind:
1. The LED shouldn't be flickering, it should be on all the time when the drive is selected.
2. The stepper motor controller may be inhibited by the track zero sensor to prevent the head being driven further out than it's limit.
3. The inactive state of the pins is +5V relative to ground, quite possibly your drives do not have internal pull-up resistors. In order that several drives can be wired in parallel they normally have a pull-up on the contoller (motherboard) end of the cable rather than in the drive itself. So instead of your link changing +5V to 0V, it may be changing some random level to 0V causing unpredictable results.
4. Possibly the 'good' drive has some signal conditioning on the step pin and the 'bad' drive doesn't.

I would do an experiment, connect all the control pins to +5V through resistors (the pull-ups) of 470 Ohms to 1K. The remaining pins are not so important but you can connect them as well if you like. This will ensure the logic high really is high and not floating.
It's also important to understand that although you think each touch of the probe is producing one step pulse, in reality as the probe touches and leaves again it will be producing many brief logic transistions. If the 'bad' drive has no filtering it will try to react to every one of the transistions. Given that the motor has several repeating step cycles, you might be telling it to move faster than it is capable of doing, hence seeming to skip forwards or backwards randomly. Consider that the step sequence may be (this is an example, yours might be different) A-B-C-D-A-B-C-D-B-C-D to move clockwise and D-C-B-A-D-C-B-A-D-C-B-A to go anti-clockwise if you advace the sequence more than one step it can land in an indeterminate position or even appear to go in reverse.

Brian.
 

Hi Brian,

Once again thank you for your suggestions, i got the resistors and i will try it later. Although some questions raise to my mind.

- From the videos i saw the led is never blinking, and i already had that question in my mind, why do they blink on my drives.
- I probed all the other pins and pin 12 is the only one that turns the drive on so i assumed it's a "feature".
- The stepper motor apparently doesn't get inhibited by the sensor alone, because in the 'good' drive the sensor also exists and doesn't affect the motion or the direction pin, i believe the internal logic of some drives is different.
- I also understand that manually probing the pin may cause some failure on the stepping mechanics of the drive, but, that would happen in both direction, in my case, when i probe without the direction pin 18 and the drive moves steady in one direction, when i set pin 18 to high state the motor simply doesn't move. It wants to move, i can feel the feedback in the motor but won't turn.
- Also, when i connect those pins to my parallel port interface, the results are identical, slower of course because of the timing, but it also moves properly in one direction, but when pin 18 state is set the motor doesn't move unless i cover the optical sensor.

From my little understanding of electronics, i believe the problem is on the interactions with the pins and the logic of the controller, i just don't know how to do certain things.

For example i believe that if i could set the optical sensor to 'blocked' at the same time i set the pin 18 that would solve me the problem.

So basically i would need to block the sensor and set pin 18 to move inwards and unblock the sensor and unset pin 18 to move outwards.

Either way i will test your suggestion and give you feedback, but i think the result will be the same.

Once again, thanks for your time!
 

Hi brian,

I testes with the resistors and it didnt 't work :(
Do you have any other ideia?

Thanks in advanced
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top