- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hii....
how to control a stepper motor that can move 50 degrees?Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess you need to calculate, how many pulses you need to send to your motor to move these 50 degree and send them with suitable (low enough) frequency.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1.8 degrees in one step<><>
this my program.,. but still looping. how to stop it in order to move 30 degrees only library IEEE; use ieee.std_logic_1164.all; entity stepper is port ( CLK : in std_logic; tombol_arah : in std_logic; STEP_D : out std_logic_vector (3 downto 0) ); end stepper; Architecture behavioral of stepper is signal cnt : integer range 0 to 3; signal cnt_1 : integer range 0 to 3; begin process (CLK) is begin if (CLK'event and CLK = '1') then case cnt is when 0=> STEP_D <= "1001"; when 1=> STEP_D <= "0001"; when 2=> STEP_D <= "0011"; when 3=> STEP_D <= "0010"; end case; end if; end process; process (CLK) begin if(CLK' event and CLK = '1') then if cnt = 3 then cnt <= 0; else cnt <= cnt+1; end if; end if; end process; end behavioral;- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1.8 degrees in one step<><>
this my program.,. but still looping. how to stop it in order to move 30 degrees only library IEEE; use ieee.std_logic_1164.all; entity steper is port ( CLK : in std_logic; tombol_arah : in std_logic; STEP_D : out std_logic_vector (3 downto 0) ); end steper; Architecture behavioral of steper is signal cnt : integer range 0 to 3; signal cnt_1 : integer range 0 to 3; begin process (CLK) is begin if (CLK'event and CLK = '1') then case cnt is when 0=> STEP_D <= "1001"; when 1=> STEP_D <= "0001"; when 2=> STEP_D <= "0011"; when 3=> STEP_D <= "0010"; end case; end if; end process; process (CLK) begin if(CLK' event and CLK = '1') then if cnt = 3 then cnt <= 0; else cnt <= cnt+1; end if; end if; end process; end behavioral;- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add another counter, that counts 30 or 50 degrees and when it reaches the certain value it stops rotation. Use enable signal in first process and add a wider counter to the second process.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page