To get the true Pi zero experience in your pocket, we are gonna need some buttons!!
So once i got the keyboard working, i had a little play with the attiny85. My basic code would use some internal reference trickery to get the internal voltage, then reporting back over i2c. The problem being, an attiny85 doesnt actually have proper i2c support, and so it was flakey to say the least!!
So after some searching, I found that the attiny88 has better i2c support, and more pins too, meaning that i can use a proper interrupt for the on/off button too. as a third and final bonus, it is also a few pence cheaper!!! it pays to look around eh!!
Some other changes see the power button being swapped for a 90 degree one to sit top centre on the board, and the neopixel has been moved to the back to save the eyes. It will work better too, filling the area between the pcb and the pi, with a glow of light. or maybe it could be used to illuminate a power switch later
there was of course a few fixes to the original design to correct my wildly inaccurate guesses on the keyboard chip, simply adding some more pullups, and i think we are good to go....
how many times can i check before i press the go button?
So after fixing some bad solder job (hand soldered qfn24 only half worked), and then fixing some bad circuit design with the help of @mozzwald , and getting the kernel rebuilt with the driver and overlay (credit again to @mozzwald ) we now have a working keyboard. I seem to have got my map reversed, but that's a simple fix 😀
Apologies for the vertical video 🙈 I was too excited to notice.
Time to design a case me thinks....
I was a little apprehensive about hand soldering the QFN24 chip for the keyboard, looking at it, the thing was crazy small! I forget how small things are after spending many hours with stuff zoomed a few hundred percent on the computer screen
(dont look too hard, my keyboard needs cleaning)
so i took the plunge
tinned the pads with a small amount of solder, applied a later of flux, clamped the chip with some tweezers and a clothes peg (nothing like having the right tools) and gave it some love with the iron
finding the limits of my phone camera, and it looks better in person.
much soldering later and we have filled the pads
I burnt some code onto the attiny85, grabbed the nearest sd card with ili9341 running, added a battery and pressed the button
There are of course issues, my idea of using a clip on programmer is fine for the attiny85, but when the pi covers the chip, you can no longer program it!! need to add a ICSP header. Im also struggling slightly to get my attiny to behave as i want. Getting it to respond over i2c kills my sleep code, think i have some conflicting interrupts...
to be continued......
Some sexy board goodness arrived today
I need to get moving on sourcing some components! 😀
so building on my last idea, little bit of shuffling and everything is now connected (hopefully) and in the right place (also hopefully)
its looking pretty good, the front has the buttons, screen, and a neopixel
and the back has a nice juicy space to place a big li-po (3000mah should yield 10 hours) and all the other components are hidden beneath the pi on its smd header.
a little bit more checking and we might be there!
So i got everything as i wanted it, then i thought 'oh wouldnt it be great if we had access to gpio'. so after much shuffling i found that i didnt really have the space (was thinking of using the space each side of the screen) and was tempted to just leave it. While doing other things i had a brainwave that i could use a hotplate to sink gpio headers into the pi (crazy thinking). then the lightbulb came on, and i thought 'why not use smd headers!!' this would then mean that its nice and easy to solder the pi on, and it also adds the advantage of being able to use hats (could even pop a pi3 on there with minimal effort!!)
So then things move on from there, and i had the idea of moving all the components under the pi, so the bare bit of board behind the keyboard can have a nice hunk of battery attached to it with no components getting in the way. Some messing about and it might work!!
back to the routing!!
so yeah i think i can see the light at the end of the tunnel!! I have learned a lot, developed a hatred for key matrices and tiny chips, but im sure i will get over it. I now need to spend a few hours following all the lines to see if i have any crossovers or such
so i was thinking of having a conventional keyboard layout, giving 70 keys to play with.
After much scouring the internet over the years, i found 40% keyboards and have become interested in the efficiency of being able to do pretty much everything with just 48 keys. This both reduces the complication on the PCB, and the size of the board too. The keyboard chip does keys in rows of 10, so i thought i would round things off to 50, and have 2 spare buttons to play with.
im thinking the default "planck" layout is pretty much where im going, but making it customisable will be good
So i finally got round to putting the click domes onto the board. The are a little wider than the tactile buttons i was using before, but then they are slightly shorter. I have been playing about with the layout on the board, and thought i might add in some GPIO pins each side of the screen just to make use of the extra space.
here is the latest progress, i did try cutting out the screen sides but i dont think i like it. as always DO NOT ORDER!! this is just for info
I had left this on the backburner for a while, mainly because of the cost of the buttons would mean that creating a prototype would be a bit on the expensive side, and errors might end up bankrupting me.
Another conversation on a totally unrelated project reminded me of 'snap dome' buttons, which i had all but forgotten about. Much research later, and im ordering thousands of tiny metal domes for just a relatively small handful of cash. This means that the cost has dropped from $0.70 per button, to $0.03, making it much less of a problem if things dont go to plan.
After looking back to the pocket C.H.I.P that inspired the project to begin with, you can of course see that they have used snap dome switches for the keyboard!! not an intentional copy, but it does look like im heading the same way as they were. I am thinking that the domes will need a better covering though. Maybe having a layer of silicone cubes over the domes will make them easier to press, whilst also taking some of the sting out of them.
As an extra bonus, the 5mm domes i have chosen should allow some better placement, and routing, and maybe even a smaller (cheaper) PCB too!!
to be continued.....