Instructables
Short description:
+High brightness microcontrolled LED light
+Touch Enabled (no buttons!) , the touch sensor will check it's inputs every 288ms to conserve power
+"Shutdown" TIMER : If the user holds the finger contacts for N seconds it will take N minutes for it to shutdown (or by touching it again )
+Estimated 60 days of battery life (15 min of use per day)



This is a Bedside Night Light I've built for my girlfriend:

+It had to be small
+Portable soft lighting for "stealth home navigation" at night
+It had to be COOL !

The Design:

ping-pong ball + generic_product_cap + capacitive_sensor_made_with_a_pic = EggLight !

Stuff needed :
- Ping-Pong ball
- Generic Product Cap
- PIC12F675 (any pic will do)
- A BC548 transistor (or similar)
- some standard resistor values: 100ohm , 1Kohm , 1Mohm
- 10000mcd led (When I have time I'll do the RGB version ;-)
- 2 CR2032 (button cell)

 
Remove these adsRemove these ads by Signing Up

Step 1: The Design

The initial design was supposed to be like the first picture... but an hiperbolic surface isn't quite easy to DIY =/
So I switched to the EggFormat
By placing the batteries on the lower side of the cap and sanding a piece of it it will stand-up straight

Step 2: The Touch-Sensor

The Capacitive touch sensor itself is nothing more than... CODE =D (and some resistors)

You see, each Pin (well most of them anyway) in the PIC microcontroller can be programmed during runtime to be INPUT, OUTPUT(HIGH or LOW) or just to be FLOATING on a tri-state condition...

What you need to do is (look at the schematics so you'll understand)

+Put Pin on High (gp_0)
+Let it Float (gp_0)
+Wait some time and read it's value with same pin or another one (gp1)

if a person is holding his finger between the finger contacts the capacitance of the pin is greatly increased , this way the gap of time that the Pin will take to discharge (during float) will be much larger than normal operation (no finger)... now look at the code below using two pins:

int fingert;      int check_finger(){      for(fingert=0;fingert<100;fingert++) //redundance (just to make sure)   {         output_high(PIN_A0);      delay_us(10);      output_float(PIN_A0);      delay_us(500);         if( input(PIN_A1) )      {         return 1;      }         }   return 0;}   

esplonky5 years ago
i'm obsessed with the beatles!
rac836 years ago
Hy First, great project ;-) You used the CCS compiler right? I'm just trying to rewrite the code to SDCC but I'm little bit hanging in the air because this is my first attemp to program a PIC. Does someone here have some example codes for SDCC just to see how to make the skeleton and using I/O Pins...???
Cool, but too hard for me! :P
Shifrin6 years ago
This is cool! but can you find a clearer video?
Proteus (author)  Shifrin6 years ago
Sure! now that I've finally bought a decent camera for Christmas, I can =)!
I'm kinda busy this week, but I'll put it in my TODO list !

Thanks for the feedback!
Shifrin Proteus6 years ago
Great! Thanks!
Myrddin7 years ago
How about a good image here, OK?? This ones crappy...
Proteus (author)  Myrddin7 years ago
Do you mean the circuit schematics?
It`s scaled down by the site, most images on Instructables are actually much larger than they appear to be =D, click on the "i" box on the upper left of it, or go to this LINK:
then select ORIGINAL SIZE... its actually pretty big nice (3508x2480) 329 KB image =]
Proteus (author) 7 years ago
If anything was left unclear ,just ask and I'll explain it better =]
daenris Proteus7 years ago
So how did you manage to make the contacts on the plastic?
Proteus (author)  daenris7 years ago
=D I'll get my Digital Camera back tonight (someone borrowed it) then I'll take some pictures/make a small video on how to do that
AWESOME! Although, you get -1 man point for getting pushed around from your girlfriend, but +10 man points for actually having a girlfriend..... Man, it's Valentine's day and I don't have anyone... sigh.....