1 week ago

FRED-209: Nerf gun robot! You have 20 seconds to comply…

FRED-209 is a fun robotic project that mounts a Nerf gun on top of a robot chassis.

While well-known Pi community member David Pride admits that Nerf guns hadn’t been invented when he was a youngster, his interest was sparked when he saw two tables full of Nerf gear at a car boot sale. “I started wondering whether you could operate the trigger mechanism with a servo – turns out you can!”

Following some successful experiments firing smaller, single-shot Nerf guns using a servo, David turned his attention to larger Nerf models. “[I] realised that there are essentially two types: the pump action ones and those which use two flywheels to propel the dart. I didn’t know exactly how the mechanism worked until I actually took one to bits!”

A long threaded bar converts motor rotation into lateral movement to tilt the whole firing mechanism (not shown) up or down for aiming purposes

 

Fred-209: Nerf gun robot

Initially, David simply strapped an upside-down Nerf gun to the top of his 2017 Pi Wars robot, X-Bot. “I realised that this wasn’t really going to cut it, so set about designing and 3D-printing a complete setup that I could mount on top of a bot. It uses the original Nerf flywheels, and the original Nerf magazine which can hold six darts. The rest is all 3D-printed. I also designed a simple mechanism to translate servo movement into lateral movement to push the dart into the launcher.”

During the two months of evenings and weekends he spent working on the project over the summer, several design changes were made. “The biggest disappointment was that the huge chunky motors I had didn’t have enough torque to turn the bot successfully. Getting the right motors is an area where I am definitely still learning and it’s a critical factor to get right in building a successful bot.”

Since he’d already bought a Dagu Rover 5 chassis, David opted to mount his Nerf mechanism on that until he obtained some stronger motors. He also dropped the original chunky wheels in favour of smaller ones with caterpillar tracks.

Fred-209

Controlling Fred-209 with a PS3 joypad

Controlled manually using a wireless PS3 joypad, FRED-209 can fire multiple foam darts at the chosen target(s). Its twin motors are driven using a ZeroBorg board, while the firing servo is connected directly to the GPIO 18 PWM pin on the Raspberry Pi. A tilt mechanism for aiming is controlled by the joypad’s shoulder buttons.

David describes the robot’s public debut at the Cotswold Jam as ‘controlled chaos’. “It went down extremely well. I built some ‘evil alien’ targets to give the participants something to aim at – apart from each other!”

Continuing work on the project, David plans to power it with LiPo batteries – “It currently runs on 14 (!) AA batteries which really don’t last very long as the drive motors and flywheel motors are pretty greedy.”

He also plans to add a camera to enable FRED-209 to find and fire at targets automatically. “I did some very simple vision processing for 4-Bot, my Raspberry Pi Connect 4 robot, but this takes it up several levels. I am currently learning OpenCV and SimpleCV for vision processing… The plan is the bot will recognise colour/shape to locate target. I can see it working well as a burglar detector… providing the burglar is wearing a black and white stripy shirt and carrying a bag marked ‘swag’!”

Fred-209: Build a Nerf dart-firing robot

Step-01 Servo pusher David 3D-printed most of the parts for his Nerf firing mechanism, including the servo pusher. An arm connected to the servo moves a rod forward to push the dart from the magazine.

Step-02 Flywheel flinger The dart is pushed into twin rotating flywheels which propel it rapidly down the barrel. These, along with the robot’s drive motors, require a lot of battery power.

Step-03 Completed mechanism The 3D-printed lid has a slot to load the upside-down Nerf gun magazine. A roller underneath moves along to tilt the whole mechanism up and down to aim.