Thursday, May 22, 2014

How to build your own Enuresis (Bedwetting) Alarm

Build what?  Yup, if you have kids you might have one or two that are getting a little older and still needs a sheet change in the morning.  If your kid is under 5 years then move along.  We are talking kids 5+ here and let me also start by disclaiming that I am not providing medical advice and am not responsible for death, injury, blah, blah... you know what I am saying.

Having said that, let me give you some brief tips that might save you the hours of research I did dispelling the myths and unknowns.

My guy is a deep sleeper.
  • Wetting the bed has nothing to do with how much your kid drinks. Have your kid drink plenty in the day.
  • If your kid is not wetting their pants in the day then in almost all but rare cases s/he is a deep sleeper and when their body is telling them to pee they keep snoozing.
  • Medicine helps in the short term but doesn't address the long term problem: training your kid to wake when they gotta pee.
  • Your kid may feel bad about wetting the bed, so let them know if they wet the bed it's no biggie (Don't let Jr. see your frustration having to change the sheets  ... keep your gripes to yourself!)

Anything beyond these points I have found to be either insignificant or even incorrect.

Why use an alarm?

Ok, so your kid's body says "Hey, I gotta pee!" but your kid just continues to happily snooze as s/he soaks the sheets.  So how do we train your kid to wake and take care of business?  Well, that is where the alarm comes in.  Here is how it works:  The second your child starts to pee the alarm detects the moisture and sounds an annoying alarm that wakes him/her up.  Remember Ivan Pavlov's dogs?  Over time (just like the dogs) when your kid needs to pee his/her body will be trained to wake up and pee. Brilliant.

If you're a cheap-o like me (Mr. Money Mustache would be proud), then once you've surfed around a bit and see that you are paying circa $100 for an alarm, you turn to your mad DIY skills and say "how can I make one of these?" Well, for less that $10 you can.  Here is how I did it...

The design


Dick Cappels has the best DIY bedwetting alarm tutorial I've found. I followed his tutorial with a few modifications of my own.

The 1N916s diodes are used to protect the 555 timers from ESD. They were a PITA to find so I ended up using 1N914s which made a good drop in replacement. The 2N2222 and 2N2907 BJTs are used as a class B amplifier to boost output of the 555 and drive the speaker.  I only like to do things once so I switched the 1M resistor for a 1M pot to adjust the sensitivity later if I needed to -- can't have any false alarms!  I also switch out the 10k pot for a 100k pot to give a little more control of the volume.

I soldered all the components on via board (bread board, proto-board, etc. work fine too).  On the scope it shows it outputs a 2.8k Hz tone which is plenty annoying to wake your little one.

Dick was genius for using the clothing snaps for the sensing leads. I keep more electrical stuff around my house than clothing snaps though so I just took a 9V battery lead and cut the connector in half.  The wires are already attached and made for a clean lead. Add some heat shrink tubing and you are golden!



There you go $100 alarm for $10.

Afterthoughts

So if you just scanned through this and are like WTF? Let me tell you, it's OK if you are tired of waking in the middle of the night to a crying kid with wet sheets and you just want something that works whether it is $10 or $1,000. I have also tried out many of the expensive alarms (Malem, Neewer, etc.).  Most of these (including the DIY solution above) your kid has to sleep with a small device clipped to his/her jammies.  This is not cool for several reasons:
  1. who wants to sleep with a box clipped on their undies and 
  2. your kid + tons of stuffed animals on top of a little speaker = quiet alarm.
 Hands down, the best off-the-shelf one I found is the Rodger bedwetting alarm (no, I am not getting paid for throwing their name out). There is no funny box to wear and the alarm is wireless so you stick it anywhere you want.  I recommend the back of the toilet so they have to actually walk to the toilet to turn it off.

What are your thoughts? I want to hear your bedwetting stories, solutions, etc.

Tuesday, July 9, 2013

How to fix a Bricked BIOS


Disclaimer:  If you shock and kill yourself, it's your own fault.


