Creepy Crawly Cockroach

by littleBits October 21, 2013

Through a combination of LEGO and littleBits, we were able to create a super smart cockroach that reacts to its environment just like a real one would. It is able to navigate tricky spaces and it scurries when it is exposed to light. When it finds a dark place to hide, it lays low and stays put. 


How it works:

Navigation - The two bend sensors act as sensing antennas to help the cockroach navigate its surroundings. When the cockroach approaches a wall, the closest bend sensor will be activated. This will cause the opposite wheel to stop spinning due to the inverter before the dc motor, steering the cockroach away from the wall.

Shadow Seeking - The cockroach has two light triggers. The light trigger is set on light mode, so when each of the sensors sees light, the wheels spin. When a light trigger sees darkness, it's corresponding wheel stops spinning, making it so the cockroach turns toward the darkness. If both light sensors are in the darkness, the cockroach stops moving completely.

Bits used: bend sensor, dc motor , fork, inverter, light trigger, long led, power , wire

Difficulty: Intermediate

Tags: Light Motion Logic Gadgets Around the house

Videos

Instructions

  1. 1

    Start with building the circuit. Look at the circuit diagram to see how to set it up (https://littlebits-production.s3.amazonaws.com/uploads/supporting_file/asset/212/cockroach_circuit.p...). Set the light triggers to light mode.

  2. 2

    Make a cockroach out of Lego blocks. The design of your cockroach is totally up to your imagination, but we have some tips that will be helpful to get your cockroach working properly: Firstly, this cockroach robot makes turns by stopping a wheel from spinning on one of the sides. We recommend that you have three wheels rather than four in order to help with the steering. Secondly, the wider the distance between two wheels, the bigger a circle it makes when it turns. This makes it difficult to evade a wall without hitting it. However, if the body is too small and narrow, there will not be enough room for all the bits to sit on the body. Our cockroach is about 4 inches wide.

  3. 3

    Place the antennas on your cockroach. For this project, the orientation of the Bits Modules is quite important. The left antenna (bend sensor) affects the right wheel and the right antenna affects the left wheel. The bend sensors should be located at the front of the cockroach to act as antennas and sense any obstacles. The bend sensors should also be flipped upside-down because they are only triggered when they bend one way. Do some tests with your design and find the appropriate position and orientation for them.

  4. 4

    Lay the rest of the circuit on the top of the cockroach (except for the DC motors). Do not forget that left bend sensor is followed by right inverter/light sensor/DC motor and right bend sensor is followed by left inverter/light sensor/DC motor. To attach the Bits Modules to Lego, we used a custom 3d-printed part, but you can use a double-sided tape like 3M VHB. 3M VHB tape gives very strong bond and very clean surface after removal. Glue dots are another option.

  5. 5

    Add Lego wheels to your DC motors using the motorMate. The motorMate fits a Lego-sized axle, and then you just need to add the wheels. Attach the DC motors to the bottom of your cockroach’s body. We used another special accessory (in development and coming soon!), but again, you can use VHB. The DC motors should be located somewhere in the middle of the body, and you will want to make sure to change their direction mode so that both motors rotate towards the front of your cockroach.

  6. 6

    Add a transparent lego part at the tip of the long led to make a pilot light.

  7. 7

    Turn the power on and let the cockroach go! It may evade walls and any obstacles on its way and goes toward shade until it takes rest under dark place like under the sofa.

Bits used (17)

Other Materials Used (2)

  • legos 1
  • VHB tape or Gluedots 1

Other files

  • Be the first to comment!

Must be logged in to comment. Sign in. Not a member? Join now

Join our newsletter!

You’ll get exclusive offers, project ideas & other goodies.

Copyright 2011 - 2013, littleBits Electronics Inc. All rights reserved.


littleBits Electronics, Inc. supports the Open Source Hardware Statement of Principles by making the circuit designs for its modules available pursuant to the CERN Hardware License Version 1.2. See our FAQ for further details.