Holocron Lamp for the Discerning Jedi
by daveyclk in Circuits > Gadgets
9114 Views, 114 Favorites, 0 Comments
Holocron Lamp for the Discerning Jedi
![holocron jedi.gif](/proxy/?url=https://content.instructables.com/F3X/5B6M/J822WRTZ/F3X5B6MJ822WRTZ.gif&filename=holocron jedi.gif)
![IMG_9644.JPG](/proxy/?url=https://content.instructables.com/FTM/GK4I/J822WTT0/FTMGK4IJ822WTT0.jpg&filename=IMG_9644.JPG)
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.
The Cinematic Trailer
![Holocron - The Trailer](/proxy/?url=https://content.instructables.com/FXE/DK62/J822X7A1/FXEDK62J822X7A1.jpg&filename=Holocron - The Trailer)
Parts You Need
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
Concept Idea
![Holocron mk 1 2016 Feb 12 12 31 42PM 000 CustomizedView39472378](/proxy/?url=https://content.instructables.com/F17/60Q4/J822X9ZE/F1760Q4J822X9ZE.jpg&filename=Holocron mk 1 2016 Feb 12 12 31 42PM 000 CustomizedView39472378)
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.
First Steps
![Holocron circuit_bb.png](/proxy/?url=https://content.instructables.com/F3K/BYRE/J822XT2V/F3KBYREJ822XT2V.png&filename=Holocron circuit_bb.png)
![Holocron circuit_schem.png](/proxy/?url=https://content.instructables.com/FML/3DFH/J822XT3J/FML3DFHJ822XT3J.png&filename=Holocron circuit_schem.png)
![Holocron bread board complete](/proxy/?url=https://content.instructables.com/FTY/RFCO/J822XAXD/FTYRFCOJ822XAXD.jpg&filename=Holocron bread board complete)
![IMG_9573.JPG](/proxy/?url=https://content.instructables.com/F4M/Y4IJ/J822WRU3/F4MY4IJJ822WRU3.jpg&filename=IMG_9573.JPG)
![IMG_9616(1).JPG](/proxy/?url=https://content.instructables.com/FL2/19VN/J822WSXN/FL219VNJ822WSXN.jpg&filename=IMG_9616(1).JPG)
![IMG_9616.JPG](/proxy/?url=https://content.instructables.com/FPU/L1WQ/J822WSXW/FPUL1WQJ822WSXW.jpg&filename=IMG_9616.JPG)
![IMG_9617(1).JPG](/proxy/?url=https://content.instructables.com/F2K/6VBS/J822WSYK/F2K6VBSJ822WSYK.jpg&filename=IMG_9617(1).JPG)
![IMG_9617.JPG](/proxy/?url=https://content.instructables.com/FR5/SPMG/J822WSZA/FR5SPMGJ822WSZA.jpg&filename=IMG_9617.JPG)
![IMG_9618.JPG](/proxy/?url=https://content.instructables.com/FWB/3G0N/J822WT0A/FWB3G0NJ822WT0A.jpg&filename=IMG_9618.JPG)
![IMG_9618(1).JPG](/proxy/?url=https://content.instructables.com/FQQ/RRO4/J822WT01/FQQRRO4J822WT01.jpg&filename=IMG_9618(1).JPG)
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.
3D Printing
![Holocron 3D print](/proxy/?url=https://content.instructables.com/FUQ/C0VB/J822XBB0/FUQC0VBJ822XBB0.jpg&filename=Holocron 3D print)
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.
Firstly Add the IR (infrared) LED's Into the Holes Using As a Guide
![IMG_9574.JPG](/proxy/?url=https://content.instructables.com/FAM/6Z3P/J822WRUT/FAM6Z3PJ822WRUT.jpg&filename=IMG_9574.JPG)
Connect and Solder the Cathodes (google Is Your Friend If Unsure!)
![IMG_9577.JPG](/proxy/?url=https://content.instructables.com/FHT/T8ZB/J822WS01/FHTT8ZBJ822WS01.jpg&filename=IMG_9577.JPG)
Add 180R Anode Resistors
![IMG_9581.JPG](/proxy/?url=https://content.instructables.com/FBM/SM52/J822WS0X/FBMSM52J822WS0X.jpg&filename=IMG_9581.JPG)
Add Wires and Make Sure Your Label Them!
![IMG_9582.JPG](/proxy/?url=https://content.instructables.com/FYT/53P1/J822WS1K/FYT53P1J822WS1K.jpg&filename=IMG_9582.JPG)
Add Wires to the IR Receiver Diode (the Black One) and Add Heatshrink to Stop Shorting. Don't Forget the Label!
![IMG_9583.JPG](/proxy/?url=https://content.instructables.com/FB3/QUOB/J822WS46/FB3QUOBJ822WS46.jpg&filename=IMG_9583.JPG)
![IMG_9584.JPG](/proxy/?url=https://content.instructables.com/FLU/NUNA/J822WS6P/FLUNUNAJ822WS6P.jpg&filename=IMG_9584.JPG)
![IMG_9585.JPG](/proxy/?url=https://content.instructables.com/FPX/8Z96/J822WS8Q/FPX8Z96J822WS8Q.jpg&filename=IMG_9585.JPG)
Post LED's Through From the Underside
![IMG_9586.JPG](/proxy/?url=https://content.instructables.com/FYZ/5DSC/J822WSBY/FYZ5DSCJ822WSBY.jpg&filename=IMG_9586.JPG)
Add Superglue to Secure Them
![IMG_9588.JPG](/proxy/?url=https://content.instructables.com/FUV/4C57/J822WSFW/FUV4C57J822WSFW.jpg&filename=IMG_9588.JPG)
Add Super Bright LED's As Shown, Cathodes in the Centre
![IMG_9589.JPG](/proxy/?url=https://content.instructables.com/FAS/BNKZ/J822WSH7/FASBNKZJ822WSH7.jpg&filename=IMG_9589.JPG)
Solder the Cathodes
![IMG_9590.JPG](/proxy/?url=https://content.instructables.com/FF1/ZPJ2/J822WSIJ/FF1ZPJ2J822WSIJ.jpg&filename=IMG_9590.JPG)
Bend the Anodes to Secure
![IMG_9591.JPG](/proxy/?url=https://content.instructables.com/FN8/JE8V/J822WSJ6/FN8JE8VJ822WSJ6.jpg&filename=IMG_9591.JPG)
Add Annode Resistors, Repeate 3 More Times (for Each Side)
![IMG_9592.JPG](/proxy/?url=https://content.instructables.com/FDI/UISA/J822WSJD/FDIUISAJ822WSJD.jpg&filename=IMG_9592.JPG)
Add Tinned Copper Wire Bus Bar Connecting the LED's Together
![IMG_9595.JPG](/proxy/?url=https://content.instructables.com/FAW/1CUD/J822WSKC/FAW1CUDJ822WSKC.jpg&filename=IMG_9595.JPG)
Add Wires to the Bus Bars and Remember to Add a Label
![IMG_9596.JPG](/proxy/?url=https://content.instructables.com/F5E/1PO4/J822WSKF/F5E1PO4J822WSKF.jpg&filename=IMG_9596.JPG)
Add the Servo, You May Need to Add Spacers Depending on the Model Chosen
![IMG_9598.JPG](/proxy/?url=https://content.instructables.com/FOI/Y19V/J822WSLU/FOIY19VJ822WSLU.jpg&filename=IMG_9598.JPG)
Drop the Wires Through the Centre
![IMG_9601.JPG](/proxy/?url=https://content.instructables.com/F9L/BSLW/J822WSOR/F9LBSLWJ822WSOR.jpg&filename=IMG_9601.JPG)
Add the Remaining 3D Printed Parts, No Glue Required!
![IMG_9612(1).JPG](/proxy/?url=https://content.instructables.com/F8C/PW2J/J822WSTN/F8CPW2JJ822WSTN.jpg&filename=IMG_9612(1).JPG)
![IMG_9612.JPG](/proxy/?url=https://content.instructables.com/F33/J162/J822WSUA/F33J162J822WSUA.jpg&filename=IMG_9612.JPG)
![IMG_9613(1).JPG](/proxy/?url=https://content.instructables.com/F1X/BCM0/J822WSUC/F1XBCM0J822WSUC.jpg&filename=IMG_9613(1).JPG)
![IMG_9613.JPG](/proxy/?url=https://content.instructables.com/FC7/5PA9/J822WSUE/FC75PA9J822WSUE.jpg&filename=IMG_9613.JPG)
![IMG_9614(1).JPG](/proxy/?url=https://content.instructables.com/F4U/RV5I/J822WSV2/F4URV5IJ822WSV2.jpg&filename=IMG_9614(1).JPG)
![IMG_9614.JPG](/proxy/?url=https://content.instructables.com/FSO/PMEC/J822WSVQ/FSOPMECJ822WSVQ.jpg&filename=IMG_9614.JPG)
![IMG_9615.JPG](/proxy/?url=https://content.instructables.com/FC7/D2L2/J822WSWO/FC7D2L2J822WSWO.jpg&filename=IMG_9615.JPG)
![IMG_9615(1).JPG](/proxy/?url=https://content.instructables.com/F8N/V7AW/J822WSVW/F8NV7AWJ822WSVW.jpg&filename=IMG_9615(1).JPG)
Tidy Up the Breadboard So It's Nice and Neat (this Step It Optional But Helps!)
![IMG_9603.JPG](/proxy/?url=https://content.instructables.com/F7N/ZW3Y/J822WSPH/F7NZW3YJ822WSPH.jpg&filename=IMG_9603.JPG)
![IMG_9604.JPG](/proxy/?url=https://content.instructables.com/FEG/VG2R/J822WSQ7/FEGVG2RJ822WSQ7.jpg&filename=IMG_9604.JPG)
![IMG_9605.JPG](/proxy/?url=https://content.instructables.com/F5V/T7RG/J822WSQH/F5VT7RGJ822WSQH.jpg&filename=IMG_9605.JPG)
![IMG_9606.JPG](/proxy/?url=https://content.instructables.com/FLA/QZK5/J822WSRC/FLAQZK5J822WSRC.jpg&filename=IMG_9606.JPG)
(optional)Make a 9 Pin Single Connector So It's Easier to Fix Wires to the Breadboard
![IMG_9607.JPG](/proxy/?url=https://content.instructables.com/FX9/SEWL/J822WSS1/FX9SEWLJ822WSS1.jpg&filename=IMG_9607.JPG)
![IMG_9608.JPG](/proxy/?url=https://content.instructables.com/FH8/STT4/J822WSS3/FH8STT4J822WSS3.jpg&filename=IMG_9608.JPG)
The Cable Assembly and Connector Drop Through the Rack Part of the Assembly
![IMG_9609.JPG](/proxy/?url=https://content.instructables.com/F40/T5A0/J822WSSQ/F40T5A0J822WSSQ.jpg&filename=IMG_9609.JPG)
Final Assembly and Testing
![Holocron with base assembly test](/proxy/?url=https://content.instructables.com/FRI/720M/J822XPQM/FRI720MJ822XPQM.jpg&filename=Holocron with base assembly test)
![Holocron assembly test](/proxy/?url=https://content.instructables.com/F28/NP4V/J822XPTZ/F28NP4VJ822XPTZ.jpg&filename=Holocron assembly test)
![holocron gif 2.gif](/proxy/?url=https://content.instructables.com/FEM/F3TP/J822WRSB/FEMF3TPJ822WRSB.gif&filename=holocron gif 2.gif)
Add the Final Side Parts and Blue Lenses
![IMG_9620.JPG](/proxy/?url=https://content.instructables.com/FK4/EFHN/J822WT39/FK4EFHNJ822WT39.jpg&filename=IMG_9620.JPG)
![IMG_9621.JPG](/proxy/?url=https://content.instructables.com/FGL/99SO/J822WT3K/FGL99SOJ822WT3K.jpg&filename=IMG_9621.JPG)
T-Glase PETG Filament was used for the blue translucent parts
4 Sides Assembled. the Just Press Fit Together
![IMG_9624.JPG](/proxy/?url=https://content.instructables.com/FEG/H29N/J822WT5K/FEGH29NJ822WT5K.jpg&filename=IMG_9624.JPG)
![IMG_9623.JPG](/proxy/?url=https://content.instructables.com/FUM/R71B/J822WT5H/FUMR71BJ822WT5H.jpg&filename=IMG_9623.JPG)
![IMG_9622.JPG](/proxy/?url=https://content.instructables.com/F29/5BLV/J822WT4N/F295BLVJ822WT4N.jpg&filename=IMG_9622.JPG)
Add the Top Blue Lenses
![IMG_9625.JPG](/proxy/?url=https://content.instructables.com/FYN/ICPL/J822WT68/FYNICPLJ822WT68.jpg&filename=IMG_9625.JPG)
![IMG_9627.JPG](/proxy/?url=https://content.instructables.com/FTD/ZKL3/J822WT8Y/FTDZKL3J822WT8Y.jpg&filename=IMG_9627.JPG)
Not Only Will the Holocron Work With the Force.....
![Holocron gif.gif](/proxy/?url=https://content.instructables.com/FDN/RWQ1/J822WRSJ/FDNRWQ1J822WRSJ.gif&filename=Holocron gif.gif)
![Holocron force interface](/proxy/?url=https://content.instructables.com/F31/6T22/J822XR8L/F316T22J822XR8L.jpg&filename=Holocron force interface)
...it Also Works As an IoT Device for Those Not As Strong in the Force
![Holocron web interface](/proxy/?url=https://content.instructables.com/FIA/QO5L/J822XRNN/FIAQO5LJ822XRNN.jpg&filename=Holocron web interface)
The Completed Holocron Lamp!
![IMG_9644 - Copy.JPG](/proxy/?url=https://content.instructables.com/FV9/ULID/J822WTSC/FV9ULIDJ822WTSC.jpg&filename=IMG_9644 - Copy.JPG)
![IMG_9646.JPG](/proxy/?url=https://content.instructables.com/FN9/GG88/J822WTV5/FN9GG88J822WTV5.jpg&filename=IMG_9646.JPG)
![IMG_9640.JPG](/proxy/?url=https://content.instructables.com/F8C/AWAS/J822WTLW/F8CAWASJ822WTLW.jpg&filename=IMG_9640.JPG)
![IMG_9642 - Copy.JPG](/proxy/?url=https://content.instructables.com/FLJ/UYBX/J822WTPR/FLJUYBXJ822WTPR.jpg&filename=IMG_9642 - Copy.JPG)
![IMG_9651.JPG](/proxy/?url=https://content.instructables.com/FSC/IMCL/J822WTWP/FSCIMCLJ822WTWP.jpg&filename=IMG_9651.JPG)
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
Downloads
The Holocron Firmware for the Particle Core Board
/*
Holocron Particle Firmware V1.0 Dave Clarke 18/02/16IR 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 }