ATtiny Watering Timer Turns off the Water When You Forget

ATtiny Water Timer

A pal of [Kyle's] was regularly leaving his sprinkler on for too long. He also had forgotten to turn the water off while topping off his pool a couple of times, an embarrassing and wasteful situation. Being such a good friend, [Kyle] offered to make him a water timer. This isn’t a regular water timer that turns the water on and off at the same time every day. This device allows the user to push a button to have the unit switch on a solenoid valve, permitting water flow. After a predetermined amount of time the unit removes power to the solenoid valve which stops the water flow, successfully preventing pool overflows and excessive watering.

[Kyle] started off his design using a 555 chip to do the counting. He quickly became worried that timer lengths over 10 minutes would cause inconsistent functionality due to the leakage current of the capacitor and the charge current of the resistor. There are ways around this, but rather than complicate the design he switched to an ATtiny microcontroller. The added benefit of the ATtiny is that he could connect up a potentiometer to adjust the on-time without replacing parts or making a new unit. When the potentiometer is turned, the on-board LED will flash a number of times which corresponds with the delay in minutes. Ten flashes means a 10 minute delay. It’s a simple and clear interface.

As if the home etched PCB wasn’t cool enough, [Kyle] 3D printed up a case for the unit. The case permits access to the screw terminals and has provisions for the indicator LEDs. Check out the integrated flap in the top of the case. When this portion of the case is pushed in, it presses the PCB-mounted on/off switch.

If you are interested in making one, all of the files and code are available on [Kyle's] site.

via [dangerous prototypes]

Hacklet #8: The Animals

8

This week on the Hacklet we’re looking at Hackaday.io projects that are all about animals! Hackers and makers are well-known animal lovers, in fact many a hacker can be found with a pet curled up at their feet, or on their keyboard!

catWater[Brian's] cat Roger loves drinking from the bathtub faucet. Unfortunately Roger hasn’t learned how to operate the faucet himself, so it gets left on quite a bit. To keep Roger happy while saving water, [Brian] created the Snooty Cat Waterer. Cat’s still don’t have thumbs, so [Brian] turned to capacitive sensing in the form of a Microchip MTCH10 capacitive proximity sensor chip. Coupled with a home etched PC board, the waterer can detect a cat at 3 inches. A valve and water feed teed off the toilet provide the flow. The project is moving along well, though Roger has been slow to warm up to this new water source.

 

catWater2[Jsc] has the opposite problem. His cat has decided that bathtubs are the perfect litter boxes. [Jsc] is taking aim at this little problem with his Cat Dissuader. After a servo controlled squirt bottle proved too anemic for his needs, [Jsc] turned to the Super Soaker Hydrostorm. These electric water guns can be had for as little as $16 on sale. [JSC] didn’t want to permanently modify the gun, so he 3D printed a switchable battery pack.The replacement pack is actually powered by a simple wall wart. Power to the gun is controlled by an Arduino, which senses his cat with a passive infrared sensor. Since the dissuader was installed, [Jsc's] cat has been a model citizen!

 

doggieBowlCat’s don’t get all the love though, plenty of engineers and hackers have dogs around the house. [Colin] loves his dog, but he and his family were forgetting to feed it. He created Feed the Dog to help the household keep its four-legged member from going hungry. [Colin] tried a microcontroller, but eventually settled on implementing the circuit with old-fashioned 4000 series CMOS logic chips. He used a 4060 (14-stage ripple counter w/ internal oscillator) as an 8 hour timer, and 4013 dual flip-flop. Operation of Feed the Dog is as simple as wagging your tail. Once the dog is feed, the human presses a button. A green “Just fed” LED will glow for 30 minutes, then go dark. After about 6 hours, a red LED turns on. After 8 hours, the red LED starts blinking, letting everyone know that it’s time to feed the dog.

 

chookin

[Steve] has outdoor pets. Chooks to be exact, or chickens for the non Australians out there. He loves watching his birds, especially Darth Vader, who is practicing to become a rooster. To keep track of the birds, he’s created What the Chook?, a sensor suite for the hen-house. He’s using a GCDuiNode with a number of sensors. Temperature, humidity, even a methane detector for when the bedding needs to be replaced. An OV528 JPEG camera allows [Steve] to get pictures of his flock. The entire project connects via WiFi. Steve hopes to power it from a couple of AA batteries. [Steve] also entered What the Chook? in The Hackaday Prize. If he wins, this will be the first case of flightless birds sending a human to space!

 

hackaspace-mini

Hey – Did you know that Hackaday is building a Hackerspace in Pasadena California? We’re rounding up the local community while our space is being built out. Join us at a Happy Hour Show & Tell Meetup Event hosted by our own [Jasmine Brackett] August 18th! It’s an informal show and tell, so you don’t have to bring a hack to attend. If you’re local to Pasadena, come on down and say hello!

 

 

 

 

 

A Motion Activated AC Switching Circuit using Mostly Discrete Components

AC motion switch

If you’ve ever dealt with a brightly lit Christmas tree, you might understand the frustration of having to crawl underneath the tree to turn the lights on and off. [brmarcum] feel’s your pain. He’s developed his own motion activated AC switching circuit to turn the lights on and off automatically. A motion sensor ensures that the lights are only on when there are people around to actually see the lights. The circuit also has an adjustable timer so [brmarcum] can change the length of time that the lights stay on.

The project is split into several different pieces. This makes the building and debugging of the circuit easier. The mains power is first run through a transformer to lower the voltage by a factor of 10. What remains is then filtered and regulated to 9VDC. [brmarcum] is using a Parallax PIR sensor which requires 4.5V. Therefore, the 9V signal is then lowered once more using a voltage divider circuit.

When the PIR sensor is triggered, it activates the timer circuit. The timer circuit is driven by a 555 timer. The circuit itself was originally borrowed from a classic Forrest Mims book, though it was slightly modified to accommodate the PIR sensor. The original push-button trigger was removed and replaced with the signal from the PIR sensor. The only problem is that the circuit was expecting a low signal as the trigger and the PIR sensor outputs a high signal. [brmarcum] resolved this problem with an NPN BJT to invert the signal. Once the timer is triggered, it flips on a relay that allows the mains electricity to flow through to the lights.

[brmarcum] soldered the entire circuit onto a piece of protoboard. The final product was then mounted securely inside of an insulated plastic case. This allows him to mount the circuit safely underneath the Christmas tree skirt. The PIR sensor is kept external to the enclosure and wired up into the tree itself. This allows the sensor to still detect motion in the room while the rest of the circuit is hidden away.

[via Reddit]

The Un-Digital Robotic Arm

556When you think of a robotic arm, you’re probably thinking about digital control, microcontrollers, motor drivers, and possibly a feedback loop. Anyone who was lucky enough to have an Armatron knows this isn’t the case, but you’d still be surprised at how minimal a robotic arm can be.

[viswesh713] built a servo-powered robotic arm without a microcontroller, and with some interpretations, no digital control at all. Servos are controlled by PWM signals, with a 1 ms pulse rotating the shaft one way and a 2 ms pulse rotating the shaft the other way. What’s a cheap, popular chip that can easily be configured as a timer? Yep, the venerable 555.

The robotic arm is actually configured more like a Waldo with a master slave configuration. [viswesh] built a second arm with pots at the hinges, with the resistance of the pots controlling the signal output from a 556 dual timer chip. It’s extremely clever, at least until you realize this is how very early robotic actuators were controlled. Still, an impressive display of what can be done with a simple 555. Videos below.

[Read more...]

Adding a digital timer to a cable release camera

slr-cable-release-timer

Here’s a completely non-invasive hack for a classic Minolta SLR camera. [Robby] wanted to add to the options available when it comes to remote shutter release. He ended up building a cable release add-on that mounts on the hot shoe.

He drew some of his inspiration from a similar project we saw back in March. He took the engineering example from that project which uses a small servo motor to actuate the cable release. But along the way added his own features.

The system centers around an ATtiny4313 microcontroller. It provides feedback using the character LCD on the back of the auxiliary flash body. That flash body also offers a battery compartment which provides power for the control circuitry as well as the servo motor. Right now it functions as a count-down timer, and also can hold the shutter a specified amount of time. But we could see this extended to work with external sensors to trigger at a set light level, when sensing motion, or from a remote control.

NES annoyance timer makes no friends at your work

mario-annoyance-timer

Still trying to solidify that reputation as the office Grinch? This project will let everyone know you’re a complete jerk in no time. It’s called the 8-bit Annoying Person Remover. It detects when someone enters your office at which point it starts to play the Super Mario Bros. theme song while the display counts down 400 seconds. Just like in the game the music gets faster at the end and when it stops they know it’s time to get the heck out.

The hardware inside isn’t too complicated. An Arduino and a Wave shield do most of the work. The song played is stored on an SD card and can easily be changed. There’s a speaker mounted under the top heat vent of the enclosure. The device defaults to displaying the time of day, but monitors a motion sensor on one side to detect when someone comes through the door. This also works when someone leaves, cutting off the music and resetting the display. Don’t miss a video of it in action after the break.

It’s as if this was made specifically for the Comic Book Guy

[Read more...]

Accurate timers with an AVR

timer

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.

Follow

Get every new post delivered to your Inbox.

Join 92,170 other followers