Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:27 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Electronics : Decoding a 3 phase Hdd motor.

Author Message
Downwind

Guru

Joined: 09/09/2009
Location: Australia
Posts: 2333
Posted: 10:38am 21 Dec 2009
Copy link to clipboard 
Print this post

Has anyone decoded the outputs from a 3 phase pc hard drive motor.
They can be used as a rotary encoder.

The one i am playing with is 3 phase and star, so 4 wire.
Feeding it through a comparator i get close to a square wave out (X3). (little more refining needed)
They spin very freely with zero cogging. ( im sure there is a bit there but not that i can notice)
I intend on using one as a anemometer and another as a wind vane (hence rotary encoder)
They are a free well made rotary source, and very easy to adapt once you get all the tamper proof screws out and gutter it down to the bare spindle + discs. ( and a good set of magnets for another project)

Before i tackle the brain teasing task of decoding the 3 phases into code to read it as an encoder. I was hoping someone else might have already done this and was prepared to share the information so i can gleem a procedure from it.

Wishful thinking i feel, but if you dont ask you dont get.

They would make a good positioning sensor for a cnc machine or anything tracking movement.

Pete.

Sometimes it just works
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 11:18am 21 Dec 2009
Copy link to clipboard 
Print this post

Hi Pete

Maybe not what you want, but I did some work on using the decoders in computer mouse's. The good old ball and roller type, with a serial cable.

The typical serial mouse microchip reads the position of the two rollers using 4 photo transistors, 2 per roller. Using two photo transistors close together means the microchip can detect which way the roller/disc is rotating.

The microchip keeps track of the direction and counts for each roller, and stores this as a absolute position. Since the PC couldnt process the raw position data as quickly as it was supplied by the rollers, the mouse microchip instead sends the change in absolute position when requested. If you wiggled your mouse like crazy, but the PC was too busy to request a new mouse position, the mouse microchip will keep track of the absolute position and send this when the PC has time to process it.

Now you can read this data with Visual Basic ( or any high level language that can process serial port data ). A ready made encoder that keeps track, even if the PC was too busy to process the data. See the potential! All you need is a old serial mouse and a little VB software, and you could build your own servo amp.

The project I was working on was a 2 axis digitiser. I planned to lasercut some new slotted disks and use this on a T-square arrangement. I would move a pointer around the item I was digitising, pressing a button at each point. The software would then export a DXF file. I can post the files if your interrested, but you would need a serial mouse to test it out, it wont work with a PS2 or optical mouse.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Downwind

Guru

Joined: 09/09/2009
Location: Australia
Posts: 2333
Posted: 11:54am 21 Dec 2009
Copy link to clipboard 
Print this post

Hi Glenn,

Im interested, but too many other things on the go at the moment to tackle a new project.
I will get back to you some other time on this one.
Im sure there is a few serial mice hidding there somewhere in the ever growing pile of junk.

The thing i liked about the hdd motors is all the bearings and other bits are all in a nice tidy package just waiting for a project. (and some fool to decode it)
Old Hdd's are like O rings - Everywhere.

I had a play with an optical mouse but was unable to find data on the receiving/decoder chip and gave up.

Pete.
Sometimes it just works
 
Dinges
Senior Member

Joined: 04/01/2008
Location: Albania
Posts: 510
Posted: 12:14pm 21 Dec 2009
Copy link to clipboard 
Print this post

About two weeks ago I looked into using a rotary encoder to control something. Decided in the end not to go through with it but use BCD switches, but I did find this simple schematic, that decodes the 2 signals from a quadrature encoder into a direction signal and a pulse/clock signal:



taken from here: http://electronicdesign.com/Articles/Index.cfm?ArticleID=214 22

All with discrete electronics, no microcontrollers, PICs, Atmels, 68XX, etc.etc.

In your case it looks like the debouncing part will not be required.

What you have is not really a quadrature-encoded signal (phases are not 90 deg off, but 120 deg), but perhaps the circuit can still be useful by using only two phases? Shouldn't take too long to make a test setup on some breadboard and try it out.

Keep in mind that if you use it for a direction sensor, it may lose track over time (there's a discussion in that thread on this very topic; see the reader comments). I think that for the direction sensor you'd be better off with some kind of absolute encoder, such as Gray code, unless you find a way to periodically re-synchronize the 'rotary encoder' (harddisk motor).

Peter.

Edit: I wonder... would it be possible to use two identical harddrive motors as selsyns? That might solve the issue for the direction sensor, if it works.

Edit edit: bugger... won't work. Needs an electromagnet as the rotor. Permanent magnet rotor won't work. Pity.Edited by Dinges 2009-12-22
 
Downwind

Guru

Joined: 09/09/2009
Location: Australia
Posts: 2333
Posted: 01:23pm 21 Dec 2009
Copy link to clipboard 
Print this post

Peter,

Think i will give it a go in Picaxe as need the signal to be translated further in program after decoding anyways.

I do have a picaxe program written for decoding a rotary encoder (standard off shelf 3 pin encoder) should you need to use a encoder in picaxe.
Give me a pm and i will send it to you. It could save a few hours of messing around.
Useless if you dont have an application for it.

Yes its a good point on loosing position.
You just made me realize that on start up it will need to be indexed to some point each time. Bugger!
With that being the case it would be just as easy to stick with photo interrupters and run 2 to get positioning.
The last hdd i drilled holes in the disc and it works well plus easy to drill. (only 1 sensor)
Just need 2 holes to line up with the 2 sensors together in the ring of holes, to be use as a set refferance point.
All other holes will be spaced to only allow 1 sensor to be active at a time.

If the sensors were faced due North in mounting, every time the 2 sensors were active together it would reset the direction to north in the micro.
Be also easy logic to decode for direction.
The number of sectors per 360 deg is also selectable.

Bugger Peter, its now do-able, so back out the too hard basket and onto the project list.

Thanks for the circuit input, its always good to see little circuit ideas.

Pete.


Sometimes it just works
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024