Submitted by RCFisher on Tue, 06/29/2010 - 01:47
Posted in
Well I have everything hooked up and I can flash leds with OM but I can't seem to get the stepper to run. I am using the Pololu A4983 with built in regulators. I have it hooked up according to data sheet and forum. I would try an easystep but the motor I am using is 1A. the motor I am going to end up using in my setup is .85A so that is on the edge of the easystep's capacity. I am using test-prog.slim which flashes the leds but motor doesn't move.
Scratchin my head!

What's your wiring like from
What's your wiring like from the driver to the motors? (Which colors to which driver pins?)
Additionally, is the sleep or kill line attached to the Arduino, and if so - is the motor kill line set to the proper value?
Finally does the motor make any noise or heat up after a few moments?
!c
Hi Church Well I got the
Hi Church
Well I got the problem solved. The enable line should have been set low, I set it high so the driver wouldn't run. Fixed that and all seems good. Motor moves and leds flash! A couple of questions . . .
I have the sleep line connected and the driver sleeps when low. Looking at the code OM sleeps when low is that correct? My motor doesn't seem to sleep though, still has holding torque when stopped.
I have debugging on and when I load a new program it takes quite a while to finish and let me hit start. Is that normal?
With focus tap, that occurs before OM fires the camera shutter but I have a nikon D200 and focus has to be activated when the shutter is pressed for the camera to fire. How can I tell OM to do that?
Thanks
RC, For controlling the sleep
RC,
For controlling the sleep line, see 'help kill'. By default, it sets the sleep line to LOW when the motor kill line is enabled. (Again, see 'help kill' for how to enable/disable.)
It depends on what your script is doing as to how long it should take =) Try first _not_ using scripts, and entering the commands manually so you get a better idea of what needs to be done and how things operate.
For setting focus high with shutter, see 'help set_camera'. E.g.: 'set_camera focus 1'.
!c
Hi Church I did look in the
Hi Church
I did look in the slim help files. For setting sleep I got this . . .
sleep <seconds>
Sleep for a given number of seconds.
Note: this only sleeps within the Slim program, the
TimeLapse Engine is unaffect. This command is particularly
useful only within scripts.
For kill . . .
Available commands:
help, version, exit, sleep, port, debug, connect, load,
set_motor, set_camera, interval, keyframe, action, home,
move, start, stop, pause, alt
For help with a specific command, type 'help <command>'
For general information, type 'help general'
For focus high . . .
set_camera <parameter> [arguments...]
camera <parameter> [arguments...]
Sets a specified parameter for the camera.
The following parameters are provided:
cycle <seconds>
set the interval time between shots, in seconds.
exposure <milliseconds>
set the exposure, or shutter trigger, time in
milliseconds.
tap <milliseconds>
set pre-focus-tap time in milliseconds. Pre-focus
tap determines how long to trigger the focus line
on the camera remote before triggering the shutter.
This can be used to focus the camera, or wake it up
in certain models.
shots <count>
set maximum # of shots to take
post <milliseconds>
set post exposure delay in milliseconds. Post exposure
is useful when exposure is controlled by the camera, and
you only use the engine to trigger the shutter. In this
case you would set the exposure time in the minimum
number of milliseconds required to trigger the camera,
and post to a safe amount of time to wait after exposure.
on
enable camera, it is off by default
off
disable camera, it is off by default
Examples:
> set_camera exposure 100
Sets exposure time to 1/10th second
> camera shots 5000
Maximum exposures is 5,000. Note: "camera" is
short-hand for "set_camera."
I found mentions in the arduino code but nothing in the Slim help files. Also sleep is never referred to as "kill". How long does the motor have to stopped for sleep to be invoked?
Thanks
Hi Church I also keep getting
Hi Church
I also keep getting errors from the OM engine. Here is my code and the debug lines
port /dev/tty.usbserial-A800ewHQ
connect
set_motor 0 dir 1
set_motor 0 steps 1600
set_motor 0 ramp
set_motor 0 enable 1
interval 5
set_camera focus 1
set_camera tap 10
set_camera exposure 250
set_camera shots 100
set_camera post 500
set_camera on
start[5] > [5] > DBG: port:/dev/tty.usbserial-A800ewHQ
Set COM Port: /dev/tty.usbserial-A800ewHQ
[6] > [6] > DBG: connect
Connect: Connected to Engine on port /dev/tty.usbserial-A800ewHQ
[7] > [7] > DBG: set_motor:0:dir:1
[_openmoco_command] ERROR: Timeout Reading from engine
[8] > DBG: set_motor:0:steps:1600
[set_motor] Set Motor 0 'steps' => '1600'
[9] > DBG: set_motor:0:ramp
[set_motor] ERROR: Not Enough Arguments
[10] > DBG: set_motor:0:enable:1
[set_motor] Set Motor 0 'enable' => '1'
I know what the error is in the motor ramp line, just left it in even though it's set to nothing. I guess I could set to 0 for grins.
No idea about "timeout reading from engine" what that might be.
Well it seems if I put a
Well it seems if I put a sleep 5 after the connect line then I don't get that time out error and it loads faster. To get OM to pause before starting to run do I put a sleep 5 after start?
You're not running Slim 0.12.
You're not running Slim 0.12. Those commands were introduced in 0.12. 'sleep' is just causing slim to sleep, and is only to be used when a delay is needed in a script application.
Additionally, you have incomplete commands... See the errors?
[set_motor] ERROR: Not Enough Arguments
Please don't use scripts for now, just use the minimum number of commands, entered directly, to test out your setup. Scripting should be saved for once you're familiar with the environment, and know your setup is working.
Why bother trying to ramp until you're certain all of your motor stuff is working?
Please, please, start simple =) It's way easier to get your head around just moving a motor.
E.g, do this manually:
[2] > connect
[3] > move 0 1 10000
Also, need to replace the version you're using with 0.12. 0.11 is _not_ compatible with the latest engine firmware.
Then, if you want to make sure kill works, just test that:
[2] > connect
[3] > kill on
[3] > move 0 1 10000
Then, you can expand and make sure the intervalometer is working for you:
[2] > connect
[3] > kill on
[4] > move 0 1 10000
[5] > camera exposure 1000
[6] > camera focus 1
[7] > camera enable
[8] > interval 1
[9] > camera post 100
[10] > start
[11] > status running
[12] > status shots
[13] > status exposing
... etc
One other thing to note -- when you connect to the engine for the first time since connecting the serial port, it does take a moment for the bootloader and firmware to activate. You're likely getting timeouts from trying to send commands immediately after connecting the first time. Wait a few seconds before issuing commands.
!c
OK replaced with the proper
OK replaced with the proper version. Works but I still get this
Set COM Port: /dev/tty.usbserial-A800ewHQ
[6] > [6] > DBG: connect
Connect: Connected to Engine on port /dev/tty.usbserial-A800ewHQ
[7] > [7] > [7] > DBG: set_motor:0:dir:1
[_openmoco_command] ERROR: Timeout Reading from engine
If I add "sleep 5" after connect I get no timeout errors.
Kill also works, no motor heating and driver is much cooler since it's not providing holding current full time.
Thanks Church.
OK now I reread your post I
OK now I reread your post I get it.
In my script How do I get OM to delay a bit before starting the program. Can I just add "pause 10" after start?
thanks
Before starting the program?
Before starting the program? Add a 'sleep 10' command before the 'start' command.
If you want to add the sleep after calling connect (to prevent timeout errors), just add it after the connect command.
Also, it looks like you're pasting in the scripts? It should be much easier to read the output if you load the script file instead, e.g.
[1] > load 'script.slim'!c