Main Site Documentation

Stepper and pwm


#1

hello folks,

I have a problem with a stepper motor.

I have tried it to work with a digital output port.

but with

port.write(true)
thread. sleep(1)
port. write( false)

I have problems and lost steps.

if I put the sleep to two milliseconds works fine but for me is too slow.

I’m using cerbuino bee.

I have test too with pwm and a frequency about 800 May be good,
but…, how can I count the number of steps?

the question is… how can I send, for instance, 45 steps with pwm? I never have used in the past pwm and I was not able to found documentation about it.

thanks in advance


#2

Read this, should get you started :

http://www.tinyclr.com/forum/topic?id=7760

Good luck !


#3

Thanks David,

This thread speak about the pins.

I have solved the pins with PWM with this code.

Imports GT = Gadgeteer
Imports GTM = Gadgeteer.Modules
Imports GHIElectronics.Gadgeteer.FEZCerbuinoBee
Imports Microsoft.SPOT.Hardware
Imports GHI.OSHW.Hardware.FEZCerbuino
Imports Microsoft.SPOT.Hardware.PWM

Partial Public Class Program

Public Sub ProgramStarted()

Dim pulso As PWM = New PWM(Cpu.PWMChannel.PWM_5, 800, 0.1, False)

  pulso.Frequency = 900
  pulso.Duration = 10
  '  pulso.Scale = ScaleFactor.Milliseconds
  pulso.Start()

End Sub

End Class

But I don´t know what can i do to send a specific number of steps.

thanks in advance.


#4

hi andre,

thanks for your help, but I have a doubt…

you are speaking about power, but my problem is about frequency, is too slow for my project, I have seen the module and don’t speak about velocity.

did you think, I will can use an high frequency with this module?

somebody have test it with stepper?

thanks other time…


#5

Hello folks,

Somebody know the velocity of ParalellCNC Module, 

Can I use it at 900Hz??

thanks,