Introduction: Logic Love Heart

Hello everyone :)

This is a Logic Love Heart I created for an old flame this year (we have a kid and we're still good mates, plus I like winding her up).

Some say love isn't logical, well it is now! So sit back, grab a beer and I'll show you how I made this.

Firstly, I had some fundamentals for this project that I wanted to satisfy for myself, and for the project. The basics are:
The project must be SMT
Everything is sized 1206
I want to make my own PCB instead of point to point wiring or strip board
It needs to run for a minimum of five minutes from a CR2032 battery
It needs to be as thin as possible to resemble a card
Small enough to make quickly
Must work in Eagle CAD free version
Not cost a bomb or take weeks to make
Must leave a smile on the recipient

What I ended up with was a decade counter circuit. This is basically a good old 555 timer sending a clock signal to a 4017 decade counter and then in to three rows of LEDS running in parallel. This does sound a little complicated, but overall is quite simple if you break it down in to the key parts.

Before continuing, this will use some etching chemicals, drills, craft knife, scalpels, tactical smart missiles, phase-plasma pulse rifles, RPGs, sonic electronic ball breakers and sharp sticks, so please be careful and try not to hurt yourself. If you do, that was silly, be more careful in the future and remember to wake Hicks :)

On to Part Two......

Step 1: WTF?

OK, so let me explain my choices for the parts used before we get to the schematics and board layout.

As I had a relatively short turnaround for this project, I needed to design, order and receive and build the parts before the deadline, valentines day. As the old saying goes 'stick to what you know', I decided to utilize the 4017 decade counter with a 555 timer as I have built several over the years. As I have only done a small amount of microcontroller work and no enough time to learn to code, this was out the window.
As I wanted this to resemble a card, I knew through hole would be out, I also knew that SMT was the way forward for this one so everything that was looked at initially was going to be surface mount.
I also began to think of batteries. I wanted something that would be able to be powered from something small and flat, so a mobile phone battery or a coin cell. As I had used my last mobile phone battery charger on something else, coin cell became the obvious choice.

Here is a breakdown to the parts of this project and what they do/add to the project.

1. 555 timer
This is one of the most used under rated IC's around. its great for all sorts. With this project we are using it in Astable mode.
This means it will basically give a square wave output depending on three components (two resistors and a capacitor). There are many calculators online that will help with finding the correct values required.

2. 4017 decade counter
This is a beauty of a chip and can be used for all kinds of projects. You can make Larson Scanners, LED chasers, or actual counters as you can daisy chain these together to count tens at a time (five could count to ten thousand!)
On every input signal from the 555 timer, the next output is latched. Its that simple! When it gets to 10 (well, 9 as it counts 0-9) it just resets back to the beginning.

3. Diode Outputs
In order to combine ten outputs in to three, I needed to utilize diodes to pass the current through and stop it feeding back in to the 4017. Originally this was going to be individual diodes but I then found SOT-23 dual diodes. Beauty! They combine two inputs in to one output. I've just halved my outputs, BONUS!

4. Transistor power!
The 4017 can only sink about 20ma per output. As each LED is being calculated at around 10ma per LED, the larger stage will be drawing about 120ma when lit. This will obviously blow the 4017 better than a Russian meteor. Transistors can be used to switch higher loads relatively easily and keep everything going well.

5. LED's
As mentioned above, each LED was calculated at around 10ma as I wanted the battery to last about five minutes. This will be drawing between 80-120ma per stage lit, and should remain plenty bright to see and make note.

Right, now on to the circuit and board design, the part that wrecks my head haha

Step 2: Design, Plan, Implement

Next we need to think of what we are going to do, and how were going to do it.
As mentioned I have made many of these over the years and this part is quite simple. A quick Google and an Astable 555 timer circuit was found, as well as the pin out for the 4017. Eagle CAD was loaded and I went to work creating the schematic.
This was a bit of a learning curve as this was the first time I have used Eagle CAD so it took a bit of getting used to the nuances of it. As I found, there are many!

So it took about an hour or so to knock together the circuit and double check everything. At this point I was working towards calculating the values of everything.
For this I used two massively great android programs. Electrodroid and Everycircuit. You need these programs, NOW! They helped in calculating the 555 timings, as well as the resistor for the transistor base current and even testing the circuit. I wouldn't have gotten everything done as quick without these two programs so big up to them.

For the timer, I used a 4.7uf cap and two 820ohm resistors (for those in the know and may have twigged, I had a brain fart moment at this point which will be explained in the troubleshooting section later, it was 1am!) to give an output of about 120hz.
There was a 0.01uf cap to decouple the 555 which is a pretty standard value

