- Push notifications from Raspberry PiPosted 23 hours ago
- Raspberry Pi 2 or, better, “Four”!Posted 2 weeks ago
- Touch Display for Raspberry PiPosted 4 weeks ago
- ArduDisplay, when the display becomes interactive!Posted 1 month ago
- LONG-RANGE TECHNOLOGIES FOR IoTPosted 2 months ago
- 3D Scanning with Microsoft KinectPosted 2 months ago
- Get Crazy with the Smartphone controlled Skateboarding!Posted 2 months ago
- RandA: WebServer applicationPosted 3 months ago
- BananaPi, the latest software updatesPosted 3 months ago
- Embedded MP3 Player & Recorder: The firmwarePosted 3 months ago
DIY LED Plexiglass christmas decorations (PIC version)
Very few components, plexiglass and a CNC are the ingredients to make wonderful brilliant figures to decorate the Christmas tree or our house this Christmas and New Year. Let’s see how to do it.
With the LED is possible to do things that with the traditional sources of artificial light was not allowed, like signs and figures obtained by projecting in a sheet of plexiglass the LED light. If we put a diode in parallel to the surface of a sheet of glass or transparent plastic, its light passes through the material and in the front is not seen. Making an incision on the surface, the light stops in them, and show the figure. Here, this is the technique of the modern LED signs, and we propose to experiment with creating some interesting and striking bright objects to use as Christmas decorations at home or where you prefer.Each object consists of an electronic circuit that turns on an LED RGB to compose various shades of color and a “mechanical” part formed by a plexiglass object. Yeah, but how we can work on plexiglass? Simple, with a CNC machine or with an hand drill.
The electronic circuit
As you can see, the circuit is simple and consists of a Microchip PIC12F675 programmed in PICBASIC PRO which works perfectly with 3 volts, which allows us to power the circuit with a lithium coin type CR2032.
Once powered the circuit after power-on-reset, the PIC initializes its own lines of I/O by assigning GP1, GP2, GP4 as dedicated outputs to control RGB LED LD1; GP0 is instead initialized as input assigned to the A/D converter (AN0) and we connected it to a photoresistor. This solution allows us to turn on the circuit only if the ambient light is weak enough (or if it’s dark …) to allow to see the figure carved into the plastic, but if the environment is too bright, the circuit turns off, so I do not consume the battery.
In the circuit we can use either RGB LED common anode and RGB LED common cathode.
After power on the circuit starts fading, gradually obtained by modulating PWM channels of the individual color of the tri-color LEDs.
After each cycle of fading, the microcontroller checks the analog input AN0 which is connected to the photoresistor, so if in the meantime the environment is too enlightened, firmware sends it in sleep mode for a minute. After a minute the micro wakes up and checks again photoresistor, to see if the light is lowered into the light, when the cycle starts again, otherwise it puts back into sleep.
The whole circuit is fed by a battery or battery capable of providing at least 3 times, preferably 3.6 (well, it must be a cell lithium-ion) or 4.5 volts.
R1: 47 ohm
R2: 47 ohm
R3: 82 ohm
R4: 10 kohm
C1: 100 nF
LD1: LED 5 mm RGB
LDR1: photoresistor 2÷20 kohm
– socket 4+4
– battery holder CR2032
Construction of the circuit
The tri-color LEDs can be mounted in three ways: through the through-hole (as in photos of the prototype visible in these pages, the side facing the short side, the side facing the long side of the board.
Remember that the circuit accepts both common anode LEDs, both common cathode: just set the jumper properly, or short-circuit the common terminal to ground if you use the type common cathode (cathode jumpers) or positive (jumpers ANODE ) if you use the diode common anode, it is understood that the firmware designed by us is suitable for controlling LED common anode. However, there is no problem, because adapting the firmware is pretty simple: just exchange the logical zero with 1 and vice versa.
Build the bright object
The materials recommended for this application are clear polycarbonate (or methacrylate) or Plexiglas, which can give the shape you want.
Then we need to impress, deep enough (half or two thirds the thickness of the slab) the drawing or the writing that you want to appear bright.
For this work, you can use a CNC or a hand drill (like DREMEL).
CAM programs allow you to draw shapes as ArtCAM.
Remember that each template must include a tab with a slot size of the head of the RGB LED.
To support the outline, you must mount the PCB in a plastic container, the lid must also include a window as large as the horizontal section of the tongue.
The CAD simulation
Source code PIC
'**************************************************************** '* Name : RGB controller for common anode led * '* Author : Landoni Boris * '* www.open-electronics.org * '* blog.elettronicain.it * '* www.futurashop.it * '**************************************************************** DEFINE OSC 4 DEFINE ADC_BITS 8 ' Set number of bits in result DEFINE ADC_CLOCK 3 ' Set clock source DEFINE ADC_SAMPLEUS 500 ' Set sampling time in microseconds DEFINE OSCCAL_1K 1 @ DEVICE BOD_OFF @ DEVICE MCLR_OFF @ DEVICE INTRC_OSC OPTION_REG=%00000000 CMCON =%00000111 ADCON0=%00000000 WPU=%00000000 IOCB=%00000000 INTCON=%00000000 ANSEL=%00000001 SYMBOL G =GPIO.4 SYMBOL B =GPIO.1 SYMBOL R =GPIO.2 SYMBOL AN =GPIO.0 'INGRESSO AD TMP VAR WORD TMP1 VAR BYTE TMP2 VAR BYTE TMP3 VAR WORD PAUSA VAR WORD LUCE VAR WORD TMP1 = 1500 'cicle TMP2 = 80 'step TMP3 = TMP1*TMP2 'TMP1*TMP2 PAUSA=200 HIGH R HIGH G HIGH B PAUSE 1000 LOW R PAUSE 1000 HIGH R PAUSE 1000 MAIN: ADCIN 0,LUCE IF LUCE > 100 THEN LOW R HIGH G HIGH B PAUSE PAUSA FOR TMP=0 TO TMP1 LOW g HIGH r PAUSEUS TMP*TMP2 HIGH g LOW r PAUSEUS TMP3-(TMP*TMP2) NEXT TMP LOW G HIGH B HIGH R PAUSE PAUSA FOR TMP=0 TO TMP1 LOW b HIGH g PAUSEUS TMP*TMP2 HIGH b LOW g PAUSEUS TMP3-(TMP*TMP2) NEXT TMP LOW B HIGH R HIGH G PAUSE PAUSA FOR TMP=0 TO TMP1 LOW r HIGH b PAUSEUS TMP*TMP2 HIGH r LOW b PAUSEUS TMP3-(TMP*TMP2) NEXT TMP ELSE HIGH G HIGH R HIGH B SLEEP 60 ENDIF GOTO MAIN
About Boris LandoniBoris Landoni is the technical manager of Open-Electronics.org. Skilled in the GSM field, embraces the Open Source philosophy and its projects are available to the community.
Top 5 Wireless Ways to Communicate with your Controller
One of the strongest trend we have seen this year...
- Posted 4 months ago
PCB Recycling: The Core of Your Electronics Is More Valuable Than You Think
The screen you are looking at this very moment will...
- Posted 5 months ago
Most Exciting Products and Open Source Highlights at CES 2015
The 2015 edition of the Consumer Electronics Show in Las...
- Posted 5 months ago
Top Ten most exciting news in Open Hardware in 2014
Here we are, the 2015 is fresh starting and as...
- Posted 6 months ago
Merry Christmas and a Open New Year
Here we are, a great year full of innovations and...
- Posted 7 months ago
A Report from the Second European Maker Faire in Rome
The second Italian edition of the European Maker Faire, held...
- Posted 9 months ago
Open Hardware Summit 2014 Rome: From Making Open to Open Manufacturing
It’s already several years that we talk about open source...
- Posted 1 year ago
Raspberry Pi and the Camera Pi module: face recognition tutorial
An area of application of Computer Vision, one that has...
- Posted 9 months ago
Computer Vision with Raspberry Pi and the Camera Pi module
Let’s see how to use the Camera Pi module, a...
- Posted 9 months ago
Welcome OpenWheels the Open Source personal vehicle inspired by the Segway
(This is the second post of the OpenWheels series....
- Posted 1 year ago
Press a button and Send a Tweet thanks to Arduino YÚN
After the Yun presentation post, we are going to present...
- Posted 2 years ago
Here are the Winners from the 3Drag 3d printing contest
Here we are, eventually the contest has come to an...
- Posted 8 months ago
Updates from the 3Drag 3dprinting contest: Roland Hoffert’s Hacks
Roland Hoffert, from www.eytec.de, submitted us this 3Drag (Velleman K8200...
Updates from the 3Drag 3dprinting contest: Karl Seiss’s Hack
Karl Seiss from Austria made a very clever hack to...
Updates from the 3Drag 3dprinting contest: Fa)(a from Giacomo Falaschi
Giacomo Falaschi sent us his Falla3D new printer project: you...
Arduino ISP (In System Programming) and stand-alone circuits
We use an Arduino to program other ATmega without...
- Posted 3 years ago
OSM ,The Arduino based Open Source LED Gloving Microlight funded on Kickstarter!
Catching wearable led lights, based on a custom Arduino...
- Posted 2 days ago
Carve Metal With Electricity in Your 3D Printer | Make:
Take any 3D printer, throw on this modular head,...
- Posted 3 days ago
e-nable Awarded $600k from Google for 3D printed Prosthetics
When Innovation meets charity to help children, something magic...
- Posted 4 days ago