BIOS (Basic Input/Output System) has been the firmware interface for PCs for what seems like forever.  With EFI (Intel's Extensible Firmware Interface) and now UEFI (Unified Extensible Firmware Interface) marching forward BIOS is slowly slipping its way into the legacy genre. The technique I describe below can apply to both BIOS and UEFI.  To keep things simple I will just refer to both as BIOS. 

Modding your BIOS is fairly easy.  You can save, modify, and then re-flash your BIOS by booting into an OS (usually DOS) and then running a flashing utility. When modding your BIOS there are some cases where you paint yourself into a corner and "brick" your BIOS rendering your computer useless.  If you modify your BIOS and then upon restart find you are unable to boot into an OS (and thus cannot flash your BIOS) you can use the following technique to un-brick your hardware.

1. Obtain a motherboard with the same chipset and un-modded BIOS

2. Boot to your OS with the flash utility.

3. While the computer is running (be careful... this is like live surgery) remove the BIOS chip from the board.  Be sure to note where PIN1 is located (there is usually a dot indicating PIN1).

4. With the computer still running insert the "bricked" BIOS chip.
5. Run your flash utility to flash the chip back to a working BIOS.
6. Power down the computer and return the BIOS chips to their respective boards.

You now have un-bricked your chip and have a working BIOS and hardware. If you've bricked your BIOS I want to hear about it -- Leave a comment below.


Monday, July 1, 2013

Chicago Electric Digital Timer Hack: Seconds Resolution

This modification takes a cheap digital appliance timer -- like the one used to turn your christmas lights on and off -- and modifies it to enable scheduling ON/OFF to the nearest SECOND.   This hack is poorly documented so I figured I post what I know here.

BACKGROUND

The best consumer appliance timers only allow you to schedule down to the nearest minute. With most you are lucky to even get that accuracy.  So why would you want to schedule something down to the nearest second?  Well, for the general population this probably won't help you much; however, for the DIY community this is a must have and I'll show you why with a recent project of mine.

I built an automatic dog feeder (if there is enough interest I may post the design later). The feeder puts the exact amount of food in my dog's bowl in the morning and night. For this design I didn't want to to use a 555 circuit or an Arduino... I just wanted to use a simple/cheap appliance timer to turn it on and off.  Well, when I finished the dog feeder I found that it only took 5 seconds to dispense the food.  If I let it go the whole minute then there would be a pound of food waiting to push my dogs into obesity.  Hence, I needed an appliance timer that was capable of scheduling ON/OFF times down to the nearest second.

Meet the Chicago Electric Digital Timer (#95205).  It sells at Harbor Freight for $10 or on Amazon for about the same.  This timer is capable of being modded to enable second-resolution scheduling.  

So let's do it...

1. Open it up. There are four philips screws on the back and another four on the back of the display section. On the circuit board the display plugs into you will see two pairs of solder pads below C7.
2. The left pads enable 12-hour format (vs. military time) and the right pads enable the second-resolution scheduling.  Solder each set as shown.
3. Reassemble.




You can now see on the display the seconds.  Now for programming
4. Set the time by holding the CLOCK and the WEEK/HOUR/MIN buttons.
5. Plug in the timer and appliance and press the PROGRAM button.
6. Use the WEEK/HOUR/MIN buttons to set the start time.  For seconds, use the ON/AUTO/OFF button.
7. Now, press PROGRAM again and set the off time in the same manor.

You're done. I'm interested what other uses people are using this for.  Post your ideas or questions in the comments section below.

Monday, June 24, 2013

Nyrius ARIES NAVS500 HD Wireless HDMI REVIEW

I had to order one of these for work and do some testing in the lab so I thought I drop a quick review.  


The Nyrius ARIES NAVS500 sells for about $180 on Amazon and is intended to connect your HDMI stuff to a remote display wirelessly.  The idea is you plug your Blue-ray player or the like into one of the boxes and then the other into your TV.  The video/audio is wirelessly transmitted to the TV.  


The setup was insanely easy.  Really, I just pulled it out of the box and plugged each box into the the TV/device.  I happened to also be testing a Roku 2 XS at the time so I used that for my source and a Sharp Aquos for the display.  Boom!  It just worked.  I had the Roku in the other room and used its RF remote to test the delay.  The delay was hardly noticeable and the resolution looked great.

 Other Stuff.  I noticed a USB and IR ports.  IR is dead in my mind (I hate IR remotes) so if you want to see how that works you'll have to do some messing of your own.  I was curious about the USB though.  I plugged in a computer's HMDI and USB in one box and a display, mouse, and keyboard in the other box.  Again, boom!, it just worked.  I had wireless HDMI and USB keyboard/mouse with minimal setup.

Now that I had a computer setup I wanted to see how hard I could push the graphics.  I forced the signal to several resolutions greater than 1080P.  The image always fell back to 1080P. I was hoping to squeeze more out of it but I guess that's better than having it drop the signal entirely.

As far as distance, I could get it through about two walls.  Once I introduced a third wall the signal started dropping.  Your mileage may vary.

Final thoughts.  My philosophy when it comes to data is if you can run wire run wire -- ethernet, HDMI, etc.  Personally, I run HDMI in my walls. However, for various reasons that doesn't always work.  I was super impressed with how simple and how great the image looked on this device.

Friday, March 22, 2013

How to: Build a Mini-ITX Gaming PC

The Job:

I was tasked to build a computer with the horsepower of an extreme gaming rig but in a space less than 8x8x5 inches (think Mac mini with juevos).   

Parts/Design Considerations:


mini-itx

When looking at mother board form factors mini-ITX was the board of choice.  It is significantly smaller than even the smallest micro-ATX boards and can still be packed full of the stuff you need.  z77 motherboards can hold the latest i7 processors and benchmark relativley fast.  After some research I picked out ASUS's p8Z77-I Deluxe.  


cpu

CPU was no compromise.   I chose Intel's latest Ivey Bridge Core i7-3770 running at 3.4Ghz (3.9Ghz max). Nuff said.  






memory

The board handles 16GB of ram so that is what I gave it. Corsair Vengeance 16GB (2x8GB) DDR3 1600 MHz (PC3 12800).



gpu

This one was the tough one.  When trying to build the beefiest computer in the smallest box you have to do some thinking in this area.  High-end GPUs are typically a full card size.  I needed something with as much or more kick than the Nvidia Quadro 4000 but in a small form factor.  The Quadro 4000m is only for proprietary mobile platforms and I couldn't see a way I was going to get this on the mini-ITX.  After some footwork and chatting with my GPU guru buddies I went with the EVGA GeForce GTX 650 Ti 2GB GPU. This eneded  up being the right choice as it benchmarked slightly faster than the Quadro 4000 for my application and was half the size.  





hard drive

I originally ordered a super fast SSD; however, it was soon put on back-order (and is still on back order... so much for free 2-day shipping) so I had to use something I already had laying around.  Fortunatley, I had a 600GB 2.5" WD VelociRaptor Enterprise Edition from a previous project. If you know anything about this drive you know that it is anything but slow.  



power supply

Power supply needed to be small and powerful.  No typical ATX power supply here. Luckily I had a small form factor 350 watt power supply laying around.  I was able to crack the case, cut the wires, and wire up the 24-pin EATX and 8-pin EATX-12V connectors that would power the motherboard.  I was a little nervous that 350 watts wouldn't be enough to power the CPU, GPU, hard drive, and motherboard but was pleasantly surprised that power supply handled everything quite nicely.  

 Here is everything laid out on my bench. 


 the box

Finding an 8x8x5 inch box was impossible.  So a custom box was in order.  Since this is just a feasibility build it'd didn't need to look pretty.

 

One of the biggest problems going small is heat.  When you take a suped-up rig and cram it into a small space you lose the ability to use large heat syncs and fans. I was a little worried about this.  I had a liquid cooled CPU cooler on standby if heat was going to be an issue.  I ran some heavy-duty processing for several hours and tested the heat.  Everything was suprisingly cool, mission accomplished.


Conclusion

This is a great build if you need (read: want) the speed and power to wow your friends yet compact enough to use as a mobile gaming rig or an overpowered HTPC.  

Feel free to leave comments below.

Friday, March 1, 2013

first post

an mms sent to my kids. trying to get some work done.

first post. first blog.  Yeah, I've never blogged before.  I've never really want to and in some ways I still don't.  I'm Spencer.  I am an electrical engineer for a large engineering company. As part of being an electrical engineer I get to (sometimes have to) take things apart, demo consumer tech, and play with interesting gizmos.  Without the web my designs would be tremendously under-inspired.  I've felt guilty over the years as I have benefited from posted hacks, unboxings, demos, solutions, whatever and I have given nothing back.  This is my attempt to change that.  If this is the only post you see on this blog... well, then I have failed and I guess at least I gave a meager effort. But I am hopeful that over the coming weeks we'll get a taste of things that may inspire your work.