Introduction: Holocron Lamp for the Discerning Jedi

Picture of Holocron Lamp for the Discerning Jedi

With the wave of your hand, the Holocron opens up keeping you on the light-side.

It's a Holocron lamp using the force open and close. With the wave of a hand over the top any discerning Jedi can access the path the the light.
This project is based around the Particle Photon IoT dev board, and I have to say this has been a joy to work on! In the trailer you can see a few images and videos from the start to the finish.


Step 1: The Cinematic Trailer

Step 2: Parts You Need

Particle Photon × 1

Servo (generic)×1

White (8000K) LED (5mm)×8

Infrared (940nm) LED (5mm)×4

Infrared (940nm) Receiver Diode ×1

MPSA13 NPN Darlington Pair×2

Resistor 47.5 ohm×8

Resistor 10k ohm×2

Resistor 180ohm×4

Resistor 100k ohm×1

Gold PLA for the main enclosure×1

Jumper wires (generic)×20

Breadboard (generic)×1

tinned copper wire×1

superglue×1heatshrink×1

t-glase petg blue×1

heatshrink as required×1

super glue and activator×1

Breadboard Kit x 1

9V PSU x 1

Step 3: Concept Idea

First step was to think of everything I needed to make this work, I settled on an IR proximity sensor, a servo for the movement and some super-bright white LED's for the light.

Step 4: First Steps

Picture of First Steps

Firstly I prototype the electronics on the breadboard and fleshed out all the details in the code. It works! this was obviously a relief.
Once all the code and circuitry had been proven it was time to begin printing the enclosure. I chose to use gold as this is a traditional Holocron material, the enclosure is designed to be press fit together, meaning there is hardly any need for support structure when printing.

Step 5: 3D Printing

Total printing time ran into about 30 hours, so best leave plenty of time!
Once I had the main enclosure parts printed it was time to customize the electronics and build them in.

Step 6: Firstly Add the IR (infrared) LED's Into the Holes Using As a Guide

Picture of Firstly Add the IR (infrared) LED's Into the Holes Using As a Guide

Step 7: Connect and Solder the Cathodes (google Is Your Friend If Unsure!)

Picture of Connect and Solder the Cathodes (google Is Your Friend If Unsure!)

Step 8: Add 180R Anode Resistors

Picture of Add 180R Anode Resistors

Step 9: Add Wires and Make Sure Your Label Them!

Picture of Add Wires and Make Sure Your Label Them!

Step 10: Add Wires to the IR Receiver Diode (the Black One) and Add Heatshrink to Stop Shorting. Don't Forget the Label!

Picture of Add Wires to the IR Receiver Diode (the Black One) and Add Heatshrink to Stop Shorting. Don't Forget the Label!

Step 11: Post LED's Through From the Underside

Picture of Post LED's Through From the Underside

Step 12: Add Superglue to Secure Them

Picture of Add Superglue to Secure Them

Step 13: Add Super Bright LED's As Shown, Cathodes in the Centre

Picture of Add Super Bright LED's As Shown, Cathodes in the Centre

Step 14: Solder the Cathodes

Picture of Solder the Cathodes

Step 15: Bend the Anodes to Secure

Picture of Bend the Anodes to Secure

Step 16: Add Annode Resistors, Repeate 3 More Times (for Each Side)

Picture of Add Annode Resistors, Repeate 3 More Times (for Each Side)

Step 17: Add Tinned Copper Wire Bus Bar Connecting the LED's Together

Picture of Add Tinned Copper Wire Bus Bar Connecting the LED's Together

Step 18: Add Wires to the Bus Bars and Remember to Add a Label

Picture of Add Wires to the Bus Bars and Remember to Add a Label

Step 19: Add the Servo, You May Need to Add Spacers Depending on the Model Chosen

Picture of Add the Servo, You May Need to Add Spacers Depending on the Model Chosen

Step 20: Drop the Wires Through the Centre

Picture of Drop the Wires Through the Centre

Step 21: Add the Remaining 3D Printed Parts, No Glue Required!

Picture of Add the Remaining 3D Printed Parts, No Glue Required!

Step 22: Tidy Up the Breadboard So It's Nice and Neat (this Step It Optional But Helps!)

Picture of Tidy Up the Breadboard So It's Nice and Neat (this Step It Optional But Helps!)

