Introduction: Light Up Boe Bot

To make this masterpiece with the capabilities of obstacle direction, light indication and sound, you will need:

-A fully functional Boe Bot

-Lots of circuit wire

-Tinfoil

-Cardboard

-Stapler

-Popsicle sticks

-Wire Strippers

-Small Pliers

-A hot glue gun and hot glue

-Electrical tape

-1 circuit speaker

-2 common cathode LEDs

-6 1K resistors

-2 10K resistors

-1 10uf capacitor

Shall We Build it?

Step 1: Creating the Bumpers

To make the bumpers, you'll be making use of the:

-wire

-tinfoil

-cardboard

-hot glue

-Popsicle sticks

-stapler

1. What you will want to do first is cut out a piece of cardboard and fold it in half (see 2nd and 3rd image) (DO THIS x2).

2. Next, you'll take a wire around 20cm in length and strip both ends, but one longer than the other. Then twist the longer stripped end into a spiral (See 4th image) (DO THIS x4).

3. Take a piece of tinfoil and fold it in half so that it is small enough to fit on the surface of a cardboard inner fold. Then staple the spiral of the wire to the tinfoil by stapling through the whole fold (see 5th and 6th image) (DO THIS x4).

4. Glue one side of the tinfoil piece to one inner fold of the card board. (DO THIS FOR EACH INNER FOLD, SO x2 PER CARDBOARD PIECE (BASICALLY x4)) Be careful not to touch the tinfoil when gluing, as it will conduct the heat and burn your fingers (see 6th image).

5. Glue two Popsicle sticks together (DO THIS x2 and make one considerably larger), and glue one Popsicle connection to the back of each cardboard fold, and one doing the same thing at the opposite side (see 1st image).

6. One last touch to make the bumpers stay close together, is to tie off the middle to a restricting length for the bumpers. Once tied, glue it and let it dry to ensure security of it (see 1st image).

You Have Successfully Created Your Bumpers!

Step 2: Mounting the Bumpers

To mount the bumpers to the Boe Bot, you'll be using the:

-Boe Bot

-Your new bumpers

-Hot glue

-Electrical Tape

This step is fairly simple. All you need to do is take a piece of electrical tape, and put it along the metal area just above the black ball wheel with an axle. Once taped, hot glue the area with tape, stick the bumpers on, and press on it until dry in order to mount.

Now That The Bumpers Are Ready, Let's Get Into The Circuit!

Step 3: Creating the Circuit

To create the circuit you'll need the:

-Boe Bot

-Wires connected to bumpers

-Wire strippers

-Small Pliers

-Circuit wire

-1 circuit speaker

-2 common cathode LEDs

-6 1K resistors

-2 10K resistors

-1 10uf capacitor

For the the circuit you will want to connect everything as shown in the first image. The 2nd, 3rd, and 4th image are all a part of the first one (just split up to make it less confusing). The 2nd image is the bumper circuit, the 3rd is the cathode circuit, and the 4th is the speaker circuit.

Once done, you can electrical tape the circuit speaker to the platform below the basic stamp on the Boe Bot so it doesn't dangle.

One More Step, The Hard Part Is Over!

Step 4: Adding the Code

To ensure the code works properly, you will first want to make sure the right servo motor is in the plug for pin 12, the left servo is in the plug for pin 13, and that the circuit is exactly as shown in the previous diagrams.

Lastly, you will need to input this code into Basic Stamp, plug in the robot, and finally: RUN IT.

Here is the code written out, but you can also download the basic stamp file, and that should work too.

Anything with an apostrophe before it is comments, but ' {$STAMP BS2} and ' {$PBASIC 2.5} are necessary.

'************************************************************************
' Name: William

'************************************************************************

' Title - BoeBump.bs2

' Date - 28 November 2017

'Description: Create physical bumpers that trigger a command when it hits something to move the Boe Bot away 'from the obstacle. Add sound and lighting to project as well.

' {$STAMP BS2}

' {$PBASIC 2.5}

'************************************************************************

' Code for Reset Start Stop

'(THIS IS HOW TO START THE CODE!!!)

' This code makes the bot stop or start when reset is pressed '************************************************************************

temp VAR Byte 'temporary store

RunStatus DATA $00 'variable stored in ROM

READ RunStatus, temp 'READ the variable from ROM

temp = ~temp 'invert the value 0 TO 1 OR 1 TO 0

WRITE RunStatus, temp 'WRITE the variable back TO ROM

IF (temp>0) THEN END 'Check IF the value is 1, and IF so, END the program

'************************************************************************

'Pins Setup

'************************************************************************

