Introduction: Mr. Octopus Nightlight

Well, what started off as a simple exercise in Grasshopper and an introduction to Arduino has transformed into a year-long educational experience in simple electronics, DIY PCBs, 3d printing, clearing extruder heads, and most importantly, PATIENCE. Today, I am happy to present Mr. Octopus: the interactive nightlight friend.

The PCB is designed so that you can alter the Arduino code and change the basic interaction of the nightlight. You can also design your own nightlight body (make some friends for Mr. Octopus... I see a bright future for Miss Dolphin and Sir Whale). The PCB was drafted in Eagle CAD and fabricated by OSH Park. The octopus STL was generated in Grasshopper for Rhino, but I'm sure there are plenty other applications that will work just as well.

But enough chatter... this is what you'll need:

  1. 3d printer (I used a Printrbot Simple Metal)
  2. Soldering station (ie. soldering iron for electronics, solder, flux is helpful, tip cleaner, fume extractor, tweezers).
  3. Fabricated PCB
  4. Fine tooth file
  5. Computer, with Arduino installed
  6. Wire cutters
  7. USB to USB mini B connector
  8. Arduino UNO and jumper wires
  9. All the teeny tiny smd parts (see the BOM)

Step 1: Fabricate the PCB

I used OSH Park to fabricate my board. I received it about 2 weeks after submitting my order.

After you get the boards, use a file to sand off the rough edges (mouse teeth). Make sure you run the board under water while you do this so you don't inhale any fiberglass.

Please Note:

  • The USB connection is a USB MINInot a USB micro (the PCB component is labeled wrong, but the footprint is correct)

Step 2: Print Mr. Octopus

While you are waiting for your boards to arrive in the mail, make a nice print of Mr. Octopus's shell.

Download the STL and print it on your 3d printer. You may want to do a few test prints to adjust your printer settings for the best surface finish. I used support material for the bottom piece and no support for the top piece.

Trim out all the stray whiskers from your print. As you can see, I was a little lazy here and did not trim out all the whiskers from the bottom...

Step 3: Solder

Solder all the components onto the circuit board. Reference the eagle file if you are confused about any of the parts.

I recommend this order:

  1. Resistors and capacitors
  2. LEDs
  3. Voltage Regulator, NPN Transistor, Battery Charging IC, Attiny85
  4. Battery connector, USB
  5. Header Pins
  6. Photoresistor

Special Instructions for the Photoresistor:

  1. Before soldering, thread the legs of the photoresistor through the PCB.
  2. Place the PCB into the bottom half of Mr. Octopus.
  3. Line up the photoresistor with its cutout on the edge of the printed shell.
  4. Bend the photoresistor such that it faces out of the Octopus and just barely sticks out from the surface (see the image).
  5. Once you are happy with the photoresistor placement, solder it. I actually soldered mine while it was sitting my 3d printed piece, so feel free to do that too.
  6. Trim the legs of the photoresistor after soldering.

Step 4: Program the Tiny

I used my Arduino UNO to program the Tiny for this project.

Setup the UNO:

  1. Connect the UNO to your computer.
  2. Open "ArduinoISP" found in File > Examples > ArduinoISP
  3. Upload the "ArduinoISP" code to the UNO.

Program the Tiny:

  1. Connect the header pins on the PCB to the UNO as shown in the diagram.
  2. Test the connection by uploading a simple sketch (like a blinking LED).
  3. If the connection works, upload the nightlight code.

Step 5: Test the Battery

Once your code has successfully uploaded, unplug the board from your computer and gently plug in the battery. Make sure you don't push the battery all the way in -- it's very difficult to remove with your fingers (I had to use pliers).

You can test the recharging circuit on the board by plugging the USB cable back into the board. The red light means it is charging. The green light means it is fully charged.

Step 6: Put It All Together

The final assembly:

  1. First place the battery in the bottom half of the octopus.
  2. Put the PCB over the battery and pull the battery wires through the notch next to the hole.
  3. Gently push the PCB into place (line up the holes in the 3d printed bottom and the PCB)
  4. If you want, use a small screw to hold the PCB in place. It should thread itself easily.
  5. Plug in the battery.
  6. Put the top half of the octopus over the PCB.

Step 7: Turn Off the Lights...

and bring it to life!