The outputs on the 4017 had simple dual diodes so output 1 and 4 could be combined as a single output. This helped a lot with the design and space.

The base resistors were calculated as 50 ohm which will fully turn on the transistors, and a 8, 10 and 12 ohm resistor for each of the LED hearts (10 for the 8 LED's, 8 for 10 LED's, and 6 for 12 LED's) to keep them controlled at 10ma.

The LED's were simple red, 2v 20ma LED's

So, the total parts:
30x 2v 20ma RED LED
2x 820ohm resistors (555 timing)
1x 4.7uf ceramic cap (555 timing)
1x 0.01uf capacitor (555 decoupling)
1x 555 low power timer (TLC555IDG4 low power variant 2v+)
1x 4017 Decade Counter (74HC4017D low power variant 2v+)
3x BCX5616TA SOT-89 Transistors
6x BAV70 SOT-23 dual diodes
3x 50ohm resistors (transistor base)
1x 10 ohm resistor for LED current limiting (8 LED ring)
1x 8 ohm resistor for LED current limiting (10 LED ring)
1x 6 ohm resistor for LED current limiting (12 LED ring)
1x Dual sided PCB
Hope I haven't missed anything :S

Now we have the list of parts, and an idea of what to do with them, on with the show and making the board!

Step 3: Moving About

As mentioned, this is my first time using Eagle CAD. First impressions are its bloody marvelous, second impression is that I need more time to do this as it can get quite complicated. After playing for about two hours in board view, I pretty much had everything down that I needed :)

I tried several times using the auto-router, rats-nest etc. but was getting nowhere. So I tried just manually placing everything which worked out much better. I did find though that many air-wires either were not connected where they should be, or not connected at all so decided to hand draw the traces myself.
This is something about electronics I absolutely hate. Its like the worlds worst jigsaw that can be combined in to any way possible.

After about six hours of playing with the layout (I hate puzzles), learning about double sided PCB's in Eagle, Via's, half step movement of components, I had as few wire connections as I wanted to put up with.

I have tried to keep the PCB as close to the circuit diagram as possible, keeping the 555 on the left, the 4017 in the middle, and the diodes/transistors on the right.

In the end the top and bottom footprint were nearly identical which was even better for me lining up the two halves.

I was worried about the Via's and there sheer size being so small. I decided to put some copper rings around the Via's and then colour them in with permanent marker. This would help by giving me a better landing pad, and also for my idea of aligning up the two halves of the circuit board.
This basically involved marking the Via's, drilling them, and then using these to align the two sides. Worked out quite well in the end, and would have been better if I had my dremel instead of the hand crank drill I used instead :P

As this is my first foray in to working with PCB manufacture, there are more than likely going to be many mistakes, so please let me know what you would do differently so I can improve further.

During this I referenced other Instructables and YouTube and I suggest you do the same :)

The schematic and board can be found here and here (Right click and choose Save As)

Step 4: Print It, Edit It, Burn It!

When I was happy all my connections were correct, it was an hour or two on Youtube researching how to create your own PCB's. I decided in the end to go with the toner transfer method as it was the quickest and simplest method to run with.
Photo-paper looked like the way forward, but I had noticed our label printer in work had great low-tak backing paper. time to experiment!

I tried several ways to feed this paper but nothing would work as the paper was too slippery. In the end I taped it to another 'donor' piece of A4 and yay, perfect low-tak print! Or so i thought!
When I tried the heart side this kept loosing a trace. My best guess was a roller was hitting it and lifting it. So back to the photo paper and try again. In the end I had two good copies of my design and ready to move on. Remember to mirror your top layer when printing, and not your bottom layer as it is already mirrored when working in Eagle.

The videos I have seen basically showed ironing the paper on to the PCB (after cleaning it) and pushing very hard with the tip of the iron. This seemed to be fine with the low-tak backing paper, but was partly my downfall with the photo paper.
The photo-paper seemed to have some liquid in it that melted when hot. I'm not sure if it was a wax, lacquer or something else, but it basically made the print smudge. By this time I had only one more night till D-day so decided cleaning the PCB would take too long, instead I simply repaired it with a marker and a scalpel.
I cleaned up any smudged traces by scraping them back, and then filled them in with a fine point permanent marker.
This worked pretty well and also led on to the board decoration.

As you can see in the pictures, I left a nice message for the recipient. I originally used a chisel tip marker but this began to run out when doing the hearts. In the end, this worked out for the better when I fount it partly etched them and gave it a bit of a cool look :)

It took about an hour of cleaning the board, etching it and sorting out anything that hadn't worked. Again, YouTube was a beast for this step and I ended up using the aggravation method of a small amount of Ferric Chloride and a sponge. I would like to try the acid/peroxide mix but another day.

