I’ve connected it to 5V using jumper…
We might need a few high resolution in focus images to be able to help you.
It look’s to be an obvious intermittent connection problem. These are usually caused by wires not properly seated onto the posts, or terminals not tightened down all the way, or the processor not pressed all the way into the socket, or worse wires shorting out. Do you see anything like that?
PS please do not send me questions in PM’s…
How long will a fullly charged 6V 1200mAh battery be able to power BRAT???
2-3 hours? Maybe more…
[code]
IF (ABS(Dualshock(6)-128) > TravelDeadZone) AND (BotActive = TRUE) THEN
PS2IN = TOFLOAT (Dualshock(6) - 128)
if PS2IN > 0.0 then
WalkSpeed = (PS2IN/(TOFLOAT TravLength))
WalkAngle = (((PS2IN/10.0) + 4.0) - (TOFLOAT AnkleAdj))
else;if (Dualshock(6)-128) < 0
WalkSpeed = (PS2IN/(TOFLOAT TravLength))
WalkAngle = -(((PS2IN/10.0) - 4.0) + (TOFLOAT AnkleAdj))
endif
command = 1
gosub move
ELSEIF (ABS(Dualshock(5)-128) > (TravelDeadZone*4)) AND (BotActive = TRUE)
PS2IN = TOFLOAT (Dualshock(5) - 128)
if (PS2IN > (TOFLOAT TravelDeadZone)) AND (PS2IN < 70.0) then
command = 14
elseif (PS2IN >= 70.0)
command = 12
elseif (PS2IN < (TOFLOAT -TravelDeadZone)) AND (PS2IN > -70.0)
command = 13
else
command = 11
endif
gosub move
ENDIF
[/code]
I hope the above code is for left analog pad…
What is the syntax to use the right analog pad of the PS2 Remote?
Done!
DualShock(0) ;analog
(DualShock(1).bit0 = ;Select Button test
(DualShock(1).bit1 = ;L3 Button test
(DualShock(1).bit2 = ;R3 Button test
(DualShock(1).bit3 = ;Start Button test
(DualShock(1).bit4 = ;Up Button test
(DualShock(1).bit5 = ;Right button test
(DualShock(1).bit6 = ;Down Button test
(DualShock(1).bit7 = ;Left button test
(DualShock(2).bit0 = ;L2 Button test
(DualShock(2).bit1 = ;R2 Button test
(DualShock(2).bit2 = ;L1 Button test
(DualShock(2).bit3 = ;R1 Button test
(DualShock(2).bit4 = ;Triangle Button test
(DualShock(2).bit5 = ;Circle Button test
(DualShock(2).bit6 = ;Cross Button test
(DualShock(2).bit7 = ;Square Button test
DualShock(3) ;Right stick horz
DualShock(4) ;Right stick vert
DualShock(5) ;Left stick horz
DualShock(6) ;Left stick vert
What are L3 and R3 buttons???
They are pressing down on the actual joysticks…
Kurt
When walking forward/backward, my BRAT takes a slight left turn for every step. It doesn’t walk in straight path.
What could be the problem?
Imbalance of weight or misalignment in mechanical assembly?
Could be all of the above. Could be the servos are not exactly zeroed the same way or could also be that not all servos are exactly the same…
i don’t remember which brat program you are using. If walking forward/backward always uses the same step size or if it is like the mechbrat and it adjusts the step depending on how far the PS2 is pushed.
If it is like the original, something like:
if(command = 1) then ; Walk Forward
gosub movement 7.0,-20.0,-20.0, -7.0, 20.0, 20.0, 500.0]
gosub movement -7.0,-20.0,-20.0, 7.0, 20.0, 20.0, 500.0]
gosub movement -7.0, 20.0, 20.0, 7.0,-20.0,-20.0, 500.0]
gosub movement 7.0, 20.0, 20.0, -7.0,-20.0,-20.0, 500.0]
Where the parameters to movement are in degrees (Right ankle, knee, hip, Left ankle, …)
You can try fudging the numbers slightly. That is maybe for either the left or right hip try changint the 20 to a 20.5 or a 19.5 and see if that helps. Or try Knee, or combination…
Or if it is like the mechbrat, where at least with mine, it has code that looks like:
if(command = 1) then ; Walk
if LastStep = 0 then
gosub movement WalkAngle1, WalkSpeed1, WalkSpeed1, -WalkAngle1,-WalkSpeed1,-WalkSpeed1,500]
gosub movement -WalkAngle1, WalkSpeed1, WalkSpeed1, WalkAngle1,-WalkSpeed1,-WalkSpeed1,500]
LastStep = 1
elseif LastStep = 1
gosub movement -WalkAngle1,-WalkSpeed1,-WalkSpeed1, WalkAngle1, WalkSpeed1, WalkSpeed1,500]
gosub movement WalkAngle1,-WalkSpeed1,-WalkSpeed1, -WalkAngle1, WalkSpeed1, WalkSpeed1,500]
LastStep = 0
endif
You might be able to fudge it there… Or maybe you can fudge it in the Movement function itself. That is maybe you can/need to do some slight adjustment of the conversion from degrees (or 10ths of degree with some versions), to the Hservo value. For example with the old abrat code, it had some code that looked like:
hservo [lefthip\TOINT (-lefthippos*stepsperdegree) + aServoOffsets(3)\TOINT lhspeed, |
righthip\TOINT (righthippos*stepsperdegree) + aServoOffsets(0)\TOINT rhspeed, |
leftknee\TOINT (-leftkneepos*stepsperdegree) + aServoOffsets(4)\TOINT lkspeed, |
rightknee\TOINT (rightkneepos*stepsperdegree) + aServoOffsets(1)\TOINT rkspeed, |
leftankle\TOINT (-leftanklepos*stepsperdegree) + aServoOffsets(5)\TOINT laspeed, |
rightankle\TOINT (rightanklepos*stepsperdegree) + aServoOffsets(2)\TOINT raspeed]
Maybe the right hip needs to move slightly more than the conversion, so maybe instead of multiplying by stepsperdegree, you multiply by something slightly different. Example of stepsperdegree=166.6, maybe for the one servo it should be something like: 166.7…
You can try lots of different things like that.
But of course before you do this, you should try to verify that all of the hardware is setup correctly and that you have the servos zero offsets set correctly.
Good luck
Kurt
If i try to program my BRAT i get a dialog box stating loading, once it is 100% complete i get an error verifying load error.
What could be the reason?
Suppose I replace the battery BAT-03 with a DC wall supply adapter, what range of adapter should i use?
Like 5V,1A Or 6V,500mA
Or 2.0 A regulators???
What is the Ampere rating of the Bot Board II…?
Will it work with 6V, 0.5mA regulated wall pack?
If I use 6V 2800mAh battery instead of 6V 1200mAh battery, the biped will work for more time…
Is that the only difference it makes?
External wall wart should probably be 6V as that is what the servos typically want and it is high enough for the voltage regulator on the board to work with… I believe a 2amp one would work for a brat. A .5ma I am pretty sure won’t…
The 2800mah adds more capacity, but it also adds more weight and bulk. More or less going from a AA size battery to a C size battery. So you need to have a way to hold it and it may change your center of gravity. Also your servos may not like the extra weight (not sure which ones you have)
Kurt
I use HS-422 operating voltage is 4.8v to 6.0v
Can I use 5v 1A External wall pack?
Sounds a little low. 2 A - 3 A would probably be better.
Alan KM6VV