3-Phase BLDC Motor Control with Sensorless Back EMF Zero Crossing Detection Using 56F80x. Dual 4-pin multiplexed inputs. ADC can be synchronized by PWM modules. Module is usually implemented on a DSC to create desired control signals. A device with BLDC motor and power stage is shown in Figure 3-3.
Hey!!!Is it difficult to measure rpm of motor???I don't think so. Here is one simple solution.Only one IR sensor and Arduino in your kit can do so.It is very useful for DIY creators & robot makers and is very easy to make. It requires only 5 minutes for set up.This assembly works well and can measures rpm much accurately upto 5%.
I had tested it till 10000rpm.And Yes, this can be used for any type of motor Big or Small (industrial too)What you can do with this?. Measure rpm / check rpm of motor. measure speed of robot m/s (step 4). Maintain constant speed(rpm) of DC motor (step 5)How to use. Stick aluminium foil piece as reference point anywhere on shaft or on its attachment.
Start the motor. Place IR sensor infront of the reference point.That's it. So what is the logic behind this??It works on basic principle of an encoder and it works much similar to encoderWhen a shaft/body rotates, same point on it repetatively comes to original position after one revolution.But for that it requires some time.By measuring time (in second) between these two positions ie. Completeing one revolution, we get time (second) required to complete one revolution.Simply taking reciprocal of this value we get rps (revolution per second) of motor.Multiplying it by 60 will give rpmSimple haa!!!RPM does not depend on Distance between centre of shaft and reference point.Now to measure the time difference IR sensor is used. Aluminium foil is used set a reference point.
Also it reflects light thus enhances sensitivity of IR. Sensor gives HIGH output, when aluminium foil comes infront of the sensor. Micros command is used to measure time which is 10^-6 of second which can measure time lapse at high speed accurately. RequirementIf you want to measure rpm but don't have display.No problem. You can measure on Arduino's Serial Monitor on PC.Simply connect data pin of IR sensor to Arduino's pin 2 and connect +5 & ground pin accordingly.Upload code and test on Serial MonitorLCD DisplayThe assembly looks like mess.
But it's really simple. Connecting LCD display requires too much wires and connections.So if you have I2C connector for LCD then I highly recommend to use it. It requires only 2 Arduino pins.CodeThe code uses unsigned long to store time.
The code is written so that only when input from IR sensor changes from LOW to HIGH, it will proceed ie. Calculate time difference. So it will be triggered only when leading edge of aluminium foil comes in front of the sensor. So there are less chances of false triggering. Each time one revolution is completed, arduino measures time required and it's corresponding rpm which is then displayed on LCD screen. LCD will refresh its value every 0.1 second.LCD PIN CONNECTIONS. VSS = Ground.
VCC = +5V. VEE = Centre pin of Potentiometer. RS = Pin 8. RW = Ground.
![Bldc Bldc](https://cdn.instructables.com/FN2/5781/II4UGXNN/FN25781II4UGXNN.LARGE.jpg)
E = Pin 9. DB0 = N/C. DB1 = N/C. DB2 = N/C. DB3 = N/C.
DB4 = Pin 4. DB5 = Pin 5. DB6 = Pin 6.
DB7 = Pin 7. LED+ = +5V. LED- = GroundAttachments. If you are mounting this on a robot and want to know speed of your robot then follow this -A very basic principle.Speed = Perimeter of wheel. speed of wheelBut perimeter is Pi times the Diameter of wheelSo Speed = PI.D.
speed of wheelSpeed(m/s) = Pi. D(in meter). rpsSpeed(km/hr) = Pi.D(in kilo meter). rpm. 60Add this in codeconst int D = ; // Diameter in cm (include at the top)speed = 3.14159.(D/100).(rpm/60) // speed in m/sspeed = 3.15159.(D/100000).(rpm.60) // speed in km/hr. Now we know the rpm of the motor.So it's not difficult to manage speed of the motor.For this purpose we require a motor driver. EN (enable) pin on driver is used to vary speed of motor using PWM (pulse width management).
So simply connect pwm pin (pin 11 used in code) to the EN pin on driver. Also set the pin on driver to HIGH which drives the motor.Same thing can be done by using fast acting NPN transisor. Use resitors to limit current.Potentiometer knob is used to set the rpm required.TESTI tested this code and assembly. Every thing is working well.Code needed to be slightly fixed because rpm of motor fluctuates wrt set point (speed is not smooth).But you can try it, it works well. If you have any solution then it will be great.Advantage of using IR sensor for maintaining conatsnt speed of DC motorSuppose somehow load is increased on the motor. Which will reduce the RPM of motor.
By checking real time rpm, arduino will sense that rpm has been reduced. Accordingly arduino will send signal to increase power supplied to the motor in order to compensate the reduced RPM. Similar thing will happen if load is reduced. Thus a constant RPM will be managed in any condition. I am getting error.I am using Flying Fish MH Sensor Series. It has two lights one for power on and other for output indicator.I have copied your code and burn it into my Arduino.I am getting error that the indicator light on sensor is turned on.and LCD is showing RPM=0.
Then I have changed the LCD pin arrangements as LiquidCrystal lcd(12, 11, 5, 4, 3, 2); and dataIn = 7; NOw the sensor indicating light turns off it on when i put my hand in front of the sensor and turns off by removing hand. Now error is that LCD is showing starting RPM =4765 and when i placed rotating motor infront of sensor it is giving random values in thousands.
MY LCD no is 1602Akindly help me out [email protected].
If you're building a robot or other microcontrolled gadget, you will need to drive DC motors forwards and backwards. In this instructable, I'll demonstrate a simple and inexpensive circuit that controls a DC motor from two I/O pins. It requires no integrated circuits, and uses commonly available parts.
I recommend you build it on a breadboard the first time. I designed this circuit, but I'm not the inventor of this type of motor controller. I got interested in motor control circuits like this one when I saw the amazingly precise movements of the Makerbots and CNC routers at Maker Works in Ann Arbor. Here are the parts you'll need. All of them should be available at your local RadioShack or hobby store. (1) DC motor (4) MOSFET transistors. I used the IRF540N, but any N-channel MOSFET will do.
(4) Diodes (2) NPN bipolar transistors. I used the BC548. (2) PNP bipolar transistors.
I used the BC327. (4) 2200 ohm resistors (red-red-red) (4) 10K ohm resistors (brown-black-orange) Some jumper wires and a breadboard, if desired The resistor values are not critical.
Values that are fairly close will most likely work fine. This circuit is designed to run a motor from the same power source as your microcontroller. Setting I/O pin 1 high makes the motor spin in one direction, and setting pin 2 high makes it spin in the other.
Setting both pins low stops the motor, so speed control can be achieved through a PWM signal to a pin. I should also mention that setting both pins high at the same time shorts your battery, and should be avoided. I used a 12 volt power supply I made, but you could go as high or low as your transistors can handle.
If you are driving very large motors, I recommend putting the MOSFETS on a heatsink or fan. Attached is a video of the circuit in action. When you set pin one high with your microcontroller, the NPN transistor Q7 switches on. This connects the base of the PNP transistor Q5 to ground, turning it on as well.
Q5 then connects +12 volts to the mosfets Q1 and Q4, which connect the motor to positive and ground. Setting pin 2 high connects the motor to positive and ground in the opposite polarity.
The four diodes protect your transistors from voltage surges that sometimes occur when a DC motor is abruptly stopped. The 10K ohm resistors pull the bases of the transistors to ground when your I/O pin goes low, and the 2200 ohm resistors limit the current that can be drawn from your I/O pins to protect them.
Have fun spinning motors! I used two of this circuit for the drive train of my robot butler. I think you have the collector and emitter swapped on Q5 and Q6 in your schematic. The emitter should go to your supply and the collector should go to the load. PNPs will work with the emitter and collector swapped, but the current gain will be horrible (.