Advanced tracked LEGO vehicle

An attempt to make an autonomous LEGO vehicle on tracks with a Raspberry Pi Zero as a controller.

Similar projects worth following
The final goal is making an autonomous LEGO vehicle. I will start however with an ROV operated with a Buetooth gamepad. The project is one of my projects that will help me to gain knowledge in Python, Computer Vision, Object Recognition and maybe more interesting stuff.
In the hart of a vehicle is a Raspberry Pi Zero W with Explorer pHat. The eyes consists of a Pi NoIR Camera and will be complemented by distance sensors. The skeleton is made of LEGO Technic. The limbs are tracked chassis and transmission inspired by Sariel's LEGO Workshop. The muscles are two DIY motors. The blood is a 5V noname PowerBank.
More to come as soon as parts from China and other places arrive.

This is my first project published on Hackaday and I expect to meet new and intersting people that could help me with some nice ideas.
One of the ideas behind the project is to make a vechicle as low-cost as possible, that's why I am not going to use here LEGO PowerFunctions or NXT, LIDAR etc.

So what is the current status of the project and what it can do at the moment? 

As is mention in the description the vehicle has a rather advanced transition that is composed of substractor mechanism using Sariel's (a famous LEGO Technic creator) building instruction. Why would I use that? I have another vehicle that uses two separate hobby DC motors to drive each track. The control of such vehicle is quite stupid - you have to change the speed of each DC Motor to control the vehicle. Even to move forward you always have to adjust the speed, as the motors behave really differently. 

The idea of using a substractor is to use a powerful motor to drive a vehicle forward and backward and then a smaller motor to make turns and pivots. Unfortunately the small motor I am using now is not powerful enough to overcome friction of gears and mass of a vehicle so I can turn only by going either forward or backward.  It's not that big of a deal for now but will have a huge effect when I will need a vehicle to become more or less autonomous. 

The vehicle is controlled via Pimoroni's Explorer pHat . It's not really made to drive powerful motors but it seems to work fine for me at the moment. It also allows me to use 5V outputs for lights and have analog outputs that I am going to use for Sharp IR distance sensors. A bit not enough pins though so I will need to use some more very soon.

The vehicle is controlled by a PS3 clone Bluetooth joystick. It was a pain to connect it, in the end I could do it now following any instruction but just using single script of RetroPie. Worked perfectly for me. on Pi Zero W. I couldn't make it work with Bluetooth USB stick to wokr on Pi Zero. The Python script is run on Pi Zero W that uses PyGame to interact with gamepad. I'll share the code later but there's absolutely nothing special about it. Still need to make a check to make sure gamepad can be used again if connection is lost or time-out. 

The vehicle has a Pi NoIR camera and video is streamed using RPi Cam Web Interface and can be used to guide the vehicle. 

I also tried to use OpenCV object recognition to detect a get on pictures but it takes way too much time on Pi Zero W. I am thinking to do the object recognition on some other computer or in the Cloud. Still figuring our how to do that. 

  • 1 × Raspberry Pi Zero W
  • 1 × Explorer pHat
  • 1 × Raspberry Pi NoIR Camera V2
  • 1 × LiPo SHIM
  • 1 × single cell 3.7V 2500 mAh LiPo battery

  • Pics for today's log

    igor nakonechnyi09/23/2017 at 20:30 0 comments

  • Updated the power supply

    igor nakonechnyi09/23/2017 at 20:22 0 comments

    I was not happy to use PowerBank to power the vehicle. As it uses Explorer pHat to control the motors it works on 5V. Thus obvious choice was single cell LiPo battery. So I've got a 2500 mAh LiPo battery, charger and Pimoroni's LiPo SHIM. Also I had to rebuild the vehicle quite a bit to fit the battery. I managed to place everything in a much more compact way than it was before.

    Apart from that I soldered different pin header to Explorer pHat. The one I had before did not allow to access any other GPIO's apart from one on the pHat. Now I have access to almost all of them. SHIM board would actually be soldered to the pHat as well. I'll order a new SHIM for that and use the one with the headers for my Pi3 with a display. Also the way all the peripherals are connected does not look good so that will be changed as well. 

    What's coming next?  

    I finally  received two things and will implement them: first few slip rings and I'll be trying to make some sort of LIDAR system with ultrasonic sensor and a stepper. We'll see if it's not gonna work It will become something like a turret, maybe with a laser. 

    Second - I've got high-power IR LEDs which will replace a low-power one I already have. WIth that I'll finally be able to operate in the night vision mode. 

View all 2 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates