Introduction: Interactive Lighthouse Model

For my "Make Art" project, I decided to make an interactive lighthouse model! I envisioned a 3D model of a lighthouse, complete with working LED lights and sounds.

Supplies

Craft Materials

  • cardboard
  • scissors
  • glue
  • printer paper
  • ruler or measuring tape
  • red and black markers/pens

Electronic Materials

  • CPB board
  • alligator clips + wires
  • LED light strand
  • mini speaker
  • potentiometer

Step 1: Cutting Out Pieces for Lighthouse Model

First off, I want to highly recommend a helpful YouTube video that I used partially to help me build this lighthouse. It has great instructions for a complex lighthouse model that inspired my version.

How To Make Lighthouse Of Cardboard by Factoryx

From this video, I used their method of constructing the main body of the lighthouse using cardboard, paper strips, and glue. I scaled mine down to make it much smaller than the one in the video.

There are a LOT of cardboard pieces that make up this model, I will list the measurements I used below.

6 trapezoids for the main body of the light house

  • 10 cm base
  • 7 cm top
  • 23 cm height

1 hexagon with a hole cut in the middle (landing piece on top of body)

  • 10 cm radius hexagon

6 triangles for the rooftop

  • 7.5 cm base
  • 10 cm height

2 strips of cardboard (will be shaped into hexagon with 5 cm sides - light room)

  • 2.5 cm wide
  • 30 cm long

6 strips of cardboard (part of light room)

  • 2.5 cm wide
  • 7 cm long

about 30 cardboard rectangles (covered with white printer paper, for shingles on rooftop piece - optional)

  • 2 cm wide
  • 3.5 cm long

Step 2: Lighthouse Parts Assembly

Take one of the six trapezoid pieces to be the front of the lighthouse, you can cut a couple windows and/or a door into the front as you want. Then, line up all 6 pieces side by side, cut out paper strips and glue the paper strips across the cardboard pieces to glue them together. Repeat on the other side. Finally, glue the end pieces together and form the 3D hexagonal lighthouse shape.

Use the same technique with the 6 triangles for the rooftop, forming them into a cone-like shape as you glue the paper strips across each cardboard piece. Add shingles if desired to rooftop.

Take the 30 cm cardboard strip and bend it into hexagon with 5 cm sides. Repeat for the other strip. Connect the two hexagons with the six smaller cardboard strips to form the light room of the lighthouse. Add paper on the inside as the "windows".

You should now have four separate sections of the lighthouse: the main body, the hexagon landing, the light room, and the rooftop.

Step 3: Decorate the Lighthouse

I covered the entire model with white printer paper using glue, just to hide the brown cardboard. On the main body of the lighthouse, I used markers and pens to draw bricks into a white and red pattern.

Step 4: Program in Circuit Python

I'm adding lights and sounds to my lighthouse, turned on with capacitive touch.

I got my sounds (.wav files) from free sound libraries that I'll link below:

Big Sound Bank

Free Sound

I edited them to be 22000 Hz and mono in the free Audacity software - Audacity.

I then connected my LED light strand, speaker, potentiometer, and added alligator clips (on three capacitive touch pads) to the CPB board.

Each time a touchpad is touched, a sound plays and the lights turn on and off in a certain color. The duration of the light flashes is determined by the reading on the potentiometer, in a range of 0.01 to 3 seconds.

See my code for details!

circuit python code for CPB board to make interactive lighthouse model

#Megan Costello
#lighthouse art project
importtime
importpwmio,board,neopixel
importdigitalio
fromaudiopwmioimportPWMAudioOutasAudioOut
fromaudiocoreimportWaveFile
importtouchio
fromanalogioimportAnalogIn
fromadafruit_led_animation.colorimport (
AMBER, #(255, 100, 0)
AQUA, # (50, 255, 255)
BLACK, #OFF (0, 0, 0)
BLUE, # (0, 0, 255)
CYAN, # (0, 255, 255)
GOLD, # (255, 222, 30)
GREEN, # (0, 255, 0)
JADE, # (0, 255, 40)
MAGENTA, #(255, 0, 20)
OLD_LACE, # (253, 245, 230)
ORANGE, # (255, 40, 0)
PINK, # (242, 90, 255)
PURPLE, # (180, 0, 255)
RED, # (255, 0, 0)
TEAL, # (0, 255, 120)
WHITE, # (255, 255, 255)
YELLOW, # (255, 150, 0)
RAINBOW# a list of colors to cycle through
# RAINBOW is RED, ORANGE, YELLOW, GREEN, BLUE, and PURPLE ((255, 0, 0), (255, 40, 0), (255, 150, 0), (0, 255, 0), (0, 0, 255), (180, 0, 255))
)
INDIGO= (63,0,255)
VIOLET= (127,0,255)
MAROON= (128,0,0)
VERMILLION= (227,66,52)
WHITE= (255,255,255)
BLACK= (0,0,0)
colors= [RED, MAGENTA, ORANGE, YELLOW, GREEN, JADE, BLUE, INDIGO, VIOLET, PURPLE, BLACK]
pixels_pin=board.NEOPIXEL
pixels_num_of_lights=10
pixels=neopixel.NeoPixel(pixels_pin, pixels_num_of_lights, brightness=0.2, auto_write=True)
strip_pin=board.A1
strip_num_of_lights=30
strip=neopixel.NeoPixel(strip_pin, strip_num_of_lights, brightness=0.5, auto_write=True)
speaker=digitalio.DigitalInOut(board.SPEAKER_ENABLE)
speaker.direction=digitalio.Direction.OUTPUT
speaker.value=True
audio=AudioOut(board.SPEAKER)
potentiometer=AnalogIn(board.A5)
touchpad_A2=touchio.TouchIn(board.A2)
touchpad_A3=touchio.TouchIn(board.A3)
touchpad_A4=touchio.TouchIn(board.A4)
touchpad= [touchpad_A2,touchpad_A3,touchpad_A4]
path="lighthouse-sounds/"
sounds= ["waves.wav", "shiphorn.wav", "seagulls.wav"]
defplay_file(filename, color):
withopen(path+filename, "rb") aswave_file:
wave=WaveFile(wave_file)
audio.play(wave)
whileaudio.playing:
#during audio, turn on lights
light_char(color)
deflight_char(color):
#determines duration of light by potentiometer value (0.01 - 3 seconds range)
freq=int(potentiometer.value/(65520/300))
strip.fill(color)
time.sleep(freq/100)
strip.fill(BLACK)
time.sleep(0.5)
whileTrue:
touched=False
iftouchpad_A3.value:
touched=True
play_file("waves.wav", RED)
iftouchpad_A2.value:
touched=True
play_file("shiphorn.wav", YELLOW)
iftouchpad_A4.value:
touched=True
play_file("seagulls.wav", GREEN)
iftouched==False:
strip.fill(BLACK)
view rawlighthouse.py hosted with ❤ by GitHub

Step 5: Add Electronic Elements to the Model

Finally, put it all together!

I glued the landing and light room to the lighthouse. I left the bottom open so that you can insert the CPB board and all of the messy wires inside the main body of the lighthouse. In the back of the lighthouse, I cut out two holes for each capacitive touch pad used, so that the alligator clips linking the touch pads could be put through the holes and touched externally. The three things sticking out from underneath the lighthouse are the speaker, battery pack, and potentiometer to control the lights. I threaded the LED light strip up through the lighthouse, with the end coiled inside the light room. I left the rooftop unattached for easy access to repositioning the light strip.

This project is temporary and allows for you to take out all of the electronic pieces afterwards.

Step 6: Final Assembly and Demonstration

Put it all together, turning on the battery pack and the speaker to see your lighthouse come to life! See my video for how mine turned out.

Touch the alligator clips in the back of the lighthouse to trigger different sounds and light colors. The light duration can be changed by turning the dial of the potentiometer back and forth.