first of all before I say anything is do you connect a 12v sla battery in series (+ to -) or parallel (- to -) with the charger?
Right, my project.
I have an Xbee and picaxe 18 connect kit connected to my computer and another xbee/connect kit on my robotic project which receives signals and tells various picaxe chips to control...
4 servos (axe 031 servo driver) for robotic arm >>> 18x
2 motors for the wheels(tracks) >>> 08M
1 motor for the claw of robotic arm >>> 14M
a temp, gas and light sensor (light turns on/off 12v light) >>> same 14M as above.
My first problem is that the communication doesnt seem to get all the way from the computer to the "end of the line" picaxes 100% of the time.
I created a visual basic program that allows you to control everything on the project (forward, reverse, the claw etc etc) by talking to the xbee/connect kit.
I know the computer is sending to the xbee connected to it and I know the xbee on the robot is receiving information but something seems to be going wrong at around this stage when the xbee/picaxe connect tells the "end of the line" picaxes what to do.
When I tell it to go forward for example, about %40 of the time it will go forward and everythings smooth but the rest of the time nothing happens.
Could this be a timing issue?
Code:
'The xbee connected to the computer transmits the numbers 2 and 1 to tell the robot to go forward
forward:
b0 = 2
b1 = 1
pause 50
Serout 7, T2400, (b0,b1)
goto compc
'this is the xbee on the robot that recieves wirelessly and sorts out what needs to be controlled
SerIn 7, T2400,b0,b1
if b0 = 1 then arm
if b0 = 2 then wheels
if b0 = 3 then sensors
goto main
arm:
if b1 = 1 then acw1
if b1 = 2 then cw1
if b1 = 3 then acw2
if b1 = 4 then cw2
if b1 = 5 then acw3
if b1 = 6 then cw3
if b1 = 7 then acw4
if b1 = 8 then cw4
goto main
wheels:
if b1 = 1 then forward
if b1 = 2 then back
if b1 = 3 then left
if b1 = 4 then right
goto main
sensors:
if b1 = 1 then temp
if b1 = 2 then gas
if b1 = 3 then light
goto main
'in this case the xbee tells the "end of the line" 08m that it needs to move forward
forward:
b4 = 1
serout 2,n2400,("ABC",b4)
goto main
'this is the recieving snippet for the "end of the line" picaxe 08m that runs the wheels
serin 3, N2400,("ABC"),b0
if b0 = 1 then forward1
if b0 = 2 then backward1
if b0 = 3 then left1
if b0 = 4 then right1
-----------------------------------------------
My second problem is running all 4 servos off 4 aa batteries giving 6v and they seem to run dry in less than an hour??? the axe031 is designed to run 21 servos from a single 6v supply? any help on this?
Cheers
I know its a bit long winded bit its a big project for me and I just need to wrap it up.
Right, my project.
I have an Xbee and picaxe 18 connect kit connected to my computer and another xbee/connect kit on my robotic project which receives signals and tells various picaxe chips to control...
4 servos (axe 031 servo driver) for robotic arm >>> 18x
2 motors for the wheels(tracks) >>> 08M
1 motor for the claw of robotic arm >>> 14M
a temp, gas and light sensor (light turns on/off 12v light) >>> same 14M as above.
My first problem is that the communication doesnt seem to get all the way from the computer to the "end of the line" picaxes 100% of the time.
I created a visual basic program that allows you to control everything on the project (forward, reverse, the claw etc etc) by talking to the xbee/connect kit.
I know the computer is sending to the xbee connected to it and I know the xbee on the robot is receiving information but something seems to be going wrong at around this stage when the xbee/picaxe connect tells the "end of the line" picaxes what to do.
When I tell it to go forward for example, about %40 of the time it will go forward and everythings smooth but the rest of the time nothing happens.
Could this be a timing issue?
Code:
'The xbee connected to the computer transmits the numbers 2 and 1 to tell the robot to go forward
forward:
b0 = 2
b1 = 1
pause 50
Serout 7, T2400, (b0,b1)
goto compc
'this is the xbee on the robot that recieves wirelessly and sorts out what needs to be controlled
SerIn 7, T2400,b0,b1
if b0 = 1 then arm
if b0 = 2 then wheels
if b0 = 3 then sensors
goto main
arm:
if b1 = 1 then acw1
if b1 = 2 then cw1
if b1 = 3 then acw2
if b1 = 4 then cw2
if b1 = 5 then acw3
if b1 = 6 then cw3
if b1 = 7 then acw4
if b1 = 8 then cw4
goto main
wheels:
if b1 = 1 then forward
if b1 = 2 then back
if b1 = 3 then left
if b1 = 4 then right
goto main
sensors:
if b1 = 1 then temp
if b1 = 2 then gas
if b1 = 3 then light
goto main
'in this case the xbee tells the "end of the line" 08m that it needs to move forward
forward:
b4 = 1
serout 2,n2400,("ABC",b4)
goto main
'this is the recieving snippet for the "end of the line" picaxe 08m that runs the wheels
serin 3, N2400,("ABC"),b0
if b0 = 1 then forward1
if b0 = 2 then backward1
if b0 = 3 then left1
if b0 = 4 then right1
-----------------------------------------------
My second problem is running all 4 servos off 4 aa batteries giving 6v and they seem to run dry in less than an hour??? the axe031 is designed to run 21 servos from a single 6v supply? any help on this?
Cheers
I know its a bit long winded bit its a big project for me and I just need to wrap it up.