Getting off the breadboard

A project log for Yapolamp

An experimental torch/flashlight intended to be safer for eyes, completely inspired by and built upon the TritiLED project

Simon MerrettSimon Merrett 10/23/2017 at 18:200 Comments

So, it's time to start working with the actual components I'd use in a "production" version of #Yapolamp... 

This means a PCB. For me, @oshpark is the default option here. Firstly, I know where I stand with cost and quality, and secondly I value the convenience of their acceptance of kicad files and the layer visualisation, which allows me to spot errors, correct them and re-upload quickly. Recently, I placed an order for a diminutive prototype board and it got upgraded to the fast-turnaround service as there was space to fill on that panel. These are the kinds of things which make me happy. 

So, back to the design. It's very messy routing. However, I think it would fit inside the small 25x25x50mm rectangular tube style aluminium anodised enclosure that's available from eBay etc for a couple of pounds. 

The main difference from the simple LT Spice schematic in previous logs is that I have included a 5mm through hole white LED. I know, you're thinking I have completely sold out on my principle of making this eye-safer for children. However, this decision is based on the wisdom of including cheap features you don't know if you will need and the distinct possibility that my user (a three year old) will not accept the unfocused yellow light on its own. I have placed it on its own ATtiny85 pin with a current limiting resistor, so I can define in the software if and when the white LED can be turned on. It will also not be used as the always-ON  feature, so it shouldn't ruin the battery life. The other addition to the LT Spice schematic is the momentary push button that will be used to switch between modes. The ATtiny85 pin it is attached to has a pull-down 10k resistor attached and the other terminal of the button is connected to VCC, allowing minimal current when the ATtiny is in sleep mode. I have bought a SOIC 8 clip to try in-circuit programming the ATtiny85. I realise I have left its reset pin floating in this design but should address this in the next version. 

I have left the fuse as a through-hole affair for now so that I can have maximum flexibility as to whether I populate the prototype with a wire, ptc fuse, resistor or single use fuse. I'll probably go for an SMD fuse in the next version. 

As for the layout, I have placed the 5mm white led in the centre and the five 5630 LEDs radiating from it, like rays or petals. I was going for some kind of traditional round torch head look, particularly trying to space the LEDs so that a child couldn't line up several of them over their pupil at the same time. It's not very "PCB efficient" to use rotated parts like this and the overall board size is at the upper limit of what I'm looking for, in order to give myself a decent range of enclosure options. 

The inductor is on the back of the PCB as I think that this will be reasonably easy to hand solder after reflowing the front. I will obviously have to flush cut the white LED legs as they are under the inductor.  The through-hole fuse/resistor/wire will also route over the back of the PCB. The switch silkscreen indicates it's mounted on the back but I believe it could straddle the SMD resistor on the front. Having said "reflowing the front", I have used 1210 SMD components and KiCAD's "hand soldering" 1210 footprints so I can build the prototype without the extra expense of a solder paste stencil. 

You can see the two (stupidly without polarity labels) power terminals (single pin headers) on the left side of the PCB. These will connect to the OUT - and OUT + terminals on the TP4056 module. If I want to double stack the module and Yapolamp board, I'll make these terminals line up with the appropriate ones on the module. 

Next up... 

I have been somewhat procrastinating over the enclosure and more so over the contacts in the charging dock. So while I wait for the boards, I will turn my attention to those aspects of the design.