Introduction: LoveBox - the Box of Love

Picture of LoveBox - the Box of Love

As most guys I don't tell my wife that "I love you" as often as I should, but this little gadget will at least improve that situation as bit.

So by combining a nice box and some hardcore electronics nerdiness I've made a nice christmas gift for my wife. The LoveBox is a small box that when opened displays a random message of love to the viewer.


Step 1: Alternative Usages

Picture of Alternative Usages

Love might be what makes the world go around - or was that money?

So in order to get the world spinning the LoveBox can be changed into a DecisionBox by altering the software to give a random answer of "YES", "NO" and once in a while even an "MAYBE" when the box is opened. That's the perfect gift for the undecided decision maker. ;-)

For gamblers the box could be adapted to show lotto numbers when opened.

The possibilities are endless as most people needs to be told something or make decisions....

Step 2: What You Need

Picture of What You Need
You need the following things:

  • A nice box
  • A alphanumeric display
  • A microcontroller
  • A 74HTC138 (3-to-8 decoder)
  • Some resistors
  • Two 3-volt batteries
  • A microswitch (NC)
  • Wires, hot glue gun, soldering iron and other small tools.

In this project I used a box that I stole from my wife, an eight character 14-segment display I got of eBay a year ago, a AVR ATtiny2313 micorcontroller and two 3-volt lithium batteries for cameras.

Step 3: Schematics & Software

Picture of Schematics & Software

Schematics
The schematics for this projects is rather simple.

There's the microcontroller , the digit "driver" and the display and some resistors to limit the current between the microcontroller and the display.

There are 14 anodes (positive)on the display, one for each segment on a digit, and 8 cathodes (negative), one for each digit.

The anodes are connected to 14 of the available ports on the microcontroller via 330 ohm resistors to reduce the current to a level that the display is not harmed by. U/R=I , that is Voltage divided by Resistance gives Current. The power supply is 6 volts and the display itself it dropping that by 1.8 volt so the resistor of 330 ohm will have 4.2 volts left to take care of. 4.8/330=0.012 (12 mA).

The datasheet for the displays says 2 mA per segment, and I choose to interpret that as as average figure. Since only one digit is lit at the same time each digit will only be lit for 1/8 of the total time. So to get 2 mA of average current is can be driven by 16 mA (2 mA times 8).

Even if this is not according to specs there are both safety margins and the display is only used intermittently and it if should break - who really cares? ;-)

The 74HTC138 that drives the anodes is really abused. If all segments on a digit is lit all of the 14 segment want to force 12 mA down through the poor '138. This would be a total current of 168 mA and that's far far far beyond what it can handle to sink.

Depending on the exact model of the chip the specified sink current is more like 5-10 mA. If I short circuit the output and measure it it can sink about 40 mA with an increased voltage level.

Now, all of the segments won't be lit at the same time, but the 40 mA limit will be reached quite often. Luckily enough the brightness of the display is rather constant whether it gets 4 mA or 15 mA, so it really doesn't matter that much.

It works, but it's a really sloppy and unprofessional design. It can be much better, but since I didn't have any better parts at hand I just used whats worked.

Software
The software is also really simple.

When the microcontroller starts is will read a seed for the random number generator from the non-volatile eeprom of it's memory, generate a new random number and then write back the new seed to the eeprom. Without keeping track of the seed that random number generator would generate the same number for each start. Hardly not any randomness in that ;-)

It then takes the generated random number and uses that for selecting one of several messages and scrolls that past the display.

When the entire message is displayed the microcontroller shuts itself down to a low power mode in order to save the batteries from draining too quickly if the lid inadvertently is left open.

Step 4: Building It

Picture of Building It

Because the number of components are low and the box is rather small I decided to build it in dead-bug style.

Dead bug style is when the components are put upside down with the legs in the air, like a dead bug, and then connected either by wires or directly to the legs of other components.

The pictures here shows a few steps of the soldering process.

