DC Motor interface with Spartan3 XC3S200FPGA Development Kit

Call for Price

A DC motor is an electric motor that runs on direct current (DC) electricity. DC motors were used to run machinery, often eliminating the need for a local steam engine or internal combustion engine.

SKU: Spartan3 XC3S200 FPGA 3 Category:

Description

DC Motor

A DC motor is an electric motor that runs on direct current (DC) electricity. DC motors were used to run machinery, often eliminating the need for a local steam engine or internal combustion engine.

A direct current (DC) motor is another widely used device that translates electrical pulses into mechanical movement. In the DC motor we have only + and – leads. Connecting them to a DC voltage source moves the motor in one direction. By reversing the polarity, the DC motor will move in the opposite direction. One can easily experiment with the DC motor. For example, small fans used in many motherboards to cool the CPU are run by DC motors. By connecting their leads to the + and – voltage source, the DC motor moves. While a stepper motor moves in steps of 1 to 15 degrees, the DC motor moves continuously. In a stepper motor, if we know the starting position we can easily count the number of steps the motor has moved and calculate the final position of the motor. This is not possible in a DC motor.

DC Motor

DC Motor Clockwise Rotation       DC Motor Anti Clockwise Rotation

Interfacing DC Motor with Spartan3 XC3S200 FPGA Development Board

The Spartan3 XC3S200 FPGA Development Board has external DC motor interfacing, indicated as in Figure. 5V DC Motor speed has controlled through PWM signal. Motor can run both clockwise/counter clockwise, Motor speed controlled by varying ENA (duty cycle) signal through program.

Driver IC L293D

Driver IC L293D

Schematics to Interface DC Motor with Spartan3 XC3S200 FPGA Development Board

Schematics to Interface DC Motor with Spartan3 XC3S200 FPGA Development Board

DC Motor Driver IC Placement in Spartan3 XC3S200 FPGA Development Board

DC Motor Driver IC Placement in Spartan3 XC3S200 FPGA Development Board

VHDL Code Description

The following DC Motor Code generates PWM pulse to run DC motor. To run the motor in Counter Clockwise direction invert output1 to LOW and Output2 to HIGH.

VHDL Program for DC Motor using Spartan3 XC3S200 FPGA Development Board

library IEEE;
use IEEE.STD_LOGIC_1164.ALL; 
use IEEE.STD_LOGIC_ARITH.ALL; 
use IEEE.STD_LOGIC_UNSIGNED.ALL;
   
entity dc is 
port ( clk 	: in std_logic;        
rst 	: in std_logic;                         
enable : out std_logic;                         
output1 : out std_logic;                         
output2 : out std_logic); 
end dc;   

architecture Behavioral of dc is  
begin 
process(rst,clk) 
variable i : integer := 0; 
begin 
if rst = '1' then 
if clk'event and clk = '1' then 
enable <= '1'; 
if i <= 1005000 then 
i := i + 1;  
output1 <= '0'; 
output2 <= '0'; 
elsif i > 1005000 and i < 1550000 then 
i := i + 1; 
output1 <= '1'; 
output2 <= '0'; 
elsif i = 1550000 then 
i := 0; 
end if; 
end if; 
end if; 
end process; 
end Behavioral; 

User Constraint File

NET "clk"  LOC = "p55"  ;
NET "enable"  LOC = "p99"  ;
NET "output1"  LOC = "p82"  ;
NET "output2"  LOC = "p83"  ;
NET "rst"  LOC = "p33"  ;

Additional information

Weight 0.000000 kg

Reviews

There are no reviews yet.

Be the first to review “DC Motor interface with Spartan3 XC3S200FPGA Development Kit”

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.