LMotor PIN 13

RMotor PIN 12

'************************************************************************

' Constants Setup

'************************************************************************

LStop CON 750

RStop CON 750

'************************************************************************

' Variables

'************************************************************************

X VAR Word

'************************************************************************

' Main Program

'************************************************************************

FREQOUT 5, 150, 880 'Create old spice tune

PAUSE 50 'For freqout command, the

FREQOUT 5, 150, 880 'numbers go output (ex: 5), duration (ex: 150ms),

PAUSE 20 'and finally frequency level (ex: 880Hz)

FREQOUT 5, 250, 988

PAUSE 20

FREQOUT 5, 250, 1175

PAUSE 20

FREQOUT 5, 250, 1047

PAUSE 20

FREQOUT 5, 150, 1319

PAUSE 20

FREQOUT 5, 200, 1450

PAUSE 20

FREQOUT 5, 300, 1175

DO

HIGH 0 'Make the Cathodes white (but they wont turn white, as the

HIGH 1 'subroutine will immediately change the colour).

HIGH 2

HIGH 9

HIGH 10

HIGH 11

IF (IN6 = 1) AND (IN4 = 1) THEN 'If none of the bumpers

LOW 0 'are touching, then make the cathodes

LOW 2 'green and proceed to the subroutine

LOW 9 'called Forward.

LOW 11

GOSUB Forward

ELSEIF (IN6 = 0) AND (IN4 = 0) THEN 'If both bumpers are touching,

LOW 0 'then make both cathodes turn red,

LOW 1 'create two beeps, and proceed to the

LOW 9 'BothBump subroutine.

LOW 10

FREQOUT 5, 50, 2500

PAUSE 200

FREQOUT 5, 200, 2500

GOSUB BothBump

ELSEIF (IN6 = 0) AND (IN4 = 1) THEN 'If only the right bumper hits,

LOW 9 'make the right cathode turn red,

LOW 10 'create two beeps, and proceed to

FREQOUT 5, 50, 2500 'the BumpRight subroutine.

PAUSE 200

FREQOUT 5, 200, 2500

GOSUB BumpRight

ELSEIF (IN6 = 1) AND (IN4 = 0) THEN 'If only the left bumper hits,

LOW 0 'make the left cathode turn red,

LOW 1 'create two beeps, and proceed to

FREQOUT 5, 50, 2500 'the BumpLeft subroutine.

PAUSE 200

FREQOUT 5, 200, 2500

GOSUB BumpLeft

ENDIF

LOOP

END 'Stop Program before Sub Procedures run by accident

'************************************************************************

' Sub Procedures

'************************************************************************

Forward: 'Move forward a bit

FOR X = 1 TO 30

PULSOUT RMotor, 700

PULSOUT LMotor, 850

NEXT

PAUSE 20

RETURN 'Go back to beginning to rerun

'****************************************************

BothBump: 'Back up a bit

FOR X = 1 TO 150

PULSOUT RMotor, 850

PULSOUT LMotor, 650

NEXT

PAUSE 200

FOR X = 1 TO 100 'Turn Left away from obstacle

PULSOUT RMotor, 650

PULSOUT LMotor, 760

NEXT

PAUSE 20

RETURN 'Go back to beginning to rerun

'****************************************************

BumpLeft: 'Back up a bit

FOR X = 1 TO 150

PULSOUT RMotor, 850

PULSOUT LMotor, 650

NEXT

PAUSE 200

FOR X = 1 TO 100 'Turn Right away from obstacle

PULSOUT RMotor, 740

PULSOUT LMotor, 850

NEXT

PAUSE 20

RETURN 'Go back to beginning to rerun

'****************************************************

BumpRight: 'Back up a bit

FOR X = 1 TO 150

PULSOUT RMotor, 850

PULSOUT LMotor, 650

NEXT

PAUSE 200
FOR X = 1 TO 100 'Turn Left away from obstacle

PULSOUT RMotor, 650

PULSOUT LMotor, 760

NEXT

PAUSE 20

RETURN 'Go back to beginning to rerun

'********************************************************

' End of Sub Procedures

'********************************************************

'End of Code

'********************************************************

CONGRATULATIONS, YOU HAVE UPGRADED YOUR BOE BOT!!!

Crucial Point:

Keep in mind that when you run the code, you are required to press the reset button on the robot to get it going

Step 5: ALL DONE!

Watch the videos and listen to the audio files to see what this upgrade can really do!

P.S. The Boe file is the old spice tune, which occurs on initial activation of the Boe Bot via the reset button. The Boe Beep file is the sound that plays when the bumpers are activated (hit an obstacle).