Need help with VERILOG and a Parallax Servo!
Tobben
Posts: 5
Hi!
I have bought a Parallax Servo, http://www.parallax.com/tabid/768/txtSearch/900-00005/List/0/SortField/4/Default.aspx
I'm working on a project, where I need the servo to go to 0 degrees and to 180 degrees.
I use a Altera DE2 card and Quatus II.
Anyone that knows how to make·a block in verilog to do this?
Thanks from a Norwegian student!
I have bought a Parallax Servo, http://www.parallax.com/tabid/768/txtSearch/900-00005/List/0/SortField/4/Default.aspx
I'm working on a project, where I need the servo to go to 0 degrees and to 180 degrees.
I use a Altera DE2 card and Quatus II.
Anyone that knows how to make·a block in verilog to do this?
Thanks from a Norwegian student!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
No.
Center is 1.520 milliseconds for Futaba Servos, 1.500 milliseconds for others. A crude approximation is .010 milliseconds per degree. You will have to experiment to find the correct pulse widths for your servo. Your servo will also respond to pulse widths outside the 1 mS to 2 mS range. Each servo is different so be sure to approach the endpoints in small steps so as not to bind the servo and strip the gears.
The servo will expect to receive a pulse fifty times every second. A little slower or faster is okay. If the pulses get too far apart it will move in a jerky fashion.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.
Post Edited (W9GFO) : 5/14/2010 9:35:32 AM GMT
This is the verilog file (if anyone understands it :P )
module impuls1ms (in,clock,s1ms,GND);
input in,clock;
output reg s1ms, GND;
integer status,teller,t2000;
initial
begin
status=0;
teller=0;
t2000=0;
GND=0;
end
always @ (posedge clock)
begin
if (in==0)
begin
GND=0;
teller=0;
t2000=0;
status=0;
s1ms=0;
end
else
begin
t2000=t2000+1;
if(t2000==5000)
begin
t2000=0;
teller=teller+1;
if (teller==195)
s1ms=1;
else if (teller==200)
begin
teller=0;
s1ms=0;
end
end
end
end
endmodule
www.parallax.com/StoreSearchResults/tabid/768/txtSearch/servo/List/0/SortField/4/ProductID/102/Default.aspx
A standard servo will go to a position and stay there.
A continuous rotation servo keeps turning. The speed and direction it turns depends on the pulse width.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.