Control of the gun

Last weekend saw the progression of the gun from a conceptual design to one which was actually mounted on the robot and powered by working motors. It was still manually controlled though (by physically switching the motor on or off). So this week, the goal was to get it under remote control, along with the driving.

Now, last year, this would have been easy, as the basic “brick” for our robot had four motor drivers on it (we only ever used three, and the third was only used for the skittles competition). However our design this year is radically changed, and we only have a single pair of motor drivers. A gun control motor though only needs to have an on/off switch – there’s no need to control the speed of operation – so in theory this shouldn’t be a problem. Just use a GPIO pin, right? Well, sort of. The problem is, our motors are running off a much higher voltage than the pi, and higher current too. The solution is a relay switch, allowing the low voltage/current GPIO pin to send a signal which switches the high voltage/current motor on or off. And as you can see in the video below, it seems to be working. (We used a 5V SPST Sealed Reed Relay from Maplin, together with a BC 547 transistor, a 1.2K resistor and a diode. It’s not necessarily the best way to do it, but Angus asked for an “electric switch,” so we sent him here for the background and designed from that.)

Next on the agenda for the gun is adding a laser targeting system… and testing to make sure the scatter of projectiles isn’t too wide!

Leave a comment