A simple timer to use as a geeky productivity aid.
Hackers are known for our punctuality. That is why all of the HaD prize entries come in at the start of the contest, and are not all mad submissions done at the last minute. For those of us who need a little help in this category, there is this thing called the pomodoro technique. This timer has the normal schedule for it built in. Tracking bits not included. It will also be battery powered with a li-poly that came out of a lighter.
After a few attempts to get the USB lighter housing/charging/battery stuff to work, I eventually gave up. I was trying to use a MOSFET connected to one of the arduino pins to power the timer so I could automatically shut it off if left unattended. I never could get it to work. Eventually, I just took the USB end off the lighter and wired it into the timer. It is on when plugged in and off when unplugged. I use a USB power supply I picked up at VMWorld to keep the whole thing mobile. I use it at work, so this project was ultimately a success.
This isn't complete yet, and there is so little left for this project that the next post I wanted to share was the successful completion with a nice video, but I don't know what I'm doing. I got MOSFETs in the mail that I could use as switches. I wired one in backwards with a voltage divider. It took me a while to figure out that it was backwards. Google helped me figure out that I didn't actually need a voltage divider (not even a singe resistor) for the gate of my MOSFET, so I wired it in correctly, but it still wasn't working. I was halfway through pulling it out again when I thought I'd test it with an external power supply. It worked fine. I then checked the voltage of my battery. it was too low. I haven't put it all back together yet, but I did charge the battery. Chalk it up for experience it what to test before tearing things apart. Maybe more proof I need to take an intro to electronics class. I don't know when I will get time to do it again. I have all of this with me on vacation now, but I may not get to it until next week. I have been breadboarding stuff with my nephew, though. That counts as vacation, too.
I fried a mosfet that was on the lighter pcbs last night. I wish I would have remembered what a voltage divider was before I wired it up, but you live and learn. Everything else seems to work just fine. it failed open, so now I just can't shut the power off on the timer. I could add a switch, but I like the mosfet there, so I will wait for another shipment to come from China.
I wired the timer to the lighter as in the pic below. (Actually the black wire was moved to the pad below it before I finished). The brown wire was attached to a resistor and a pin on the arduino so I could keep the gate high on the mosfet. There was a problem with this wire, though, it slightly powered the arduino when everything was off. So, I cut the trace to the mosfet gate which made the voltage too high when I powered it up again. It worked fine to power the arduino until then, though. The battery is unlabeled, but it is about 5v. It looks like a lipo cell to me, but I haven't heard of a 5v lipo.
When I get my mosfets, I think I will try to find someplace to put it on the perf board with a voltage divider as a reminder. I know, that was one of the first things I learned about in my high school electronics class, but that was a long time ago. Maybe I need a refresher, or just to take the whole class again.
It turns out that my green LEDs either need more current to be as bright as the others or they have a much higher voltage drop than my original estimate. I think I'll end up putting in 47ohm resistors in for them. I didn't measure the current going through the green or the voltage drop. Maybe I should try to do that.
I also filed the resistor edges to get them in nice even rows. I started filing each one until I figured out I only needed to file every other one. I just clamped the file down to my bench and ran the LEDs across it a few times. It was actually easier than I expected.
The LEDs are on the perf, so next time I pick this project up, it will be the resistor work.
I'm sure most people reading this already know about how to use resistors with LEDs. I bought a cheap bag of assorted resistors without data sheets to know their voltage drop, so I searched the internet with duckduckgo to find a handy site that has some good guesses for the normal values there so I can get on with specing me resistors. I put it in a quick spreadsheet, and here are the values I got initially:
I will rummage through my resistors to get close to those and see if I'm happy with the brightness. My target current seems low enough that I can make some pretty bad mistakes here and not worry about it.
I know this isn't going to change the world on its own, but it could inspire hackers everywhere to adopt a more productive schedule when working on their projects which will undoubtably change the world. Someone out there has the most elegant solution to world hunger sitting on a desk, but cannot post a project on http://hackaday.io because they can only seem to find the time to watch cat videos on youtube. With this timer and a little study of the pomodoro technique it is supposed to be used for, the hacker in this totally uncontrived situation would have the power to overcome procrastination and get on with saving lives.
It would also be really cool to take one of those bulbdial clocks and add a mode to use it as a pomodoro timer. That just so happens to be this week's prize, and the main reason why I would submit this small project for the prize.
I received my e-packet of LEDs today, so here is the layout I have worked up without the resistors or battery. The LEDs do not quite fit this close to each other, so I will have to sand them down a tiny bit on the bottom rim of most of the LEDs. The battery pack will attach to the bottom of this board using the original case of the lighter if I can manage it.