If it looks really tight and messy it because it's is really tight and messy! I soldered a few of the resistors in the wrong position and decided to fix those errors by some extra bit fiddling on the software rather than staring to desolder and reconnect it in this mess... Do what's simplest, it's not like anybody will notice it anyway. :-)

Step 5: The Box

Picture of The Box

I needed some kind of inner lid in the box so that it's innards wouldn't spill out or be seen because it really looks awful in there.

I took a CD case and cut out a fitting piece of plastic from it and spray painted the bottom of it with a golden color leaving a hole where the display is beneath it. It really didn't turn out that bad for this application as a LoveBox. For a DecisionBox as a gift to a CTO maybe a some other covering would look better.

The box should be turned on when it's opened. But most switches are activated when pressed, not when released, so I tried to make my own switch using a safety pin that would be pressed down when the box is closed and springs back up when its opened, but I didn't succeed with it.

After a bit of rummaging in my junkboxes I found a miniature microswitch that has both a normally open contact as well as a normally closed. After fitting that switch in a corner of the box it worked like a charm.

Step 6: The Finished Product

Picture of The Finished Product

Here's the finished box in it's splendor. I'd have to say that it looks at least half decent.

Video #1


Video #2


Now I only have to wrap it up and give it the the wifey together with a kiss at Christmas eve. (In Sweden the gift giving day is the 24'th, not on the 25'th as in US...)

Comments

tm354 (author)2015-01-14

I think the video links are broken. I'm not able to watch either one.

Nantto (author)2013-11-27

Excuse me, is there another way to do it? I can't find the display anywhere:c
If I do it with a 16x 2 LCD display...Can I do it with that microcontroller? Do I need another one?

robot797 (author)2013-03-26

can this be done with an arduino
cus i cant understand C

alank2 (author)2012-08-13

Where did you get the datasheet for the alphanumeric display? I bought some off eBay and they say "IF = 7 ma" but you mention 2ma above. Can you post the datasheet here? Thanks

matseng (author)alank22012-08-13

Sorry, it was a long time ago and I've moved to a different continent since. But it seems like most specs for the TSA1605A says 7mA which doesn't seem unreasonable...

TSA1605A
Three-Five Systems, Inc.
Search: TSA1605A
Segmented Alphanumeric LED Display - Clear,Bubble,2x
Package Style (Basic)=2-Edge+Hol
Number of Characters=8
Connection Type=Comm Cath.
Color=Red
Character Height (mm)=4
Peak Wavelength (m)=660n
Iv Min.(cd) Luminous Intensity=450u
@I(F) (A) (Test Condition)=7.0m
V(F) Max.(V) Forward Voltage=1.8
@I(F) (A) (Test Condition)=7.0m
I(F) Max. (A) Forward Current=7.0m
Package=2-Edge+Hol

virgiltu (author)2011-07-25

Just as an FYI the box you used for this project it is actually used to keep the hair of a one of the kids when they pass away under the age of 10. Usually this box is only used by the pastor. I found this picture on google images and i thought it was unusual that you used it in a project.

psgarcha92 (author)2010-01-24

how do we program this thing????

dgs (author)2009-04-01

Finally made one myself :) Yipee!!!

Made few customizations:
LCD 16x1 screen without backlight { for power consumption }
based on PIC16F876A { coz I'm into PIC world =) }
PCB
ICSP connector { for future firmware updates :) }
low battery indicator
embedded battery charger
17 messages { hope this enough }

Some photos below

Maarek (author)2008-06-11

Could you explain the purpose of the 74HCT138 and how it works? Why couldn't you control the display with the uC? Thanks.

Azayles (author)Maarek2008-09-19

The 74HCT138 is used because there aren't enough output pins on the µC to control all the pins on the display. The 74HCT138 is able to individually address each of the 8 display sections using only 3 pins of the µC, instead of 8 µC pins.

stovall (author)2008-02-23

For those of us that are are not as comfortable with circuitry, you could buy a cheap voice recorder (sometimes available at the dollar store) & record a few seconds of "I love you's" then just use a simple switch to activate it when the lid is opened!!!

