Als je mij niet kent, dit ben ik in 10 trefwoorden.
Ik hou van: Werner, Azerty & Querty, gadgets, Agora Software, Geox
Ik hou niet van: diabetes I, hernia, alcohol, afscheid
I need four original waypoints for my new geocache, this is number three. I made a promise to myself to always make electronic waypoints and as this is my third multicache, I'm not planning on breaking that promise yet. Now, the idea of my new multi is to go a bit further. For the final, it means using some motors and servos. For the waypoints, it means that this time I want them to really blend into the background.
I started off with this fake plant, now I'm trying to get all electronics needed to get the information displayed to the cacher in a snail house. First, let's not worry about being waterproof because it simply isn't. I may take a leap in the dark and try to place it in the woods as is. That means the pcb with display and battery is only wrapped into a heat shrink sleeve which is glued into the snail house. That's only possible if it sustains humidity, but I'm guessing that this will work.
Actually, my other caches contain all electronic waypoints in waterproof containers, but they often fail. Someone forgets to tightly close the cap or the plastic wears off, leaving the electronics exposed. I noticed that the electronics have never failed for that reason (they do fail for a lot of other reasons ;) ) but not because of humidity.
I always use plastic spray on my finished pcbs, including the batteries. The other components I use now (like Oled displays) will sustain bad weather for a long time. Again, these things are not meant to last for years, I'm glad they last one year. As a final test, I hold my finished projects under the water tap and check if they make it. Until now, they always do.
That said, this is the new challenge. I no longer use magnetic switches, so visitors won't need a magnet to activate the snail (well.. the display). I use a tilt switch, so turning them over will start the show. After it has shown its info, the chip will fall asleep and only activate when there's movement. So it doesn't matter how you place it back. I would prefer face down but I know better than that. Also, these things cannot be secured by a lock or a small chain, so they can be easily ripped. We'll see about that, I plan on making a few extra and I never had things ripped before.
This geocache waypoint is supposed to really blend into the background. The fake plant is available in many geocache webshops and it comes in many different shapes. Not only the container may vary, you can also pick a plant that will suit its purpose best in the setting you have in mind. Off course, when you buy it, it comes with a small logbook and a tiny pencil to log the cache.
But my plans are usually a bit more nerdy so this thing was the ideal container for a design I had actually laying around for more than a year now. The major problem was that I just could not get ANY pixel light up in these Oled displays (dutch) that I bought in a major shopping mood.
Recently I made some serious progress in that area, especially with connecting them to Attiny 45 and Attiny 85 microcontrollers. I still use the Arduino environnement to program this, it's not necessary in this design but the vast library collection keeps me hanging on to this platform.
Anyway, this is the final result and I'm really pleased with it. I think the logo is really cool and I added an extra container to keep it a bit safe in the soil and even more important: its second container has some strong magnets glued in. These magnets will activate the magnetic switch on the lower side of the container with the display inside.
This is how it works:
Soldering
I've been improving my soldering skills for some time because these designs really need it. The Attiny 85 on this pcb is the really really small QFN package. It's only 4 by 4 millimeters in size, and it comes with 20 pins, 5 pins on each side of the chip.
The 'normal' SMD version has actual pins you can touch with a soldering iron, 1.27mm apart. This package was meant to be used with a reflow oven. There's no actual pins on the side, only on the bottom of the tiny chip. Instead of 1.27 mm , they're only 0.5 mm apart.
Now I don't have a reflow oven and I'm not planning on buying one in the near future. So I had to do this with a regular soldering iron. I bougth a soldering station with a tiny J-shaped tip and that really does the job. I actually heat the pcb pads instead of the ones on the chip. First of all, you really need a station and not a normal soldering iron. The pins on the pcb are so tiny that a slight touch of even a 25 Watt soldering iron just wipes away the small tracks.
My pcb software (freepcb) did not have a layout for this chip, so I took the datasheet and created my own. Its pads are only 0.25 by 0.80 mm. In real life, this is a really really small amount of copper and especially those pads that are not connected immediately detach from my pcb when you overheat them. With the soldering station and je J-shaped soldering iron, I keep the heat below 300°C and never had that problem again. It still takes some time, some boards and even a few chips before I got my first one really working. I have to kinda guess where the pads are, solder them one row at a time and then look through a microscope to see if they are aligned at all four edges. That took some time and practice.
PCB design
There's a tiny problem with my pcb designing technique. I used to design my own pcb, print two copies on a transparent sheet with a laser printer and glue them on top of eachother. That's a really cool way of making a 100% black pcb design which never fails. If your laser printer would leave out some tiny black dots because your room is a bit dusty (which nerd room isn't?), that does not cause any problem because you have a backup sheet on top. The chance of your printer failing to do its job on the exact same dot twice is almost non-existent.
The problem is: you have to get both sheets on top of each other 100% aligned. In this pcb design, the smallest distance between pads is 0.2 mm. It's just not humanly possible to get this design aligned on the whole sheet (I print at least 4 or 5 pcb's on one sheet, that's still a small board).
So I decided to skip that step (so only use one sheet) and try to work through the problem of the UV light touching the photoresist pcb at places that I can't predict. It worked out pretty well, it's now a combination of three things:
a smaller exposure time to UV light (2 minutes instead of 2.5 ... 3 min before)
exactly measuring off your developing solution (6 units of water + 1 unit of 10% NaOH-solution - dutch link)
The etching tank gives me a 100% control over the etching process. This is SO important when working with these tiny pcb designs. You can see the etching process happening before your very eyes, which makes it easy to get the pcb out exactly one minute after you see the image appearing. When I think it's done, I wait one extra minute. When I look under the microsope, I can see that I need this minute to completely get all copper off, if I wait another minute, some existing 6 mils traces (= 0.23 mm) will start to dissolve. The etching solution actually runs under the copper pads after a while.
As you can see, it works out pretty well.
Only this one design (out of five) had a minor defect.
I do have to check them visually before soldering, measuring them out is just too hard.
The 14 pins connector of the Oled display was also a problem. The freePCB software can't handle smaller distances than 0.1 mm. The pads are 0.625 mm apart, which makes it impossible.
So I just created my own 14 pins connector with 0.60 mm spacing, and every 4 pins I add one at 0.70 mm. If you look in detail, it looks odd, but in real life it's just about perfect (note that the picture is a 15 pins connector from another display, 0.65mm apart, skip every 2 pins, but you get the idea, right?).
Software design
As I said, it's actually an Arduino sketch which makes things happen here. I'm not putting any code here just because I don't have one single working all purpose solution. I'll be happy to mail some code if you're interested. But there were a few major obstacles.
First off all, most of the small Oled displays on this blog (and anywhere else) are driven by an I2C interface. That's a bit of an issue when using Attiny 85 chips, because these chips don't really support the interface. They do have some basic pins that can act as an I2C interface with an extra library (I use TinyWireM , M stands for Master).
Since I only have 8kB of program memory, there's just no way to use a library to drive the display (all my monochrome Oleds have a SSD1306 chip). That means I had to write my own code. It basically sends existing bitmaps that are hardcoded into program memory to the display. I actually wrote the whole Verdana 12 alphabet (uppercase and lowercase) in MS paint and copied all characters one by one. I just had to make sure my bitmaps are a multiple of 8 in height, since I'm writing bytes vertically to the display. I did the same thing with the numbers in Verdana 28. As a result, I get a nice readable font of 16 pixels high (so two lines on this 128 x 32 display) and really clear and big numbers to display coördinates of 32 bits in height (one scrolling line on this display).
One definition of one charcter would look like this:
The PROGMEM keyword is very important, it keeps this static data in program memory, otherwise it would be stored in the SRAM of the Attiny chip, which is only 512 bytes big. Its program memory (flash memory) is 8kB (see Arduino link about memory usage).
The array represents a bitmap of the character 'm' , font Verdana 12 , copied to a bitmap of 13 pixels width and 16 pixels height. This nice tool does the conversion of a monochrome bitmap to an array style notation like we need (beware of the different variable declaration that is generated).
As for now, my software only allows Verdana 12 characters to be displayed with Verdana 28 numbers. An Attiny 85 has some extra space available for a logo, the '45 does not. It even crashes when I write more than 5 lines of text in total (tricky: the compiler never says it's out of memory when adding arrays to your program memory, it compiles perfectly and then crashes once and a while. Very amusing. Not.). Although this may seem a bit of a limitation, I think it's just awesome that a tiny controller can do these amazing things with a bit of code :)
Project drie van drie in één productief weekend was het belangrijkste. Het gaat dus al een tijdje over Oled displays hier, dat heb je misschien gemerkt. Het belangrijkste is dan dat alles moet passen in het doe-het-zelf plaatje, en dat liet te wensen over.
Wat je meestal moet doen is een semi-kant-en-klare display kopen zoals ik dus ook al deed voor mijn geocache waypoint in de verkeerspaal. Dat is fijn als het vast zit in een verkeerspaal en je dus per definitie enige diefstalbeveiliging hebt. Als je een potje onder een boom wil verstoppen, is dat niet zo.
Het punt is dus dat alles zo klein, zo goedkoop en zo goed als mogelijk reproduceerbaar moet worden. Dan voldoet een kant-en-klaar printje niet. Daarom dus dit project nummer drie: de Oled display die ik op één eigen ontworpen printje met alle nodige mini SMD componentjes zelf moet solderen. Zoals je ziet is het fijn werk, de display heeft een connector waar de contacten 0.7mm uit elkaar liggen. Dat wil zeggen dat je ze niet meer per stuk met een soldeerbout kan aanraken. Dan moet je dus andere manieren proberen.
Maar dat valt al bij al reuze mee eens je wat geoefend hebt :)
Het eerste project is gelukt en dat is uiteraard heel fijn. Een tijdje was ik al op zoek naar goeie manieren om een Oled display te gebruiken in een geocache, maar eerdere pogingen liepen op niks uit.
Er was vooral heel wat programmeerwerk nodig. Dat komt vooral omdat ik beperkt ben in de mogelijkheden van kleine microcontrollers die ik wil gebruiken. Het doel is immers ook dat het ooit in een potje past waar ooit glucosestrips in zaten. En daar past geen Arduino in, ik mikte dus op een kleine microcontroller (Attiny 85) en een seriële verbinding naar de display. Die strenge eisen hebben me verplicht om het wiel opnieuw uit te vinden softwaregewijs, er bestaat immers geen goeie library die alles al voorgekauwd heeft en waarmee ik simpel kon zeggen: laat nu eens coördinaten zien op dat schermpje.
Hoe het dan wel moest? Tja, alle enen en nullen zelf naar het scherm sturen hé. Dat vraagt wat tijd en denkwerk en daar ging eerder al een heel weekend aan op. Dit weekend ging op aan drie ontwerpen voor de hardware waarvan dit dus het eerste is dat werkt. De volgende uitdaging is hetzelfde model van scherm, maar dan zelf gesoldeerd op één printplaatje. Het maakt alles zot goedkoop, alleen die connector solderen maakt me zenuwachtig.
Maar de verkeerspaal in mijn Rondje Vlaanderen geocache in Zwijndrecht zal binnenkort dus al oplichten met dit schermpje :)