Outlet 60 Minute Timer

Outlet 60 Minute Timer

As I was browsing reddit today, I found this nice simple project, an Outlet Timer. I remember leaving the hot glue gun on one day, and finding it the next day, still running as hot as could be. The glue that came out of it was orange, and I know that things would have been bad if I didn’t catch it when I did. Typically I try to be as cheap as possible, but for the importance of this project, I didn’t mind investing the $27.

Here are the parts that I used for this Outlet Timer

In true DIY fashion, I’ll go through the steps that i used to make it.  I first wanted to find out which wire was Hot (the conductor that is switched when you switch on/off the power strip.  I first pealed back the insulation, being careful not to nick any of the wires.  I picked this location so that it was pretty close to the strip.

Under the insulation, we find, 3 wires (white, black, green).

In my case, the switch was connected to the black conductor (I could tell by measuring the conductance between the black wire, and that socket, when I switched on/off the power strip).  I cut the wires, with a pair of wire cutters, and stripped the recommended length of conductor for the countdown switch.  After feeding both wires through the 1 Gang electrical box, I inserted the trimmed black conductor into the countdown switch.

Inserting Black wire into countdown switch, note that both ends of the power cord have already been fed through the 1 Gang electrical box.

After that, I secured both green wires together using a WireTwist wire connector, and I did the same for the white wires.

Securing green and white conductors with wire connectors

At this point, I wanted some strain relief, so that things don’t come undone if someone accidentally pulls the power strip.  So I took 2 black zipties, and fed it through the 1 Gang electrical box so that the power cable will be secure against the box.

Stress relieving the power cable using zipties

By far the hardest part of this project was screwing the Countdown switch to the 1 Gang electrical box.  Those flat-head screws weren’t fun.  I wrapped it up by putting the faceplate on.  I did a quick sanity check, by using my multimeter and checking conductance before it has been plugged in.  Ground and Neutral were always connected, Hot was only connected to the wall if both the timer was on, and the switch for the power strip was on.  I tested it using my plug tester, and it tested out 🙂

Price list

As always, proceed at your own risk.  If you make this project, and it messes up, you take full responsibility.

Outlet 60 Minute Timer

Advertisements

Cheap Breadboard Arduino with Wireless Module

I see that there is a good amount of demand in the community for a cheap “Arduino” clone with wireless. Many people, while grateful of the Arduino community and organizers, are frustrated, because everything seems so darn’ expensive! $30 Arduino Board + $20 wireless thing + $15 proto board makes almost $100 just to get you running. If you somehow found JeeNodes, they are $23. A RBBB, which just has the processor, is $13. We can do better than that though!

If you’ve clicked on the caption, you’ll see that it is possible to make a breadboard Arduino for just $7. The problem is that we still need a wireless module. XBee’s retail for $23, which is a pretty robust solution (configurable up to 19200 baud in real world situations, can communicate just with serial, standard footprint so there are lots of cheap adapters for it). But it’s expensive. You can check out the RF Bee, which is a $20 wireless solution, which actually contains an Atmega168 (running Arduino)! It’s tiny form factor is awesome, but it is $20. A RFM12B radio retails for about $6, which is pretty decent. It even has a good library for Arduino to go with it. But we can do better.

How about a $2.50 wireless module, that has a good library to go with it? That would bring our cost to $9.50, excluding shipping. That’s my cup of coffee. The hard part is finding the individual components you need, which I will help you out. Finding the cheapest parts from 20 different places is great, but the shipping will kill you. I’ll attempt to minimize the shipping cost, by ordering from a few places, getting what we need from each.

Parts:

Extra:

That brings the total for the required parts to $5.44…  wow.  Shipping would be about $5 from each place (roughly), but it isn’t included in our consideration.  Getting some different colored wire wrapping wire will help you out a lot, as well as getting a wire wrapping tool (which can be very useful).  Adding the $2.50 wireless module would bring you to $8, pretty nice!  This number scales down as you buy more, so if you buy enough parts to build 3 or 5 of them, it will be cheaper. Consider the pricing levels of the ATmega328p chips to figure out how many you should buy (you should always get spare protoboards 😛 )

I’ll do a post sometime soon on my recommended set of parts to have.  A quick update on the Carduino: I still haven’t put it in, I need to get up the motivation to start modifying wires and integrating it into my car.  I know eventually I’ll get to it, but in the mean time, I’m exploring the idea of making my own Watt Meter, with SD logging.  It would be hard to compete with that, but if I’m smart, I can end up with a meter that can work in RV’s, like this one does, using an external Shunt (small value, high wattage, precision resistor).  Till then!

Edit:  If I could make a schematic for this cheap Arduino breadboard, I would take the parts required to make it work, and customize it for each application after it.  The arduino is great as a platform, but for completed projects, typically the soldering connection is constant.    Here is a quick guide on wiring up the nRF24L01+ to a Arduino.  By following the Instructables post, you can get a general idea of how to wire it up.  I got the idea for the voltage regulator + resonator from JeeLabs, so the v5 schematic would be what you use to wire up the rest of it.  I hope this helps!

Updating power supply for Carduino

This slideshow requires JavaScript.

It turns out when I ran the Carduino at about 15v, it would be stuck in a reboot loop, and it was because of the regulator. I decided to just swap it with a LM317 (it is good up to 28V, why not?). Well, it got hot, extremely hot (linear regulating 16v to 3.3v at 60mA is a good deal of power that needs to be dissipated).

Since I just needed 3.3V, I decided to just drop the voltage using the 1N4001 diodes, 5 of them. And it works, so I’m happy 🙂

Carduino! It’s Alive!!!

This slideshow requires JavaScript.

Just a re-cap: This is a little project that will be embedded into my car, that logs the temperature of the engine, transmission, radiator, and interior to an SD card. If something gets too hot, it will show the warning led (decimal point) as well as make an audible notification (cue mario dying song). It can connect to my Controller 2.0 via a BTM-182 module, and if connected, it will display all 5 of the measured temperatures, as well as the voltage, on the controller (without needing any parsing by the controller). This will be my early alert system to warn me if something is getting too hot. In the future I may add sensors to detect the level of radiator coolant, but that is a nice-to-have, rather than need-to-have. The code for this, will be released shortly (Once I have this in my car I imagine).

It’s done! I admit, I did run into some problems. When I first powered up the Carduino main board, there seemed to be a short somewhere. I removed a diode, which of course didn’t help. After poking around, I discovered that the connections for the package of voltage regulator were wrong. After a quick rewire, it produced regulated 3.3v. After fixing a few forgot-to-solder’s, and a ‘soldered but didn’t make connection’, it fully works. I do need to do some tweaking of the software, so that it turns off at 12.3v instead of 14.0v (since I’ll be using a switch to turn it on/off).

Exciting times! Now I just need to get this in the car, and I’ll be set! I’ll need to take care of potential moisture in the temperature cable as well, but I’ll figure that out as needed 🙂

Carduino completed, now I need to test it (as well as wire up ethernet cable for display)

This slideshow requires JavaScript.

If you notice I rearranged things a little bit, and I added a temperature sensor to the display (to record car temp, why not?). Wiring everything up with wire-wrap wire is so much easier than before. Tomorrow I’ll need to do some testing (detecting shorts, seeing if the voltage regulator is working), and once everything is cleared, I’ll put a processor in it and flash it with the latest firmware 🙂

Presumably later this week I’ll be putting it into one of my car’s. I plan to use a 2 part epoxy to attach the temperature sensors to the engine, transmission, and radiator. Considering JB-Weld, but I’ll need to check its upper temperature.

Looking forward to getting this project out the door, so I can start on the next one (Automated Gardening – Sati).

Carduino main board layed out – Part 2 of 3

This slideshow requires JavaScript.

Spent longer than I anticipated organizing how everything would fit. I typically take a picture before I start soldering things, because often, things will have to come off before I can solder everything on.

As you can see, I bought some surface mount parts to use, since through-hole packages weren’t available. It looks like just soldering wires onto them will work out 🙂

This is the idea that has driven me this far in my robotics: When making decisions, do not base your choice on what you want, base it on who you want to become. A short example would be choosing between making a circuit, and playing some Minecraft. You may want to play the game, but you want to be the person with plenty of projects that not only make you more experienced, but actually solve real world problems that you face.

Because of how our brains work, we will either establish or re-enforce the pattern of making things (in this case some electronics :P). If you do this enough, it will be a natural choice, ensuring that you are who you want to become (because you would be doing all of the things the person you want to become, do). Progress!

Carduino Half-way Done (well, just the display)

This slideshow requires JavaScript.

The main reason I haven’t posted in about a week, was that the complexities of the Carduino project made it harder for me to start building the project. I got the GPS working with the TinyGPS library, but I ran out of ram (again), so I considered (again) if I should rewrite it to make it fit. It was bogging me down I decided that I didn’t need that feature (it was on the nice-to-have list anyways).

The next thing that bogged me down was attempting to determine how much protection I would need to protect it against transients on the battery lines. There are chips out there that you can use, TVS, but ultimately I decided to just use protection diodes, like here. I’m also not only using a reverse blocking diode, but a zener diode to handle transients above 15V (the regulator only takes up to 16V, MCP1703-3302E). I have no idea if this will protect it adequately, but I’m not afraid of taking risks.

The last thing that bogged me down was trying to figure out how to sleep non-essential circuitry. My plan was to use a N-channel mosfet to do it, but when I did a very rudimentary test (physically disconnecting ground from display board), the LED’s still remained lit, and even changed. Apparently the two shift registers got enough low voltage from the control pins. When I tried it on the wireless module, reconnecting it reset the board, not good. So I’m going to use a switch to turn it off and on.

Cue story about Russians using pencils in space, whereas NASA redesigned a ink pin for millions. IF I want to improve on it, I can add any of these features, but for a first revision board, this does the job, and does it well.

A quick explanation on the display board. It requires 6 lines for now, and I will use ethernet cable to connect it to the Carduino. It will be placed near my instrument panel, and it is tuned so the brightness at night time won’t blind me (hopefully). It has two shift registers (74HC595) which control an 8 segment BCD display (single bcd digit with decimal point), and 8 LED’s. The Carduino will quickly cycle through the various readings (4 temp, 1 voltage, 1 ?) and display it’s level, as well as a number associated with it. If any over-temperature event occurs, it will sound an alarm using a Piezo speaker. It will also light up the decimal point, so i can quickly see if any reading is abnormal.

Tomorrow I’ll wire up the main board for the Carduino. Putting it in my car will be a fun challenge as well.

Coming up i’ll be starting a new project, a Garden automated with Arduino (controlling watering, lighting, and more). A quick update for the Controller 2.0 project, I received two different wireless nunchuck’s, and both of them work flawlessly with it 🙂

Progress update on Carduino

So these past few days I have been working on the Carduino. Adding the GPS, parsing the output, saving it and displaying it. But adding that library, which works, increases the usage of the flash. Since I only have 2kB of flash on this MCU, it resulted in using more memory than I have, never a good thing.

So to wrap up this project, and move onto others, I’ll be settling on not having GPS data saved. The main things, temperature monitoring and displaying / alerting, is complete. I even save it to an SD card, which is a nice feature. As I’ve heard before, the first iteration of a device shouldn’t be perfect, nor strive for perfection, since doing so will make the project drag on and on (which has sort of been happening with this carduino project).

So I’ll be making the circuits in the next few days (1 board with BCD, LED’s, and 2 shift regs, 2nd board having processor + BT serial, and SD card), housed in a cheap $0.24 case mounted in my glovebox. The BCD board will be mounted near the speedometer with dimly lit LED’s so that I’m not blinded at night. Ethernet cable will connect the BCD board to the main board, another cable will connect the temperature sensors to the main board (with a diode + resistor protection).

Sometimes you’ve got to abandon a idea or feature in order to get a project built,and many times this is good, since you can always make improvements in the second version.

Sleeping Carduino

Thanks to the great examples here, I now have the Carduino set to monitor the battery voltage (A0) and if it detects that the battery voltage is below a certain level, it sleeps. Once I get the BSS123’s, I’ll be able to control the power going to the BT serial as well as everything else (power off everything, then sleep, wake up, power on everything). Pretty awesome!

I updated the RTTTL example to correct two bugs I found, with the end result that it works better, without messing up on the first note. The updated example is on the same pastebin link as the original.

I also got news that my 3 wireless nunchucks have shipped, so I can expect to be getting them at the end of the month. That’s all for tonight 🙂

Future projects:
Garden monitor + watering (using windshield washer pumps)
Slash Arduino (if I get the FPV camera stuff) Pan/tilt servos, Gyro
PCB-ize the Controller (with options for different wireless modules) will have Nunchuck and maybe PS2 connector
Make OpenCurrent Version 2, with MCU + voltage monitoring, made to be in-line like many power monitoring solutions currently available

Needed features completed for Carduino, all that remains is nice to have features

For this project, I broke up the features into need to haves, and want to haves, with the intention that I could call the project complete once all of the need to haves are complete. I wanted a basic engine monitoring circuit that I can put into my cars, and I have that now.

I even added two shift registers with 8 LEDS and a BCD 8 segment display to compliment it. The purpose would be to display the sensor number, and if it is in a good range or not. I will mount this so that the driver can see it and monitor it. If a temperature or voltage exceeds the threshold in a dangerous way (over temp), It will not only sound an alarm, but light the small decimal point of the BCD so that I know something is up. I need to add sleep code, but that’s about it (and controlling the power rail of the BT serial, SD, GPS, and LEDs with a mosfet).

The remaining want to haves include: GPS and gyro. I don’t anticipate any problems with adding those, even though for both of those, I will be forced to use the SW versions of the protocols (serial, i2c) rather than using the on-board module.

I’m going to be doing some more testing of the alerting code (moving the temperature sensors near an open flame, monitoring temp on controller), but once I do that, I’ll start soldering boards up for it (with connectors for Gyro and GPS for future upgrades) and wiring up my car. I’ll be using the MotionPlus as a gyro, since it is so cheap.

The next two projects I’ll be working on is a Gardening bot, and a arduino for my Traxxas Slash RC car. Might be getting some video equipment so that I can see what the car sees, in real-time. Will also look into updating the OpenCurrent to add some goodies, and making a PCB of my controller, similar to the Ardustation.

I look back at the past 4 months, and I see how doing things, while not perfectly, can accomplish things. If I were too afraid to fail, I would do nothing, as history has shown. Some of the lessons I’ve learned: If it’s too hard, break it down. If your losing motivation, try switching your focus. Record everything in a notebook, writing ideas, no matter how silly. And above all, create rather than consume.