Differences between project board and just picaxe? Eg. buffered darlington drivers

Riku Naskali

New Member
Hi,

I have two picaxe projects, one is just a simple timelapse shutter for Canon cameras, and the other one is stepper driver (using easydriver).

I have two Picaxe starter kits, 18X AXE002 and 08M AXE003. I tried using the 08M starter kit to fire my cameras (they only need +5v applied for about 150 milliseconds) and it didn't work. Same code works fine on the 18X project board, which has those buffered darlington drivers.

And I tried using the 18X project board to drive steppers by connecting it to Easydriver driver board. Easydriver needs a low to high pulse to execute one step. It didn't work either, but the same code worked on the 08M project board.

So what's the deal with these buffered darlington outputs? Why firing my cameras will only work with them, and why driving Easydriver works only without them?

I'm quite baffled...
 

BeanieBots

Moderator
Welcome to the forum.

The output of a PICAXE and the output of a darlington are very different electrically.
Also, the darlington performs an inversion, so high becomes low and vice versa.

A PICAXE output can both push and pull current from and to the load.
A darlington can only pull current. A darlington output can only go high if there is something to pull it high. That could either be the load itself or a pull-up resistor.

In most cases, fitting a pull-up resistor and inverting your logic will make a darlington output appear the same as a direct output.
 

rikun

New Member
Welcome to the forum.

The output of a PICAXE and the output of a darlington are very different electrically.
Also, the darlington performs an inversion, so high becomes low and vice versa.

A PICAXE output can both push and pull current from and to the load.
A darlington can only pull current. A darlington output can only go high if there is something to pull it high. That could either be the load itself or a pull-up resistor.

In most cases, fitting a pull-up resistor and inverting your logic will make a darlington output appear the same as a direct output.
Thank you,

I tried using a pull-up resistor (10kohms between the output and Easydriver, is this on the right place?) and inverting my code.

It sort of works. I can drive the stepper, but it's really really slow. Whereas with Picaxe 08M it spinned full speed, now it just makes one small move at a time.

Easydriver works by detecting a low to high rising edge and then moves the stepper one step on every rising edge. More info can be found from: http://schmalzhaus.com/EasyDriver/

Here is the test code:

08M:

for w0 = 0 to 1600
high 1 'output pin1 sets the motor direction with Easydriver
low 2 'output pin2 moves the motor
high 2 'this rising ege makes the motor move
pause 1 'pause for a very short while
next w0

18X w/ Darlington outputs (CHI33 board):

for w0 = 0 to 1600
low 1
high 2
low 2
pause 1

Am I missing something...? Please bear with me, I don't know too much about electronics. I just put pieces together ;)

Ahem, I think I misunderstood inverting. How would one do that correctly...?
 
Last edited:

BeanieBots

Moderator
Sounds like you have put the 10k pull-up in the right place.
Inverted logic is simple. Whenever you have a high, change it to low and vice-versa.

The darlington output makes a high on the PICAXE look like a low and a low then looks like a high. (assuming the 10k pull-up is fitted)
It will NOT affect speed. That is entirely down to how often your code changes the output state. The same code (but with inverted logic) should produce the same results.
 

rikun

New Member
Ok then,

I had it all right. Currently I'm running my Easydriver with the Darlington chip replaced with 330 ohm resistors.

Now it's working, but... I still have a problem with speed. Now I'm able to run my stepper with full speed, but whenever I try to slow it down it won't move. Any stepper experts here?

Setup once again:

Picaxe driving Easydriver V3 1/8th microstepping driver board.
24V Astrosyn stepper, around 300mA current, torque=?
Stepper connected to a rotary table.

Here's the code and the problem:

if the_end > 30000 then
for counter = 30000 to the_end
pause 1000 'this is the problem
high 1
pulsout 2, 10
low 2
next counter
endif

Okay, it works fine if I don't insert any pauses inside the for...next loop. When I insert any pause, the motor won't move at all. It tries, but it feels like it doesn't have the power to get moving...
 

BeanieBots

Moderator
I'm not surprised.
Your code is all over the place setting pins and low, chaning direction with every step.

I'm not sure which controls what on your setup but try this.

Code:
SYMBOL PulsPin = 2 '(change if I've got it wrong)

high PulsPin

do
    pause 500
    pulsout PulsPin,10
loop
Try that with different/no pause values and see what happens.
 

rikun

New Member
Oh damn,

I missed that I was changing direction INSIDE the loop. How stupid. Well, I'll remove it, hope that helps :)

Actually I'll have to set a couple of pins high and low inside the loop to trigger my camera, but definitely not change direction.
 

BeanieBots

Moderator
Are you now happy about the difference between direct output and via a darlington?
Are you clear about how to invert as/when required?
Is it clear why you need a "high pin" initially before using pulsout when inverted?
Do you understand why you need a pull-up on the darlington output?

Besides those issues, looks like it was just a silly in the code.
 

rikun

New Member
Yeah I pretty much understand all the issues.

But, my stepper is actually not running at all now. That must be a hardware problem, have to change all the parts to debug :/

I wish the code solved the speed issue, can't really try yet.
 
Top