Spike Prime Robot – Lego

This fall I picked up a Spike Prime kit that I plan to use with my robotics courses. A number of students have worked with it but until now, I haven’t had a chance to really use it! Here’s the design I came up with to use with my grade 9 class. The senior classes will be expected to develop their own designs.

McT's Spike Prime Robot
Spike Prime Robot
  • Left and right drive motor allows the robot to drive and turn.
  • Roller at front is centered helping to keep the robot from drifting.
  • Outside rail supports the wheels on the outside – this helps reduce the chance of the wheel being on a slight angle causing the robot to drift.
  • Bumper sensor at front can add an axle to extend it’s distance. It can also be repositioned very easily to the sides or back.
  • Colour sensor is very close to the ground and perpendicular to the ground to provide good line following capabilities.
  • Since the colour sensor is held with one pin, an axle was used to secure the side of it.
  • Ultrasonic sensor in front is designed so you can easily flip the L beams to have it lower if required. It is important that cables are securing using the cable clips to ensure the ultrasonic sensor doesn’t read the distance to the cable!
  • Motor mounted to the back can be used to control manipulators at the front and back of the robot (see the bottom view below).
Bottom of the robot
Bottom view of the robot
  • The long axle from the back motor goes between the two drive motors. An angle connector is used near the front to stabilize the axle preventing gears from slipping.

Build Plans

I made the build plans in Studio. It is pretty impressive CAD software for Lego. Prime Lessons has a slideshow showing how to install it and the custom part pack so you have the prime pieces. Brick Owl has a great itemized list of the part numbers in Spike Prime which made it very easy to find the parts.

Electrical

The motors and sensors were connected as follows:

A – right drive motor

B – left drive motor

C – Pressure sensor (button)

D – Colour sensor (line following)

E – Ultrasonic Sensor

F – Motor for manipulators

Programming

Motors in programming
The Set movement motors programming block

I’ll be working on some programming tutorials. The Spike App is pretty slick. Bluetooth seems to work much smoother than the EV3. A couple of key concepts – the set movement motors block is great, you can select which motor combination you are using. If the orientation is wrong, just click on it to switch which motor is left and which is right.

Sensors in programming
Sensors

With the brick connected you can see the values of the various sensors. The colour sensor was easily identifying different colours so I’m confident that line following will be easy. The biggest difference compared to the EV3 motors is the absolute encoder in the motors. There is a little mark on each motor that indicated the zero position. This is really handy – the wheels even have a little circle that you can use to ensure everything is zeroed (assuming you assembled it that way!)

Leave a comment