Arduino and Picaxe

ZOR

Senior Member
Can Arduino high/low outputs be put into Picaxe Pins to make Picaxe inputs high/low?

Can one simply stick a 1k resistor between the two pins or isn't life that easy?

Thanks
 
Last edited:

hippy

Technical Support
Staff member
You should be able to connect any microcontroller output into a PICAXE input. In most cases the voltages will be compatible.

A 1K resistor in series should prevent any catastrophes when the input pin is accidentally or inadvertently made an output but can be left out if prepared to live with that risk.
 

stan74

Senior Member
They use 3.3 V logic like RPi (get a real puter). L239D doesn't work. There's cheapo logic converters on ebay.
 

ZOR

Senior Member
Thanks stan74. 3.3v, I thought Arduino works on both 3.3v and 5v?

Is there something better than the L293D? - use for small bipolar stepper.
 

stan74

Senior Member
Probably but I like it.It stopped working at 4.5V which I didn't realise because I've always used a 5V reg.The steppers I bought on ebay came with uln2003 drivers which is seven npn darlington transistors and uses less current.
 

Goeytex

Senior Member
Some Arduino's are 3.3V, some are 5V. Look at the specs for your device --- Or take a voltage reading with a pin set high. For basic I/O stuff either should work OK without level shifting. However, for I2C stuff between a 3.3v Arduino and a 5V Picaxe you may want to consider level shifting. Or you could just operate the Picaxe at 3.3V

Good Luck
 

ZOR

Senior Member
Thanks all. The Arduino part is using a Pro Mini board which I am using a library for 2.4g TX/RX. (Nrf24Lo1).The Picaxe part will control 2 steppers, 1 Bipolar and 1 Unipolar. Yes the unipolar is easy from Ebay 28BYJ-48 with the darlington driver, it's the unipolar that always gives me grief. I have been trying the A4988 drive board but finding many don't work (the cheap Chinese ones). I like the Picaxe as it's easier to get up and running and flexible.
 

stan74

Senior Member
Thanks all. The Arduino part is using a Pro Mini board which I am using a library for 2.4g TX/RX. (Nrf24Lo1).The Picaxe part will control 2 steppers, 1 Bipolar and 1 Unipolar. Yes the unipolar is easy from Ebay 28BYJ-48 with the darlington driver, it's the unipolar that always gives me grief. I have been trying the A4988 drive board but finding many don't work (the cheap Chinese ones). I like the Picaxe as it's easier to get up and running and flexible.
I just wired up the 28YBJ-48 Stepper Motor with Gear Reduction from ebay with drivers with 4 leds and this code and it worked 1st time.Pity it uses 4 pins and I need 2 motors.I'll need a timer interrupt to control them.
Code:
[color=Green];28x2 a.0 to a.4 [/color]
[color=Blue]setfreq m16
symbol [/color][color=Purple]posrotor[/color][color=DarkCyan]=[/color][color=Purple]b0[/color][color=Black]:[/color][color=Blue]symbol [/color][color=Purple]direc[/color][color=DarkCyan]=[/color][color=Purple]b1[/color][color=Black]:[/color][color=Blue]symbol [/color][color=Purple]counter[/color][color=DarkCyan]=[/color][color=Purple]b2[/color][color=Black]:[/color][color=Blue]symbol [/color][color=Purple]outbyte[/color][color=DarkCyan]=[/color][color=Purple]b3[/color]
[color=Blue]let [/color][color=Purple]dirsa[/color][color=DarkCyan]=[/color][color=Navy]%11111111[/color][color=Black]:[/color][color=Blue]let [/color][color=Purple]posrotor[/color][color=DarkCyan]=[/color][color=Navy]1[/color][color=Black]:[/color][color=Blue]let [/color][color=Purple]direc[/color][color=DarkCyan]=[/color][color=Navy]1[/color]

[color=Blue]do
gosub [/color][color=Black]move[/color]
[color=Blue]loop[/color]

[color=Black]move:[/color]
[color=Blue]if [/color][color=Purple]direc[/color][color=DarkCyan]=[/color][color=Navy]0 [/color][color=Blue]then inc [/color][color=Purple]posrotor[/color][color=Black]:[/color][color=Blue]if [/color][color=Purple]posrotor[/color][color=DarkCyan]>[/color][color=Navy]8 [/color][color=Blue]then let [/color][color=Purple]posrotor[/color][color=DarkCyan]=[/color][color=Navy]1[/color][color=Black]:[/color][color=Blue]endif 
else[/color][color=Black]:[/color][color=Blue]dec [/color][color=Purple]posrotor[/color][color=Black]:[/color][color=Blue]if [/color][color=Purple]posrotor[/color][color=DarkCyan]<[/color][color=Navy]1 [/color][color=Blue]then let [/color][color=Purple]posrotor[/color][color=DarkCyan]=[/color][color=Navy]8[/color][color=Black]:[/color][color=Blue]endif
endif
lookup [/color][color=Purple]posrotor[/color][color=Black],[/color][color=Blue]([/color][color=Navy]0[/color][color=Black],[/color][color=Navy]%00000011[/color][color=Black],[/color][color=Navy]%00000010[/color][color=Black],[/color][color=Navy]%00000110[/color][color=Black],[/color][color=Navy]%00000100[/color][color=Black],[/color][color=Navy]%00001100[/color][color=Black],[/color][color=Navy]%00001000[/color][color=Black],[/color][color=Navy]%00001001[/color][color=Blue])[/color][color=Black],[/color][color=Purple]outbyte
pinsa[/color][color=DarkCyan]=[/color][color=Purple]outbyte[/color]
[color=Blue]return[/color]
 
Top