Bran (author)2008-02-16

Is the box made of camel hump? I have one almost exactly like it, and mine is! (Well, it's from a friend's dad who was in Iraq.)

matseng (author)Bran2008-02-16

It might be. I've never seen the inside of a camel hump but the material beneath the brown paint/dye on the outside had a off-white bone like color and emitted an disgusting burnt hair-like odor when I Dremelled it.

buck_2007 (author)2008-02-04

Hi, First off, this is a great project! Thank you for your post. My only complaint is that the instructions are a bit lacking in some places. This leads me to the question...where do you solder the power supply at? Also, is the code that you posted the edited version(the one you tweaked due to you soldering some resistors in the wrong place) or will it work if the resistors are attached as shown in the schematic? Thanks!

mpd-7000 (author)2008-02-01

hii need help making this can you help ple i whant to make it for my gf

matseng (author)mpd-70002008-02-02

Ok, what kind of help do you need?

ert (author)2008-01-19

I think its great and don't you think you should add romantic music

wesie42 (author)2008-01-02

sound really confusing :

rocotillo (author)2007-12-21

you must have some time on your hands. just buy her flowers. the results are the same.

the results would not be the same. flowers take little thought/effort. a woman is much more touched and impressed by taking the time to create something personal.

matseng (author)rocotillo2007-12-21

It only took two evening to make this, and it's fun to actually do something physical. My days are usually spent reading and writing reports and attending meetings so this is an welcome break from that. Besides, if I'd buy her flowers she probably just suspect that I had been cheating on her.... :-)

thinkdunson (author)matseng2007-12-22

that, plus this is way better than flowers. they know the difference between you taking time to do something, and you putting absolutely no thought past "this bouquet or this one?".

babyboi512 (author)2007-12-22

sweeet!

dgs (author)2007-12-21

This is just a brilliant idea, definetely gonna make this soon :)

chuckc13445 (author)2007-12-21

Thanks, I really enjoyed your work.

yt (author)2007-12-21

WOW! Good job! This is quite inspirational.

dropcase (author)2007-12-20

God Jul! Someday when I have a little more money and time, I'll have to try this one out. I really like the display, it almost gives a steampunk feel...

DGerman (author)2007-12-20

Most Awesome! Wish you presented this earlier. Well there's always next year!\\ Peace and Joy be with you and your family the Holy and Joyous season.

aetherguy881 (author)2007-12-19

Make sure to tell her you love her when she unwraps it! Nice idea.

Kiteman (author)2007-12-19

Very nice - I just hope your wife doesn't read this site, otherwise the surprise is ruined.

Very Keri (author)2007-12-18

Aww, nerdy love! Great idea. It will be a hit for sure!

Patrik (author)2007-12-18

Wonderful! You did an amazing job cramming all that in such a small space.

As for "it's not like anybody will notice it anyway" - if your wife ever does have a peek inside, she'll just be even more amazed at your god-like powers of nerdiness! :-D

GorillazMiko (author)2007-12-18

amazing! i would do this, if i could.

Sergeant Crayon (author)2007-12-18

Really a nice idea and I hope the wifey loves it! Soldering it dead-bug style like you did requires brain power! The last picture reminds me of the time I had to make a Slot Machine for school. *shudders*

Megax29 (author)2007-12-18

too confusing for a regular person but the detailed instructions and good pics should help ty

matseng (author)Megax292007-12-18

Yea, I agree that it's not for the Average Joe to build this. Without a good deal of soldering / electronics building experience it'll be very hard to duplicate this project. It's mainly meant as an idea of what you could do with a nice box and some electronics tinkering in an evening or two. If it could be sold as a complete kit with all the parts including a suitable box and a PCB to the "general public"....

About This Instructable

33,363views

109favorites

License:

Bio: Swedish expat living now living in Malaysia after spending some years working in Dubai.
More by matseng:The Motorized Led Bolas Of DoomBinary Marble ClockSpooky Led Lamp
Add instructable to: