Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 29th May 2008, 12:08 PM   (permalink)
Default

Imade the below code from the above code. It jitters a little and i tried many ways of switching the pins but do you think i need a diff delay time?
Code:
	LIST	p=18F1320		;tell assembler what chip we are using
	include	<p18F1320.inc>		;include the defaults for the chip
	CONFIG	OSC = INTIO2, WDT = OFF, LVP = OFF, DEBUG = ON		;sets the configuration settings (oscillator type etc.)

	cblock 	0x00 	
	d1
	endc

		org	0x00
Init
	MOVLW	0x62			; 4MHz clock select
	MOVWF	OSCCON
	CLRF	TRISA
Start
;1
	MOVLW	b'00001010'
	MOVWF	PORTA
	CALL	DelayStart
;2
	MOVLW	b'00001100'
	MOVWF	PORTA
	CALL	DelayStart
;3
	MOVLW	b'00000110'
	MOVWF	PORTA
	CALL	DelayStart

	BRA 	Start
DelayStart
	movlw	0xff
	movwf	d1
Delay_0
	DECFSZ	d1
	goto	Delay_0
	return

	END
__________________
My Name: Jason Lopez
My Goal: To learn and Create.
My Micro: PIC and soon AVR or ARM7
AtomSoftTech.com
My YouTube Videos!

My Favorite Stores:
dipmicro Electronics
SparkFun Electronics
Futurlec
BG Micro

Last edited by AtomSoft; 29th May 2008 at 12:09 PM.
AtomSoft is offline  
Old 29th May 2008, 12:52 PM   (permalink)
Default

hi atom,

If you want to easily try different delays you can connect a 10K pot from +5V to 0V, wiper to a ADC inp on the PIC.

Read the pot/ADC and load the delay register with ADC value.

To get realistic delays, multiply the ADC value by say 100 and then add 50 before you load the delay register. Vary the pot in order to change the delay.

IIRC the motor has 4 wires, how are you connecting the 3 phases.???

This jpg is the output from your program on Oshonsoft.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 7th July 2008 at 12:25 PM.
ericgibbs is offline  
Old 29th May 2008, 01:29 PM   (permalink)
Default

atom, if that motor is similar to the one i'm doing tests with .. i noticed following, when delay is too low it will produce "squealing sound" but will not turn, if you then spin it with your finger it will "hold on" and start spinning on it's own ... if delay is too high it will uncontrollably spin back/forth ..

anyhow, the hdd drives (I tried 3 different ones) have no torque .. there might be some way to use them (if someone give the idea I would love to try too) but I personally gave up some time ago as, at low speed when you stop it, it will continue to spin when you "let it go" but on high speed, it will not restart so you need some encoder to check the spinning and restart from low speed .. and as light touch is enough to stop it at "usable" speeds, I discontinued idea of using them for anything ...

(btw, the "no torque" might be due to "wrong driving" .. the way I managed to drive my motor was believing it is variable reluctance .. as people explained it is not, so, maybe it should be driven differently... also, maybe someone should tell if 5V is enough, I used in my test uln2003 to drive it but iirc i managed later to turn it directly from pic when I got the timing right... one more thing, one of the 3 motors I tried was 12V and not 5V driven)

Last edited by arhi; 29th May 2008 at 01:34 PM.
arhi is offline  
Old 29th May 2008, 02:22 PM   (permalink)
Default

From my experience in the HDD industry I can tell you that starting and running a brushless DC motor at a constant speed is going to be a tall order. You need to ramp the velocity up to a steady state. A typical speed range is 4000 - 10000 rpm. Different manufacturers have different spin-up times and things may have changed but 15-30 seconds for the spin-up would not surprise me.

There is one other thing that puzzles me. We used Hall-effect sensors to detect the rotor position so we could fine tune the rotation speed and also know where to start the phase sequence. As you might know changing the speed of the platter changes the effective density of the bits by compressing or expanding the time the bits are under the read head. I've heard that you can use back EMF sensing, but we never thought that it was reliable enough for our purposes. There was just too much noise that could not be effectively filtered.
__________________
We never have time to do it right; but we always have time to do it over.
Papabravo is offline  
Old 29th May 2008, 02:51 PM   (permalink)
Default

Quote:
Originally Posted by Papabravo View Post
From my experience in the HDD industry I can tell you that starting and running a brushless DC motor at a constant speed is going to be a tall order. You need to ramp the velocity up to a steady state. A typical speed range is 4000 - 10000 rpm. Different manufacturers have different spin-up times and things may have changed but 15-30 seconds for the spin-up would not surprise me.

There is one other thing that puzzles me. We used Hall-effect sensors to detect the rotor position so we could fine tune the rotation speed and also know where to start the phase sequence. As you might know changing the speed of the platter changes the effective density of the bits by compressing or expanding the time the bits are under the read head. I've heard that you can use back EMF sensing, but we never thought that it was reliable enough for our purposes. There was just too much noise that could not be effectively filtered.

The radio control electric airplanes have been using 3 phase brushless motors for years. At the very first the motors were using hall effect sensors but that was soon dropped in favor of motor controllers that utilized back EMF sensing and it works very good. These motors are very efficient and quite powerful. Not sure if the control is stable enough for jitter free control that hard drives would need.
__________________
Measurement changes behavior
Leftyretro is offline  
Old 29th May 2008, 02:59 PM   (permalink)
Default

In RC control the thing is position of the control surfaces. As far as velocity is concerned the precise value is not that important but there has to be enough torque to get to the position required fast enough to be effective.

Think spin recovery with a wimpy rudder control and your baby becomes a crumpled pile of junk.
__________________
We never have time to do it right; but we always have time to do it over.
Papabravo is offline  
Old 29th May 2008, 03:00 PM   (permalink)
Default

hi atom,
So that I clear this for my own interest, I dismantled an old hard drive and removed the 4 wire motor.

Resistance values as per your findings, approx 2hm:

Determined which wire was which in the firing order.
Used a dual beam scope, kept one channel as reference and spun the motor by hand,
observed the other windings on the second scope channel in order to find the phasing.

Applied 5V in the firing sequence, the motor turns in 30deg 'steps', BUT there is very little torque.
Attempting to drive anything from the motor shaft would be pointless

This is exactly what papabravo has been saying thru this post.

However, looking at the output from the windings in would make an interesting project for a wind speed indicator.
[ I expect thats been done already!]

Hope this helps.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 29th May 2008 at 03:02 PM.
ericgibbs is offline  
Old 29th May 2008, 04:11 PM   (permalink)
Default

Quote:
Originally Posted by Papabravo View Post
In RC control the thing is position of the control surfaces. As far as velocity is concerned the precise value is not that important but there has to be enough torque to get to the position required fast enough to be effective.

Think spin recovery with a wimpy rudder control and your baby becomes a crumpled pile of junk.
I think you are describing the smaller motors used in R/C servos. I was referring to the much larger Brushless DC motors used to power the plane via a propeller.

Brushless Motors for RC Electric Flight from Hobby Lobby!

Lefty
__________________
Measurement changes behavior
Leftyretro is offline  
Old 29th May 2008, 06:13 PM   (permalink)
Default

Quote:
Originally Posted by ericgibbs View Post
hi atom,
So that I clear this for my own interest, I dismantled an old hard drive and removed the 4 wire motor.

Resistance values as per your findings, approx 2hm:

Determined which wire was which in the firing order.
Used a dual beam scope, kept one channel as reference and spun the motor by hand,
observed the other windings on the second scope channel in order to find the phasing.

Applied 5V in the firing sequence, the motor turns in 30deg 'steps', BUT there is very little torque.
Attempting to drive anything from the motor shaft would be pointless

This is exactly what papabravo has been saying thru this post.

However, looking at the output from the windings in would make an interesting project for a wind speed indicator.
[ I expect thats been done already!]

Hope this helps.

Thanks ill take it as a waste of time lol I have other normal motors ill use then for certain projects.

Can i control a motor like this?
By control i mean be able to move it in small increments and with a h bridge be able to reverse in small increments?
__________________
My Name: Jason Lopez
My Goal: To learn and Create.
My Micro: PIC and soon AVR or ARM7
AtomSoftTech.com
My YouTube Videos!

My Favorite Stores:
dipmicro Electronics
SparkFun Electronics
Futurlec
BG Micro
AtomSoft is offline  
Old 29th May 2008, 06:29 PM   (permalink)
Default

Quote:
Originally Posted by AtomSoft View Post
Thanks ill take it as a waste of time lol I have other normal motors ill use then for certain projects.

Can i control a motor like this?
By control i mean be able to move it in small increments and with a h bridge be able to reverse in small increments?
Hi,
That motor is for robotics, so it should OK for PIC controlling.

Its a pity you dont live in the UK, I have lots of motors, steppers and brushless, which I will never use.!

There is a stepper motor in the Oshonsoft modules.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 29th May 2008, 06:31 PM   (permalink)
Default

I was thinking about making a h-bridge with 4 transistors like this sort of:
__________________
My Name: Jason Lopez
My Goal: To learn and Create.
My Micro: PIC and soon AVR or ARM7
AtomSoftTech.com
My YouTube Videos!

My Favorite Stores:
dipmicro Electronics
SparkFun Electronics
Futurlec
BG Micro
AtomSoft is offline  
Old 29th May 2008, 06:32 PM   (permalink)
Default

Quote:
Originally Posted by ericgibbs View Post
Hi,
That motor is for robotics, so it should OK for PIC controlling.

Its a pity you dont live in the UK, I have lots of motors, steppers and brushless, which I will never use.!

There is a stepper motor in the Oshonsoft modules.

Thanks i wish i lived there too what do you think about the above image. I made in photoshop its a rough draft. You think would work?
__________________
My Name: Jason Lopez
My Goal: To learn and Create.
My Micro: PIC and soon AVR or ARM7
AtomSoftTech.com
My YouTube Videos!

My Favorite Stores:
dipmicro Electronics
SparkFun Electronics
Futurlec
BG Micro
AtomSoft is offline  
Old 29th May 2008, 07:00 PM   (permalink)
Default

hi,
Looking at the diagram, assume that the left hand pair of gates are HIGH and the right side pair are LOW, what is the current path.?

Likewise when the HIGH's , LOWs are reversed.?
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 29th May 2008, 08:14 PM   (permalink)
Default

Since this is theory...

Lets say left side is A and the Right side is B

When the pic sends a HIGH to A and a LOW to B the motor should spin forward

When the pic sends a LOW to A and a HIGH to B the motor should reverse

All other commands should stop the motor. Remember this is theory
__________________
My Name: Jason Lopez
My Goal: To learn and Create.
My Micro: PIC and soon AVR or ARM7
AtomSoftTech.com
My YouTube Videos!

My Favorite Stores:
dipmicro Electronics
SparkFun Electronics
Futurlec
BG Micro
AtomSoft is offline  
Old 29th May 2008, 08:19 PM   (permalink)
Default

Sort of like multiplexed LEDs. Sort of is the keyword.

there is 1 NPN and 1 PNP on the left and right side
So when it goes high it closes 1 gate and opens the other and when low it flips the gates. The right side is flip upside down so it would be like

if LEFT.TOP = CLOSED then
Right.Bottom = CLOSED
Right.Top = Open
Left.Bottom = Open
end if

if LEFT.TOP = OPEN then
Right.Bottom = OPEN
Right.Top = CLOSED
Left.Bottom = CLOSED
end if

So its like :

Image:H bridge operating.svg - Wikipedia, the free encyclopedia
__________________
My Name: Jason Lopez
My Goal: To learn and Create.
My Micro: PIC and soon AVR or ARM7
AtomSoftTech.com
My YouTube Videos!

My Favorite Stores:
dipmicro Electronics
SparkFun Electronics
Futurlec
BG Micro
AtomSoft is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
hard drive stepper motor driver steev General Electronics Chat 11 10th August 2008 02:42 PM
Help with Motor Driver Souper man Electronic Projects Design/Ideas/Reviews 11 13th May 2007 08:23 PM
Motor Driver MrMikey83 General Electronics Chat 7 12th May 2005 09:11 AM
hard disk motor cricuits ranaga General Electronics Chat 1 6th December 2003 07:55 AM
hard disk motor cricuits ranaga Robotics Chat 1 26th November 2003 11:06 AM



All times are GMT. The time now is 08:20 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker