It was worth the wait…I now control 120V via my Android.
awesome project is awesome
I had a mostly sleepless night, again. I managed to figure out what I had been botching while trying to provide enough juice to my PowerSwitch Tail. Transistors and alligator clamps are out; extra pins are in.
Take a look at the (awful quality) video…on the main page, as the picture quality won’t grind loading to a halt.
I still need to toss some headers on the IOIO, and take some clips out of the picture for a better picture of what I did here. Look for that shortly, along with a snippet. Pretty straight forward, but we’ll have to see where this one ends up.
I got tired of poking around with LCD drivers with my Arduino. Time for a quick project to mix it up…staring at a surge protector always puts 120V on my mind. As it turns out, I tore apart an old humidifier a while ago on my ‘workbench.’ Monday night is Katie’s reality TV night…time for something sweet.
Investigating duty cycles on this plastic fan:
fan hack
I figured that I could horse around with my PowerSwitch Tail, and make it somewhat mimic a PWM 5V setup. I was curious how long I would have to ‘pulse’ the switch with juice to keep the fan constantly rolling. I started with it fully on, and kicked my ‘active’ duty cycles lower until I reached a nearly-continual state of motion. Pause for Arduino code snippet:
/*
PowerSwitch Tail Template
–
120V AC Driver w/ LED indicator
–
Joseph Swanson
2011 | https://swantron.com
*/
void loop() {
// Fire relay / LED
digitalWrite(13, HIGH);
digitalWrite(7, HIGH);
// Configure for “on” time
delay (50);
// Kill relay / LED
digitalWrite(13, LOW);
digitalWrite(7, LOW);
// Configure for “off” time
delay (950);
}
Pause for a small small-video break:
As that code and vid indicate, 1/20th of a second is all it took to keep the fan rolling, with 19/20th of a second idle. Not bad. Not sure what the takeaway is, but that is something to mention.
Put that knowledge somewhere safe, provided the question of humidifier fan duty cycles should spring up.