An awful lot of microcontroller projects use timers to repeat an action every few minutes, hours, or days. While these timers can be as accurate as a cheap digital wrist watch, there are times when you need a microcontroller’s timer to measure exactly, losing no more than a few milliseconds a day. It’s not very hard to get a timer to this level as accuracy, as [Karl] shows us in a tutorial.
The problem with keeping time with a microcontroller has to do with the crystal, clock frequency, and hardware prescalers of your chip of choice. [Karl] started his project with an ATMega168 and a 20 MHz crystal and the prescaler set at 256. This made the 78.125 interrupts per second, but the lack of floating point arithmetic means one second for the microcontroller will be 0.9984 seconds to you and me.
[Karl]’s solution to this problem was to have the ATMega count out 78 interrupts per second for seven seconds, then count out 79 interrupts for one second. It’s not terribly complicated, and now [Karl]’s timers are as accurate as the crystal used for the ‘168’s clock.
[Steven Mackaay] added a simple user interface that implements a shutoff timer for his desk lamp. His project log comes in two parts, the breadboarding and the actual implementation.
He wanted a few things out of the build. The first is an LED that would help him find the lamp in the dark. The second feature is a shutoff timer with different delay options. To get everything working he used a PIC microcontroller to drive a mechanical relay. That relay switches the mains power to the lamps. Now he uses one button to switch the lamp on and off. The other selects a shutoff timer of one, five, or thirty minutes. Power for the control circuitry is provided by the green wall wart PCB seen in the photo of the electronic guts.
This is a pretty general setup that could be applied to a lot of other mains switching applications. Just connect the logic hardware to some type of relay.
Sure, it’s time to get the countdown clocks ready to ring in the new year, but why limit it to just one night? If you end up building a six-foot digital display you can count down trivial events; like the remaining seconds of freedom before you have to pimp yourself out in that drab cubicle.
This seven-segment display is homemade and boasts six full-sized digits and two smaller digits with each pair separated by colons. You have probably already guessed that the construction was greatly simplified by using LED strips rather than individual components. This is part of the reason for the size of the display. The strips can be cut, but only down to a minimum of 3 LEDs per segment. That explains the small digits, with their larger siblings doubled in size. But there is a benefit to this constraint, it means that current limiting is already taken care of for you.
The main assembly is a wooden frame surrounding two polycarbonate sheets. The LED strips are sandwiched between those sheets, with segment and digit driver buses exiting a one point on the side. The build doesn’t detail a driver for the display but it shouldn’t be hard to find a multiplexing example that will serve the purpose.
[Viktor] just pulled out another one of his decades-old projects. This time around it’s a timer he built using 7400 logic chips. It was a great way for him to learn about electronics, and ended up serving as his alarm clock every morning.
Two pieces of copper clad board were cut to the same size. One of them was etched to act as the circuit board. The other was outfitted as a face plate. The same type of transfer sheets used to mask the traces of the circuit were also used to apply labels to the face plate. It was then coated with acrylic spray to protect it and stave off corrosion. The clock keeps time based on a half-wave rectified signal. The source is from a transformer which steps mains voltage down to a safe level for the 7805 regulator that supplies the clock’s power bus.
We’re glad [Viktor] has been showing off these old projects. We’ve also enjoyed seeing a TV sleep timer he built. If you’ve got something neat for yester-year why not dust it off, post the details, and send us a tip about it?
There are a couple of things that go into a great cup of tea. One is to have the water at the correct temperature, the other is to steep for just the right amount of time. This offering solves the latter by extracting the tea bag after a carefully timed steep.
It’s hard to imagine how this could be more simple. The timing mechanism is a cheap egg timer which has been modified to include a paperclip which moves with the minute hand. When the timer hits zero that paper clip contacts a stationary electrode, which powers the motor. That motor is the laser sled from a dead CD-ROM drive. Since these usually die because of the lens (not the mechanism) this is a great re-use of the internals. The sled zips to one side until it hits a limiting switch which kills the power. At the same time, this motion uses the wooden lever to extract the tea bag. All of this is explained in the clip after the jump.
Since the egg timer already has its own bell, you’ll even be alerted that it’s tea time!
Continue reading “Automate your tea time”
[Viktor] dredged up a hack he pulled off years ago. His grandfather likes to end the day in front of the TV, but he falls asleep soon after sitting down. Rather than tick away the electricity meter all night, [Viktor] built an automatic shutoff which is akin to a modern TV’s sleep feature.
At the time microcontrollers were not as easy to source as they are now. So [Viktor] used a circuit based on the 7400 family of logic chips. It uses a multivibrator to feed some binary counter chips. These are used to divide the oscillations to establish the desired timing. He tuned the system to be about 15 minutes, but that can be adjusted using a potentiometer built into the multivibrator. When time is about the run out an LED next to the TV comes on. This way if [Viktor’s] grandfather is still awake he can press a button next to his chair to reset the counter. But if he’s already snoozing the counter will eventually switch off the television.
[Tom] managed to build a geeky, quirky digital timer for the kitchen. Where most would have used a few seven segment displays along with some buttons and called it done, he found a way to make it a lot more fun. The plush addition on top is a yellow ducky with an orange beak. When time runs out the duck will quack, call you back to the kitchen.
As you can see in the video after the break, [Tom’s] got his hands full with the family. This project was quick enough for him to fit it in during what dwindling free time he manages to hold onto. He used one of the chips that came with his MSP430 Launchpad. Since this family of processors offer extremely low-power modes when asleep they’re perfect for this type of battery-powered application. As for the duck, it’s a toy that had a couple of watch batteries and a small PCB inside. Some poking around led him to a pad that activates the quacking when grounded.
Continue reading “Quacking egg timer”