Free Day recap and blasted Android

This post will be a shadow of the one that I had originally composed using the WordPress for Android app that I installed last night. It had wit aplenty, but my phone decided that it had a better idea – and managed to lose every character. With that aside, let me get started.

I completed my children’s toy. I designed in about 6 games that managed to please the youngest through to eldest, and have only used around 10% of the program memory. I wasn’t affected too much by feature creep, and I’ve started looking at a NiMH charging circuit so I shouldn’t have to open the box to charge the batteries. I clearly have a lot to learn about toy design, as the power connector has broken. I used some 100 thou pitch header pins to act as the power connector, and I forgot to close the box after a late night adding the scoring functionality leading to two snapped pins. This wouldn’t be so bad apart from the fact they snapped inside the female header pins. I ran into another hitch when water got spilt on the toy. I had used some fibre washers (instead of nylon) and even once the spillage had been mopped up I still had a 7ohm short across my power rails.

Part of the design brief was to build something to teach my children about electronics in one form or another. Every time I meet up with my family, I get reminded about things I did when I was younger; including sticking coat hangers in plug sockets, taking TV’s apart, and electrocuting my little brother with my bedroom light. The response to escapades was receiving a 100-in-1 electronics workbench. Whilst this was a great idea, I didn’t learn anything from it. Not because I already knew how the circuits operated, but because I followed the instruction booklet until the circuit worked. Schools answer to electronics was Ohm’s Law and logic gates. It wasn’t until university that I began to lean how circuits worked. I don’t want this for my children. I don’t want my children to be part of the throw-away culture that I grew up during, and I don’t want them to have to put up with toys where batteries last a day because the designer had to save a penny on a power switch. I’ve designed power saving features into this toy; the PIC sleeps whenever it can, and everything sits behind a LDO voltage regulator with a shutdown pin. I’ve not worked out what the battery life should be, but they lasted a month before the pins snapped. I designed the case with a clear front, and tried to minimise the number of tracks on the bottom layer. The idea behind this was so that it was possible to see how everything connects together. Of course this led to embarrassment when the lack of sleep and a silkscreen meant that a couple of chips were soldered the wrong way round. This shouldn’t have been a problem apart from when I delaminated one of the pads and had to solder in a jumper wire.

Yes, I did say pads. This board was primarily surface mount. Despite working on PCB’s daily, I still consider myself to be a hobbyist and unlike a number of hobbyists I prefer surface mount components. I am fortunate to have access to a PCB cutting machine at work, and so UV light boxes and PCB pillar drills are a thing of the past. The board is easy enough for a child to manufacture, but I wouldn’t trust my 6 year old with hand soldering a 0.5mm pitch TQFP chip. All I have taught my children is that they can write firmware for toys. I decided to supplement this was some soldering on another product, just to hammer home that the can create usable things. Whilst growing up, my grandfather made an electronic die. I wanted to go beyond this, so foolishly bought an electronic die kit. This was only £6 from Maplins (similar to RadioShack), but it meant having the kit straight away. The circuit consisted of a PPL chip, binary counter, LEDs and a load of passive electronics. The PCB has a solder mask and so was relatively simple for said 6 year old to assemble under intense supervision. I was tempted to make a case for it, and include a power switch to make it a finished product – but I am not happy with the design.

I know hundreds, if not thousands, of people dislike using microcontrollers to flash LEDs. An electronic die is a flashy light project, and one that is clearly doesn’t need a microcontroller. Using PLL and binary counter chips give a pretty simple circuit, but uses 30 components – and will eat through the PP3 battery. I am planning on designing a replacement circuit using the PIC18F14K22 as the brains. I want to use the minimum number of components whilst retaining the feel of a die. This means I need to use 7 LEDs as die pips instead of a single 7 segment display. The remainder of my circuit will consist of a piezo-transducer and CR2032 coin cell. As I’m powering the circuit from a 3.0v cell, I should be able to ignore the requirement for current limiting resistors on the LEDs. Failing that, it should be possible to use PWM to help limit the current. A diode and resistor are needed to protect the PIC from the voltages generated by the piezo, and a resistor is needed to bias the MCLR pin. This gives a total of 13 components.

I have no experience of cost analysis, or cost reduction. It is immediately obvious that there are fewer components. This means a cheaper PCB as the PCB is smaller and requires less processing. Smaller PCB and fewer components mean cheaper shipping. Fewer components means less warehouse utilisation and the board is quicker to assemble. On the other side, the PIC costs slightly more than the PPL and binary counter chips, and time is spent programming the device. An additional overhead cost would be the time developing firmware for the die. I haven’t touched on the “running cost” of the die as battery life needs to be considered. And finally, there is the case of perceived value, “coolness”, and appropriateness.

Functionally, the bought kit performs adequately. Once the button is pressed, a 100nF capacitor is charged and used to trigger the PLL. As the voltage decays, the PLL slows down and eventually stops. The effect is that the LEDs flash as the numbers roll round and stop on a particular value. This value is effectively random, as the numbers roll round quicker than human perception. My version would use the PIC’s ADC to convert the piezo-transducer voltage to a binary representation. Additionally, I will keep the PIC in a low-power sleep mode to be awoken by the piezo voltage spike. My chosen PIC is a 20pin device, so I don’t need to resort to Charlie-plexing to light the LEDs. Both designs would have a suitably random roll rate, but in my opinion the PIC method has an overall higher perceived value.

I want this to look like a quality product. To this end, I am considering using iTeadStudio for PCBs and some of the tools at work for an acrylic case. We will see how that turns out, but for now I’ve got to wait for my Sparkfun freebies. I say freebies, but I’ve already paid form shipping, and I’m fairly sure I’ll need to stump money for VAT. Oh the joys of living in the UK.

One thought on “Free Day recap and blasted Android

  1. Pingback: Stereotypical beginners electronics project pt2 | Sleep is overrated…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>