X-BRAT Autonomous Mech Warfare Robot

Looks great. I was just wondering what you are actually shooting. I probably need to get some to test mine out.

Kurt

Now that’s what I’m talking about! :smiley:

…and they said it couldn’t be done… :stuck_out_tongue:

Not sure if this has been asked before, but what servos are you using for the pan/tilt of the turret? It looks they’re having a little difficulty with the weight.

Good idea and a hopper could be made using the same container with a funnel placed inside the container, or mold a bottom tray that has slopes going towards the center orifice.
like this —> |_/|

This is incredible, nice job! Looking forward to seeing what else you think up! Very nice videos! Congratulations!

I was thinking about something like that. The solution may be even simpler…I notice that sometimes the bb’s around the feed hole stick to the double stick tape I’m using and that could very well be causing the problem. I’m sure I will solve it when I get to that stage.

Mark

Some not so good news is that I smoked one of the traces on the bot board when I was running both guns. Lucky for me the smoked trace was easy to fix as it was the power connector trace on top of the board by the VS = VL jumper. I tried a very short test after that and then smoked the motor from one of the guns. It is possible that I burned a gun motor and it started to draw too much power from the BB2.

I’m probably going to end up feeding the gun power to the pico switch relays direct from the battery instead of going through the BB2 just to be on the safe side.

The good news is that aside from the one fried gun motor all is fine with X-BRAT and I should have all of these problems fixed…maybe I should put in a 5V regulator to drop the gun motor voltage from 7.4V down to 5V…maybe even 3.3V. At 7.4V I’m shooting each gun at just under one round/sec so he is shooting 2 bb’s/sec.

Mark

What are the proper ratings for the guns? I’d suggest fusing your power supply or battery leads!

Alan KM6VV

Don’t think it has been asked before…I’m using 645’s for all of the servos including pan/tilt…I don’t think I’m having any problems with them handeling the weight. What makes you think that? The slight oscilations you see when he is tracking and moving the head are due to my code. I have not implemented a proper PID loop for the head positioning. The servo speed moves proportional to ammount it is ‘off’ from the target, but I did not do the derivative to account for proper acceleration and deacceleration in the PID loop. It was a compromise. I think that is why it ‘looks’ like it is having trouble. I just pushed it just to the brink of ‘hunting’. I could slow it down a little if there is need. I will cross that bridge when I work on better aiming and alignment of the guns. Only the first shot will be off a bit and in real combat the head will have time to stabalize for most of the firing.

Make sense?

Mark

Not sure…they sure ‘look’ like 3V motors and can probably be driven continuously at 6V…I think I’m pushing it at 7.4V. It may just be that one of the motors was ‘bad’ or I just fried the commutator due to the sustained use at high voltage.

Once I have it all worked out I will post the solution here. Like I said in the previous post I will have to re-do some of the power delivery. If the motors tolorate it I will hook them directly to the lipo battery through the pico switches and that will offload the BB2 as well.

Mark

No, there is no way to shoot video through the CMUcam2…well, not entirly true I COULD grab the PAL video stream off the camera (which is in B/W btw) and record that but it would be a royal pain.

You just gave me a good idea though…I have one of those micro stick cameras which I could mount it next to the CMUcam2 and then I could use that to show what the CMUcam2 sees…great idea! I will do that as soon…

Mark

We’ve only used the guns with 6vdc NiMH. I’d put a 5-6vdc vreg on the bugger. I wouldn’t sweat the 645’s they seem to be doing great! Again, nice job!

Thanks…that is what I will try next as well as offloading the BB2 board. That trace made a nice fuse! lol
Mark

Good news. Solved the motor problem. It seems that due to having to solder the motor wires on many times (since I was too lazy to hot glue the wires on the motors so they wouldn’t fatigue) I melted an internal washer that jammed up the motor causing too much current draw. The brushes and commutator were fine so it looks like running them at 7.4V should not be an issue. Now I just have to replace the motor on the gun until my next batch of guns come in.

All is well and this was only a small setback.

Mark

Yup. Makes perfect sense. I just saw the turret consistently overshoot and have to move back so I wasn’t sure if it was the servos overshooting or the code.

Doh!!! I hate it when that happens… :smiley:

I have it all fixed now and am trying to solve the difficult timing problem of alternating aiming between the 2 guns. Now that I replaced one of the motors with a motor from a diffrenet gun they do not stay in sync. The new motor amplified the problem but it is definetly something I need to syncronize in the code. I have a few ideas to do this.

This is really only a problem for autonomous mechs and it is solvable but will take some time to figure out the best way to do it with the internal switch polling.

Mark

Yes that is exactly it! Since I don’t have a full PID loop coded it is a trade off between speed and overshoot. It is VERY fast now even with the overshoot. Remember in combat this will only really affect the first shot when the head needs to move far before it locks on so it is really a minor issue I don’t have time to fix right now. Maybe in the future a REAL PID loop would be the way to go but this will involve some complicated floating point math and probably slow everything down.

Has anyone experimented with doing floating point PID loops for servo positioning with the Atom Pro?

If anyone is not familiar with PID control just google PID loop and you will find a ton of info. Stands for Proportional Integral Differential.
Mark

Hello Mark, I am new to this forum but i am on many others, I am into a scoutmech and can engineer very well but coding no good at all. i am in awe at your coding skills Mark wish i had your knowledge in that area. here is a link to show you where i am at with my mech and hope u enjoy. Thank you for your sharing in your projects. robosapienv2-4mem8.page.tl/E … -Scout.htm All servos are hsr 5990 st 14 in total. this Mech has not taken any steps yet [sad] i know. has bottboard2 and an sc32ver2 controller if needed . not sure yet. as you are using a Brat the scout will need different code as it has reverse knee joints. mmmmmmmmmm.

Can you please tell me the code for autonomous targeting of BRAT Biped??? i don need the shooting part just the focusing and turning its head as the object moves…

Where can i get those guns like the one you have used???