Now I have parts, a board, and little patience. Lets get this built!

Step 5: Heat It, Melt It, Join It

Ok, so everything turned up as expected and now it was on to the big moment of truth! would this actually work?

Granted on paper it should, but I am well known for basic silly mistakes when going above and beyond on anything.
I couldn't contain my excitement any further, fired up my CS18 iron, got everything ready and began to solder away!

This was my first time doing components this small, but I have watched many video's, especially of one of my favorite YouTube channels, EEVBlog. Watch his stuff, its great and what gave me the confidence to tackle this. I have been soldering since I was about 12, and I'm 32 now, so I'm hoping I don't make a mess of this haha.

I started with the 555, first, placing a small dab of solder in one corer pad, secure the 555 to this and then working on the other pins as I went. This landed almost perfect on the pads. Then the 4017 was soldered in the same manner. I worked on the transistors and diodes next, working down to the resistors and caps. Before I knew it, everything on the timing side was complete and looking pretty sweet :)

Next I started on the Via's. I used some solid wire and a dab of solder both sides and they went in a treat.

Next, I tested an LED to find which way around they had to go and started working on these. The LED's are marked on the top and bottom with green markings which made aligning them pretty simple.
The soldering of all components was so simple they all flew on to the board.

As the LED's were wired in parallel I could test them with a battery as I went and if there were any shorts, could resolve these there and then. Fault checking after each LED I estimated could potentially save a lot of diagnostic time later as with the smudging, there was a connection here and there I had to knife a little.

When the last row of LED's were on and complete, it was time to test :) At this point I opened a beer to celebrate :) Yay me!

Step 6: Troubleshooting!

Ok, so as I mentioned I am prone to stupid mistakes. This project being no different.

Here is what I admittedly messed up on:

1. I timed the 555 at 120hz, as I had a brain fart moment thinking this would be about 40 BPM of the heart (see note one below). What my brain neglected to realize at the time was 120hz is per second, not per minute! So now it has a BPM of 2400! Yes my heart is way, way past fibrillation!
Note to self, wake brain up and don't calculate this stuff at 1am! (see note two below)
I didn't have the parts to fix this in time, but the recipient was 'understanding' and has told me she doesn't want it fixing as its cute :)

2. The photo-paper i have is utter garbage and if I can, I'll be sticking to the label backing.

3. My soldering iron has a 0.5mm conical tip. I was thinking of swapping this for a 1mm chisel tip but at the time this would have popped the cost of the project up by another five pounds. I will be getting this tip anyway shortly, but think it would have made soldering easier on this job.

4. I didn't order the coin cell holder from CPC, I stole it from one of my scrap motherboards when I realized I forgot it. This caused an issue as the connector in Eagle was a double pin on the + side, and every one I found was single pin on both sides! Disaster! luckily I didn't have any traces or components in the way and was able to drill a hole and tap it to get power fine. This mistake could have been avoided, easily lol

5.Ii made a mistake in the diagram where I connected + to - directly so no LED's would light. Luckily as a rule of thumb I connect parallel lines at opposite ends so I was able to cut the problem trace and then re-connect it with a small piece of the wire I used for the Via's. Worst bit is I could swear blind I fixed this but I would rather not wreck my head contemplating if this was the case or not!

Note 1: The pattern of beating was worked out as such:
Inner = I
Middle = M
Outer = O
I M O M O M I M O M > The pattern then loops. At three hertz, this cycle would be complete in about three seconds.

Note 2: The correct details for the timing circuit to achieve three hertz is:
R1 = 16k
R2 = 16k
C1 = 10uF

Nothing more to say, on to the grand finale.....

Step 7: Final Product and Thoughts

So, all in this was a major challenge, but I loved it haha. I have overcome several technical difficulties that were previously stopping me from making things like this, as well as the fear of soldering something so small. I know I can go smaller, but I don't need to at the moment.

I wouldn't have done anything differently, other than whats on the troubleshooting page. I am now going to be making more circuits because of this and cannot wait!

I like the way it turned out, but would have preferred the two to three hertz one I had planned. This should be renamed 'Disco Heart' :)

I would love to hear your comments about this, and if anyone else makes one, let me know and send some pictures so I can see yours.

I have some spares left over so I'm going to be making a Larson Scanner in the next few weeks, if I feel like it, I'll post it here :)

Finally, a little Video :)

Comments

author
ivver made it! (author)2013-04-19

you have great calculator on Google play store (for android). There you can find calculations about IC555 and alot of other usefull tools for electronics: ElectroDroid