run a cdrom brushless motor with arduino
Home » Blog » run a cdrom brushless motor with arduino

run a cdrom brushless motor with arduino

Views: 0     Author: Site Editor     Publish Time: 2020-09-02      Origin: Site

Inquire

facebook sharing button
twitter sharing button
line sharing button
wechat sharing button
linkedin sharing button
pinterest sharing button
whatsapp sharing button
kakao sharing button
snapchat sharing button
telegram sharing button
sharethis sharing button

Brushless DC Motor is a kind of brushless DC motor.
This means no direct connection (brush)
Between the rotating spindle and other fixed parts, such as the coil.
Therefore, rotation is a product of the change in the current direction of the coil.
The spindle has a round magnet (usually).
The coil itself is an electric magnet.
So you can turn the spindle by changing the poles of the coil.
Have you ever seen a BLDC? Yes, of course.
There are many such cases in each computer case.
Fan, cd rom and floppy drive (If you haven\'t
Is a device that uses BLDC.
The fan usually uses a 2-phase motor with 2 pins in the coil and 1 pin in the hall sensor.
The CDROM or floppy drive has a three-phase motor, the coil has 3 pins, and the Hall sensor has 1 pin.
The Hall mentioned is a simple sensor for detecting the current poles of the spindle.
Whenever a magnet arrives, it generates a signal.
Therefore, you can use this pin to detect the number of wheels of the motor or control the speed of the motor (RPM)
Change the signal speed according to this pin.
I think the theory is enough. let\'s do it!
As you can see in the photo, I found a Samsung brushless motor in my old Asus CDROM.
I think this is a suitable low voltage motor for our project.
I had a lot of old hard drives in my room, but it was a bit difficult to remove and leave them.
So CDROMs is a better victim for this newbie guide.
Anyway, as mentioned earlier, we have 4 pins to weld the wires.
The coil pins are easily detected and they are mutual.
Usually the last pin is the sensor.
But if there is any problem with the detection pin, please connect (+), (-)
They saw the spindle shaking 3 volts.
You can also detect them using ohrazer. Used parts:-1x Breadboard. -
1x drive IC l293d. -Wires. -
1x external power supply 6 v (optional)
I used a well known 4-L293D ICChanel driver.
It is necessary to use the buffer between the microcomputer
The controller and other power-consuming components, such as motors, relays, coils, etc (not LEDs).
Sometimes it is important to use a higher current or a higher voltage (
More than 5 Arduino)
External power supply, sometimes just to protect your micro from any reverse.
Like transistors and integrated circuits, there are many electronic components that can be used as buffers.
I suggest that the l293d supports external power supply and also has a chip enable pin.
As you can see in the data --
Single, there are :-4 ground pins (connect to Gnd)-
2 enable and 1 Vss (
Connect to 5 Arduino)-1 Vs (
Connect to positive external power supply)-4 inputs (
3 of them to Arduino)-4 outputs (
3 pairs of motors)
Therefore, connect the pins according to the schematic diagram shown in the figure.
We want to prepare a series of suitable signals to drive the brushless motor.
This BLDC has 36 steps for each round of completion.
This means that we should prepare 36 signal states to complete the spindle rotation.
These 36 steps are divided into 6 parts of a unique sequence.
So we have 6 different signals that should be repeated 6 times in a loop.
Suppose that the three lines are A, B and C respectively (ordered)
We need a value of 3 bits to use.
We assume that 0 is negative and 1 is positive.
The Magic 6 steps are as follows: 110, 100, 101, 001, 011, 010 we will use them in one loop.
Another important thing to mention is the wait or delay between each step.
By modifying the delay time, you can change the speed of the motor.
If high latency is selected (
Ex: 15 to 20 ms)
The motor may just shake or start the cutting action.
If low latency is used (
Ex: 0 to 5 ms)
You will only hear the buzz, no movement.
So I want to use a variable as a delay and change it to throw the serial monitor window in Arduino.
The code is as follows:/* DC brushless driver */month = int, etc; int p1 = 2; int p2 = 3; int p3 = 4; char inChar; void setup(){
pinMode(p1, OUTPUT); pinMode(p2, OUTPUT); pinMode(p3, OUTPUT); Serial. begin(9600); }
/Loop routines run over and over again forever: void loop (){if (Serial. available()){inChar = (char)Serial. read(); if (inChar == \'-\'){wait -=1; }else{wait +=1; }Serial. println(wait); }digitalWrite(p1, 1);
digitalWrite(p2, 1); digitalWrite(p3, 0); delay(wait);
digitalWrite(p1, 1);
digitalWrite(p2, 0); digitalWrite(p3, 0); delay(wait); digitalWrite(p1, 1);
digitalWrite(p2, 0); digitalWrite(p3, 1); delay(wait); digitalWrite(p1, 0);
digitalWrite(p2, 0); digitalWrite(p3, 1); delay(wait); digitalWrite(p1, 0);
digitalWrite(p2, 1); digitalWrite(p3, 1); delay(wait); digitalWrite(p1, 0);
digitalWrite(p2, 1); digitalWrite(p3, 0); delay(wait); }Some hints:-
No more than 12 v external power supply. -
For small BLDC motors, you can use Arduino 5 as a Vs, no external power supply is required, but the motor speed cannot be reached. -
Start with the wait value 10, then turn on the serial monitor and enter the minus key to reduce the value.
The lower the wait value, the faster it is.

HOPRIO group a professional manufacturer of controller and motors, was established in 2000. Group headquarters in Changzhou City, Jiangsu Province.

Quick Links

Contact Us

WhatsApp: +8618921090987 
Tel: +86-18921090987 
Add: No.19 Mahang South Road, Wujin High-tech District, Changzhou City, Jiangsu Province, China 213167
Leave a Message
CONTACT US
Copyright © 2024 ChangZhou Hoprio E-Commerce Co., Ltd. All Rights Reserved. Sitemap | Privacy Policy