Step 23: (optional)Make a 9 Pin Single Connector So It's Easier to Fix Wires to the Breadboard

Picture of (optional)Make a 9 Pin Single Connector So It's Easier to Fix Wires to the Breadboard

Step 24: The Cable Assembly and Connector Drop Through the Rack Part of the Assembly

Picture of The Cable Assembly and Connector Drop Through the Rack Part of the Assembly

Step 25: Final Assembly and Testing

Step 26: Add the Final Side Parts and Blue Lenses

Picture of Add the Final Side Parts and Blue Lenses

T-Glase PETG Filament was used for the blue translucent parts

Step 27: 4 Sides Assembled. the Just Press Fit Together

Picture of 4 Sides Assembled. the Just Press Fit Together

Step 28: Add the Top Blue Lenses

Picture of Add the Top Blue Lenses

Step 29: Not Only Will the Holocron Work With the Force.....

Picture of Not Only Will the Holocron Work With the Force.....

Step 30: ...it Also Works As an IoT Device for Those Not As Strong in the Force

Step 31: The Completed Holocron Lamp!

Picture of The Completed Holocron Lamp!

Step 32: The Holocron Enclosure

The Fusion360 model of the design can be found here

https://myhub.autodesk360.com/ue299db70/shares/public/SHabee1QT1a327cf2b7a8eeea6ffeb49753e

You can also just use the attached STL files for 3D printing

Step 33: The Holocron Firmware for the Particle Core Board

/*
Holocron Particle Firmware V1.0 Dave Clarke 18/02/16

IR Proximty circuit modified from instructables https://www.instructables.com/id/Simple-IR-proximity-sensor-with-Arduino All other rights reserved. */

int readIR(); // prototype void ServoControl(); // prototype void ServoControlReset(); // prototype

Servo myservo; // Create servo object

bool toggle = false; // Used as a one shot bool TheForce = false; // Variable to know cloud function used. bool powerON = true; // initial start up flag

int pos = 0; // initial servo position int IRemitter = D1; // IR Emiter LED on D1 int IRpin = A0; // IR Photodiode on pin A0 int ambientIR; // variable to store the IR coming from the ambient int obstacleIR; // variable to store the IR coming from the object int value[10]; // variable to store the IR values int distance = 0; // variable that will tell if there is an obstacle or not int mainLED = A6; // control for the main lights int closed = 20; // Servo closed angle int open = 155; // servo open angle

void setup() { // Initialise pin modes and assign servo pin myservo.attach(D0); pinMode(mainLED, OUTPUT); pinMode(IRemitter, OUTPUT);

// Debug - Variables published to Cloud Variables Particle.variable("distance", distance); Particle.variable("ambientIR", ambientIR); Particle.variable("obstacleIR", obstacleIR);

// Cloud function interface Particle.function("force", RemoteSwitch);

//initial states digitalWrite(mainLED, LOW); digitalWrite(IRemitter, LOW); myservo.write(closed);

}

void loop() { distance = readIR(10); // Read value from IR sensor and store in distance Variable if ((distance > 15 || TheForce == true) && toggle == false) // open up lamp and turn on the lights { for(pos = closed; pos <= open; pos++) // goes from 5 degrees to 115 degrees { // in steps of 1 degree ServoControl(pos); // Set Servo Position and Control LED Brightness } ServoControlReset(); // When finished, reset variables etc. } if ((distance > 15 || TheForce == true) && toggle == true) // turn off lamp and close { for(pos = open; pos > closed; pos--) // goes from 115 degrees to 5 degrees { ServoControl(pos); // Set Servo Position and Control LED Brightness } ServoControlReset(); // When finished, reset variables etc. } }

// Function to read IR Proximity sensor int readIR(int times) { for(int x = 0; x < times; x++) { digitalWrite(IRemitter,LOW); // turning the IR LEDs off to read the IR coming from the ambient delay(1); // minimum delay necessary to read values ambientIR = analogRead(IRpin); // storing IR coming from the ambient digitalWrite(IRemitter,HIGH); // turning the IR LEDs on to read the IR coming from the obstacle delay(1); // minimum delay necessary to read values obstacleIR = analogRead(IRpin); // storing IR coming from the obstacle value[x] = ambientIR-obstacleIR; // calculating changes in IR values and storing it for future average } for(int y = 0; y < times; y++) { distance+=value[y]; // calculating the average based on the "accuracy" } if (powerON == true) { delay(1000); // prevent bogus readings from servo noise on power up powerON = false; } else { //no start up delay } return(distance/times); // return the final value }

// Function for Cloud Variable Remote Switch bool RemoteSwitch(String command) { if (command == "theforce") { return TheForce = true; } }

// Servo position control and LED brightness void ServoControl(int ServoPosition) { int LEDmap = ServoPosition; LEDmap = map(LEDmap, closed, open, 0, 255); // Map servo position to LED brightness myservo.write(ServoPosition); // tell servo to go to position in variable 'pos' delay(26); // waits 25ms for the servo to reach the position analogWrite(mainLED, LEDmap); //ramp light on using PWM Pin }

// After servo has reached final position, reset variables and wait. void ServoControlReset(void) { toggle = !toggle; // toggle switch state TheForce = false; // Toggle The Force when using could remote switch on distance = 0; // reest distance to stop accidental operation if (toggle == false) // Make sure LED is High for open and low for closed { digitalWrite(mainLED, LOW); } else { digitalWrite(mainLED, HIGH); } delay(1000); // prevent operation too quickly }

Comments

SouthernRage (author)2017-12-06

Hello again.

In your one top down image from the "First Steps" section where you have the breadboard connected, what is the large black board your power source is connected too? Is it an Arduino, or something else?

Thanks,

Jonathan

JackB155 (author)2017-12-05

Question on the build. From the photos, it looks like the external "post" is separate from the top, but on "top case main.stl" they are connected. Do I need to print these two pieces separately? Am having 3dHubs print for me.

Thanks.

daveyclk (author)JackB1552017-12-05

Hi jack

The stl is correct, the post and the top part are connected and should be printed as one piece

Let me know if you need any more support

Dave

JackB155 (author)daveyclk2017-12-05

Ah. So you build the IR LED assembly from the top, remove it, then re-insert it through the post. Thanks.

SouthernRage (author)2017-11-28

I have a question about how you added the 180 ohm resistors. Did you bend the diodes down like the cathodes and then solder them together? and where does the other half of the resistor go? Does it wrap around the cathodes underneath?

Thanks,

Jonathan

daveyclk (author)SouthernRage2017-12-01

are you referring to the the IR LED's? if that is the case. yes the cathodes are all soldered together and the connected to the MPSA13. the 180R is connected to the anodes. then the other side of the resistors are bunched together, soldered and connected to 5V. let me know if I'm not clear enough

SouthernRage (author)daveyclk2017-12-04

I am also assuming that the bottom cathodes were cut as well to save space?

jperch (author)SouthernRage2017-12-02

Jonathan,

What I did was to cut the anodes of the LED's short, about 4 or 5mm. Then I did the same with one end of each 180 ohm resistor. I then soldered these short ends together with the resistor body sticking straight up.

I then bent the other ends of the resistors over, like was done with the cathodes and soldered all of those together. I then ran one wire from all the cathodes and one wire from all the resistors to the circuit board. The resistor wire goes to +5V and the cathode wire connects to the collector of the transistor.

I hope all that makes sense. I did not take any pictures of my assembly. But if you click on Daveyclk's picture, then click on the picture that comes up, you can select the large size and even zoom in to get a better idea of what he did (which is pretty much what I did).

jperch made it! (author)2017-12-02

It took me a while (life happened). But I got it done!

jperch made it! (author)jperch2017-12-04

The video I posted doesn't seem to be working. So I am trying to post a couple of stills.

daveyclk (author)jperch2017-12-04

Brilliant! Great job

daveyclk (author)jperch2017-12-04

Awesome! Do you have a picture to share?

jperch (author)daveyclk2017-12-04

daveyclk,

I had posted a video of it working. But it doesn't look like it is working now. I will try to post a picture shortly.

Joe

JackB155 (author)2017-12-01

Can you provide any details on the super-bright LEDs you recommend? What intensity (mcd)? Wattage on the 47 ohm resistors?

Thanks

daveyclk (author)JackB1552017-12-01

Hello, I used this part https://uk.rs-online.com/web/p/visible-leds/90473... it's cheap and bright as hell!

the 47R is just a 1/4W power rating. Super Bright LED's have very high forward voltages (compared to their less bright brothers) so the voltage drop across the resistor is only 1V @ 25mA. if you use an a different LED, you will need to recalculate the resistance and power rating.

jperch (author)2017-11-06

Dave,

I have all the parts printed and most of the electronics arrived today. But I have a question about your schematic. In my experience (limited as it may be), the IR detecting diode should be reverse biased, shouldn't it? Your schematic has it forward biased.

I did some research and just about everywhere shows the diode reversed biased. I also looked at the instructable you reference in your code. He also has the photodiode forward biased. But he also got some comments indicating that this is not correct.

I found a datasheet that seems like it is the correct one for the IR detecting diode I found on Amazon. It says the reverse dark current is about 1nA and the reverse light current is about 25uA. Notice that both currents are stated as reverse.

With this diode connected as you show (except reversed), in dark you would see about 3.29V at the analog input on the Photon. In light (IR light), you would see about 0.8V. This would easily be detectable by the converter.

Basically, I think your circuit will be correct if you just reverse the photodiode.

I hope this makes sense,

Joe

daveyclk (author)jperch2017-11-07

HI Joe

Thanks for your comments

The Photodiode is correct in the schematics for the code I have written. (we're not using the photodiode in a very clever way here)

During testing, I used a oscilloscope to see what the voltage drop was, and adjusted the code accordingly. I'm using the photodiode effectively as a light operated pull down resistor dropping the volts on the detector.

It worked for me, my advice is to try it the original way first, see what happens. nothing will get damaged

Thanks

Dave

TonyA124 (author)2017-11-02

How much would you want to sell me a completed one?

daveyclk (author)TonyA1242017-11-03

I'm not sure, let me cost it up and let you know

LouisianaIce. (author)daveyclk2017-11-03

Thanks for this great project.

I too am interested in one of the ones you make.

jperch (author)2017-11-02

Is there a specific reason for using a Photon? This project doesn't seem to need the WiFi capabilites. Would this also work with a normal Arduino, like a Pro-mini?

daveyclk (author)jperch2017-11-03

Hello, the Photon is a great platform for development for the exact reason you stated. WiFi. You program the Photon over the air so it makes tweaks to your code superfast and convenient when your dev board is buried inside your project. It's also pretty cheap too.. only $19. To make use of the IoT capabilities, the lamp can also be switched on and off with a simple web app

Hope this helps!

jperch (author)daveyclk2017-11-03

Daveyclk,

Thanks for the response. I agree the Photon is a cool platform (I already own two or three of them myself) I was just curious what the WiFi capabilities were being used for in this project. Now I know. Thank you.

This does seem like a cool project. I just received from translucent blue PLA from MakerGeeks. I just might have to give this one a shot.

Thanks again.

JimS282 (author)2017-11-02

Looks like a fun little project, Good Job...

Have you considered making up kits to offer for sale? I think I have most of the parts, except for the Particle Proton (not quite sure what that even is). I would be interested in a kit which includes all the electronics, including a programmed board (my weak point). I might also consider purchasing the printed parts kit, since both of my 3d printers are currently down.

Thanks JB

daveyclk (author)JimS2822017-11-03

Thank you very much JB! Let me take a look at the costings and i'll let you know

Don't be afraid of programming stuff yourself, it's not as scary as it looks

Dave

jperch (author)JimS2822017-11-02

FYI: The Photon is the name of a microcontroller development platform made by a company called Particle. Their web site is https://store.particle.io/collections/photon. But you can get them from Sparkfun and, of course, Amazon.

tr0lldr0id (author)2017-11-02

I unfortunately just don't have the time to get into Arduino right now, other wise I'd make this. It's really cool! However, do you think there might be a way to have the corners twist upside down like they do in SW Rebels?

Matlek (author)2017-09-28

Wow this is a great project! Grand Master Yoda would be proud of you!

daveyclk (author)Matlek2017-09-28

Worked hard I have.
Thanks very much!

About This Instructable

6,134views

95favorites

License:

Bio: I'm a 3D designer and Maker with over 10 years 3D design experience. I've been 3D printing / Making since 2013. Love Star Wars ... More »
More by daveyclk:$10 IPhoneX Wireless Charging StandWalabot FX - Guitar Effect ControlHolocron Lamp for the Discerning Jedi
Add instructable to: