Friday, September 28, 2012

Arduino Controlled Computer Startup / Shutdown


Update 10/1/2012
After being unsatisfied with not having the RTC included in the build I dug through the both the  Adafruit & Arduino forums looking for someone who may have had the same issues. Sure enough I wasn't alone when dealing with the issues I was having and found the solution looking me right in thee face. Below is the corrected code minus the code for the LCD display which I still have to order, but after consideration will probably be skipping and leaving in just a project box with some light modification such as LED status lights. I have also removed the directly soldered wires going from the PC to the shield and replaced them with pinheaders as seen above (see pictures below for comparison) to make disconnecting the wires from the shield easier then leaving them soldered in.

#include <Wire.h>
#include "RTClib.h"
#include <Time.h>
#include <TimeAlarms.h>

int led = 2; //5v signal to relay
int led2 = 8; //5v signal to reed relay

RTC_DS1307 RTC;

void setup()
{
  Serial.begin(57600);
  Wire.begin();
    RTC.begin();
   
     if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.adjust(DateTime(__DATE__, __TIME__));
  }
   DateTime now = RTC.now();
  setTime(hour(), minute(), second(), day(), month(), year());
  setTime(now.hour(),now.minute(),now.second(),now.day(),now.month(),now.year()); 
  
  // Alarms
  Alarm.alarmRepeat(6,15,0, WakeAlarm);  // 6:15am Computers On
  Alarm.alarmRepeat(9,15,0, WorkAlarm);  // 9:15am Computers Off
  Alarm.alarmRepeat(15,20,0, HomeAlarm); // 3:20pm Computers On
  Alarm.alarmRepeat(2,0,0, NightAlarm);  // 2:00am Computers Off
   
}

void  loop(){ 
  DateTime now = RTC.now();
  setTime(now.hour(),now.minute(),now.second(),now.day(),now.month(),now.year()); // set time & date
  Alarm.delay(1000); //clock display delay
 
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();
 
}

// Alarm Functions
void WakeAlarm(){
  pinMode(led, OUTPUT); 
  pinMode(led2, OUTPUT);
  digitalWrite(led, HIGH);  
  digitalWrite(led2, HIGH); 
  delay(5000);              
  digitalWrite(led, LOW);   
  digitalWrite(led2, LOW);  
  delay(5000);              
  Serial.println("Computer ON");   
}

void WorkAlarm(){
  pinMode(led, OUTPUT); 
  pinMode(led2, OUTPUT);
  digitalWrite(led, HIGH);  
  digitalWrite(led2, HIGH); 
  delay(5000);              
  digitalWrite(led, LOW);   
  digitalWrite(led2, LOW);  
  delay(5000);              
  Serial.println("Computer Off");
 
}
void HomeAlarm(){
  pinMode(led, OUTPUT); 
  pinMode(led2, OUTPUT);
  digitalWrite(led, HIGH);  
  digitalWrite(led2, HIGH); 
  delay(5000);              
  digitalWrite(led, LOW);   
  digitalWrite(led2, LOW);  
  delay(5000);              
  Serial.println("Computer ON");
}

void NightAlarm(){
  pinMode(led, OUTPUT); 
  pinMode(led2, OUTPUT);
  digitalWrite(led, HIGH);  
  digitalWrite(led2, HIGH); 
  delay(5000);              
  digitalWrite(led, LOW);   
  digitalWrite(led2, LOW);  
  delay(5000);              
  Serial.println("Computer Off");
}




Originally Posted 9/28/12





Like many folks all over the world my household's entertainment runs on XBMC. For those of you reading this who may have never heard of XBMC or what it can do in short XBMC is "One Media Player To Rule Them All". Our movie & TV show library is on our Network Attached Storage PC's located in our basement streaming to our XBMC compatible devices in our home. While this approach is nothing new for many already using XBMC or just those who use a at home general file servers, the electric cost for keeping things running 24hrs a day can be costly and wasteful. Looking at software solutions to turn off the PC's at a certain time of day there is plenty, but none to turn the PC back on.

Through out the life the Arduino platform and other microcontrollers we have seen countless DIY clocks, timers, alarm, & even garden watering cycles .... well why not an Arduino controlled computer? Anyone who has built a PC in the past 15yrs knows that the power button on a case does nothing more then complete a circuit. The situation screamed two things to me when looking into a Auto PC timer,  an Arduino & a reed relay.



Hooking up the Adafruit RTC DS1307 breakout board, two 5VDC reed relays, and a Seed Studio protoboard from Radio Shack to the Arduino I connected the #2 & #8 pin to the reed relays & the use of the LED comment to send 5v to the relay closing the N.O. (normally open) connection joining the two wires together just like the power button does on the PC case & simulating a button press.

 Inside the PC I added a simple PCB add-on to allow the power switch terminals to connect to the pin headers on the PCB, then from the PCB to the two pins on the motherboard. The power switch on the case still functions as normal and required no case modification.

I originally intended to use 1 reed relay to operate both machines but after it showed signs of failure I added a second relay for the 2nd PC  (see F.A.Q) to allow the systems to turn on and off without any issues in separate relays.

 As the schedule now stands the 2 NAS PC's turn on at 6AM at the start of everyone's day, off at 9:00AM back on at 3:00PM and off again at 2AM cutting 10 hours off of wasteful non use.

While many could say that it's just as easy to turn them on when I need them , this kind of is a problem to my 5yr old who I don't want walking down the stairs at 6:30AM on a Sunday cause she wants to be able to watch a movie on her XBMC device in her room.



As this was only a test run or more of a proof of concept so to speak the LCD screen hooked up was not running cause I feel the screen is just to small for the size of the project box and overall feel the display needs to be much larger in size for it to be effective as a display. Also I am redoing the overall protoboard to make a full shield add-on specifically designed for handling more then one machine possibly with a wireless Xbee solution to remove the wire aspect. 


 
Code Used

#include <Time.h>
#include <TimeAlarms.h>

int led = 2; //5v signal to relay
int led2 = 8; //5v signal to reed relay

void setup()
{
  Serial.begin(57600);
  setTime(12,0,0,9,29,12); // Set Time
  // create the alarms
  Alarm.alarmRepeat(6,15,0, WakeAlarm);  // 6:15am Computers On
  Alarm.alarmRepeat(9,15,0, WorkAlarm);  // 9:15am Computers Off
  Alarm.alarmRepeat(15,20,0, HomeAlarm); // 3:20pm Computers On
  Alarm.alarmRepeat(2,0,0, NightAlarm);  // 2:00am Computers Off
   
}

void  loop(){ 
  digitalClockDisplay();
  Alarm.delay(1000); //clock display delay
 
 
}

// Alarm Functions
void WakeAlarm(){
  pinMode(led, OUTPUT); 
  pinMode(led2, OUTPUT);
  digitalWrite(led, HIGH);  
  digitalWrite(led2, HIGH); 
  delay(5000);              
  digitalWrite(led, LOW);   
  digitalWrite(led2, LOW);  
  delay(5000);              
  Serial.println("Computer ON");   
}

void WorkAlarm(){
  pinMode(led, OUTPUT); 
  pinMode(led2, OUTPUT);
  digitalWrite(led, HIGH);  
  digitalWrite(led2, HIGH); 
  delay(5000);              
  digitalWrite(led, LOW);   
  digitalWrite(led2, LOW);  
  delay(5000);              
  Serial.println("Computer Off");
 
}
void HomeAlarm(){
  pinMode(led, OUTPUT); 
  pinMode(led2, OUTPUT);
  digitalWrite(led, HIGH);  
  digitalWrite(led2, HIGH); 
  delay(5000);              
  digitalWrite(led, LOW);   
  digitalWrite(led2, LOW);  
  delay(5000);              
  Serial.println("Computer ON");
}

void NightAlarm(){
  pinMode(led, OUTPUT); 
  pinMode(led2, OUTPUT);
  digitalWrite(led, HIGH);  
  digitalWrite(led2, HIGH); 
  delay(5000);              
  digitalWrite(led, LOW);   
  digitalWrite(led2, LOW);  
  delay(5000);              
  Serial.println("Computer Off");
}

void digitalClockDisplay()
{
  // digital clock display of the time
  Serial.print(hour());
  printDigits(minute());
  printDigits(second());
  Serial.println();
}

void printDigits(int digits)
{
  Serial.print(":");
  if(digits < 10)
    Serial.print('0');
  Serial.print(digits);
}


Arduino Controlled Computer Startup / Shutdown in Action





F.A.Q
(Based on questions asked by friends during build)

Q. Why 2 relays?
A. When hooking up a single PC with both sets of wires hooked up to one relay it worked fine , but hooking up both PC's to the single reed relay immediately turned off both PC's and would not allow them to turn back on without first removing the one of the hook ups from the other machine. The solution to this was to have a single relay for each machine, however a double pole single throw relay I am assuming would work seeing as both connections would continue to remain separate.





 

Friday, July 27, 2012

A Thank You To All Women Makers & Engineers

A few weeks ago I shared a story with someone about how my girls got started in building projects & electronics. It wasn't until later on that I realized that I had never shared it with the rest of the world as it is a story that needs to be shared.



 
The photos above have made their way across the internet onto many different sites & blogs. While many people have said thank you to me for sharing what my kids are doing along with a compliments of what a great job I am doing by teaching them, this praise does not belong to me but belongs to the women of the "Do It Yourself" revolution from both the present and the past.

While in Radio Shack one day browsing the DIY project clearance rack I had asked my oldest daughter if she wanted to build her own AM/FM radio. Her response was less then thrilling to me as she told me "Girls don't do that sort of thing ... Dad". Shocked because I've always tried to bestow upon my girls that anyone can do what they want no matter of race or gender I saw it was time to set the record straight.

As soon as we got home I went to work on showing both my oldest girls some great examples of women currently building things in both hardware & software. Showing them the not only the Adafruit website but also work done by Becky Stern , Jeri Ellsworth along with the countless times we've seen awesome builds by women on Hack A Day they finally realized gender is blind when it comes to building their dreams & ideas.

While the positive feedback from others has been great with people telling me how cool it is that I am teaching my girls these things, lets not forget to thank those who made the kids interest in electronics & building possible. Without the hard work, talent, & drive to both educate and share how they did things with the rest of the world my girls would never of had the role models that they have found in the work & talents of all of the women working on things from Arduino to Software. Now when out & about in town or at Radio Shack the girls pick out what they want to build and have found interest in asking how does that work and how can we build or own version.

So in the end please give a big thank you to all the women engineers & crafters out there showing the world that no matter race, religion, gender, or sexual orientation anyone can build their dreams & be a positive role model in the lives of people they've never even meet. Thank You Again for all that you do



Friday, July 13, 2012

These Hack Scouts Need your Vote!





A build project that the kids & I have been talking about for awhile is now back on the drawing board after consistent demand by the kids. Originally our plans were to build a working replica of the robot  K9 from the TV show Doctor Who but also add in some options to make K9 more of a security drone for the house as well as add in our own touch of sensors & internet integration.



While talking about plans of what it was we wanted our K9 unit to do the subject of building a world destroying alien race robot called the Daleks came into play instead of a lovable metal pup.




After deciding to switch our plans from the lovable K9 to a evil Dalek we started researching build plans. After getting a good idea from hundreds of others who to have chosen to create this type of replica we will be following the designs & planning of www.projectdalek.com while still adding in our own range of upgrades & sensors. This type of build offers the kids not only a chance to build on of the most iconic characters from one of their favorite TV shows but also gives them a hands of approach to fabrication, CNC, electrical, motor controls & sensors. Now the question we are asking the Internet is do we go full scale or a mini. On the top right side of this page please submit your vote for either a Full Size Dalek or a Small Scale Dalek.


We would like the thank Atlantic Drives & Bearings of Vineland, NJ who have offered to sponsor  the drive portion of our Dalek no matter the size we choose in the end. We are very grateful for the amount of support shown to the kids on their "Hack Scouts" interest and would like to thank all of you who have sent emails offering to donate to our building efforts. Unfortunately at this time we are not taking donations, but if you would like to donate to this & further projects we ask for gift cards for materials & parts at these fine online retailers.

www.adafruit.com
www.digikey.com
www.newark.com

Tuesday, July 3, 2012

So Just What Is A "Real" Tablet Anyway?

Over the past year I've heard iPeople & Windows fans make claims that "Android tablets aren't real tablets" along with grandiose assumptions such as "The victim of Windows 8 will be Android tablets" and how the iPad & upcoming Windows tablet are the only true tablets. So just what is the definition of a real tablet anyway? & more importantly to be a tablet does it have to have a Microsoft logo or piece Fruit on it?

In my short write up on the ASUS Transformer TF101 I shared what I use my tablet for & how it fits into my lifestyle. I felt the need to comment again on the usfullness of my so called "non tablet"  after being without power for the past 95 hours after a nasty storm left myself and over 300,000 others in my area without power.

Like most parents when the power goes out we all try to find ways to entertain kids by playing boardgames, cards, & anything else we can do to calm down kids from the 5 to 10 age range. While all of those are great sometimes we still need the help of other entertainment such as a TV show or movie when calling the power company or getting the house setup with candles for the night ahead without power.

One of the best things I ever purchased was a $20 DC to AC 150 watt (200 watt peak) power inverter for our van to power our modified Xbox 1 XBMC unit. Using the inverter I was able to transfer more then 30 of our movies from one of our file servers hard drives by hooking it up to a external HDD enclosure & then to the Transformer's Dock powering the HDD through the inverter while also charging the tablet. Many would say "That's what Netflix is for" how can you run Netflix with no internet & dodgy cell service due to technical issues caused by the storm. While this sort of setup is not a new approach to many of us in the DIY community or those of us that can look at hardware and see potential as these options are unavailable to me on an iPad or other Android based device such as a Samsung Galaxy Tab.

The ASUS keyboard with USB ports was a life saver when needing to charge our cell phones to keep in contact with family & find out local information such as Red Cross relief shelters in the area distributing ice & offering a place to cool off from the heat wave that hit in the days after the storm. The tablet provided entertainment for the whole family by playing over 20+ movies , charging 2 cell phones & serving as a partial flashlight while only needing to be charged twice in 95hrs.

So please... next time you decide to talk down an Android based device think about what your counter part can do that you might not be able to & vise versa. Take it upon your self to ask a friend or colleague who may own such a device to give you a real demo as it might just change your mind when you think outside of the box. As the future of portable devices comes down to more then just the latest game or social app or the number of current apps in the respective markets, it still does just come down to the same thing it always has.. the hardware.
 
Please note that this blog post was not written to insult the family of iPads,  future Microsoft devices or persons. It was meant to point out that yes many of you are %100 correct! it's not a tablet.. it's better then a tablet & most netbooks. I have a device that's marketed & sold as a tablet with a separate keyboard attachment that cost me just a little less then an iPad ( and possibly a Surface tablet) that I was able to do more with then the "real tablets" others claim as well as other current Android devices on the market just can't do. In the end as long as people can see the potential in a device's hardware, build an alternative operating system , & strive to get the most bang for their buck .... the Open Source spirit of Android will always live & show up on devices just as it has in the PC world with Linux for over 20yrs & 50 million plus users later.


Sunday, June 24, 2012

A Review of the ASUS Transformer TF101 A Year Later

Almost six months after my original purchase of the ASUS Transformer TF101 I still stand by my purchase & have decided to write this review based on what I use the device for and how it fits into the 4 categories of work , play ,  family , & durability.

Christmas time 2011 I was in the market for a portable device that was able to handle both work & play but also have decent battery life yet be more compact then a traditional laptop. Looking at my options from online to BestBuy my best option was to choose a tablet over a laptop or netbook due to battery life and ease of use. Most of my work is spent researching information, building PDF based catalogs, customer support, updating clients online sites & shopping carts. Other then email  & the occasional PDF all of my photo editing , CAD design , major gaming , & coding happens on my desktop PC or game system. With current tablets on the market offering the ability to be on a data connection was ideal for Internet on the go but more money then I needed to spend on mobile service when by default my current provider & phone allows Wifi tethering without the need to jailbreak or root the phone.  In the process of shopping around & eying things up the two main choices that drove me to the ASUS TF101 Android Tablet over the iPad2 was memory expansion & HDMI output. 

After bouncing from iPad2 back Android back to iPad2 the ASUS Transformer stood out strongest to gave me all I needed at a good price. Priced around the same as traditional laptops, the iPad2 and  other Android devices like the Samsung Galaxy Tab the Transformer's big selling point for me was the removable keyboard that provided extended battery life (well beyond the advertised time) 2 USB ports & SD card slot.

Family

Family needs played a big part in the purchase of this device as it also needed to be "kid friendly". With 6 people 2 adults and 4 kids , all with digital camera's & MP3 players means when vacationing I need to be able to access memory cards from 1 HD Camcorder & 5 digital cameras to make room or upload files on the go which makes the keyboard dock a big plus. While on our family vacation this year I was able to see just how much of a family tablet this device was. This year we went to see the Statue of Liberty stop off at Medieval Times for dinner & a show and a trip to NYC to see some of my favorite places such as Madison Square Garden. The ASUS Transformer preformed beautifully with swapping out photo's & videos from the day to make room for the events still ahead during the trip. The mini HDMI output was a excellent choice in future planing as I was able to hookup the Tablet to the hotel's flat screen to allow the kids to watch some shows on Netflix when they needed a little help falling asleep when the hotel cable station had very little on late night for the 4 yr old & 6 yr old.

The tablet's built in GPS together with Google Maps made sight seeing planning for the next day a breeze when planning out driving routes. Google Places helped in deciding where to eat based off of user submitted reviews on local restaurants without having to dig around to the web looking for a place to eat. 

Work

As an everyday on the go device it serves me well and allows me to still work between the home office and the main office with Kingston Office & Polaris Office with the addition of being able to use the bundled ASUS WebStorage for pulling information from the "cloud" to retrieve documents on the go. Using the HDMI output when doing a presentation for a client is awesome cause not only can I do a slide show but also show Internet information if need be all on a 55' LED TV swapping from App to App with little to no hesitation.

While the open source office options makes using the tablet for work a great choice I'd still pay the money for a Microsoft slice of Android flavored MS Office to allow for more universal document review when dealing with multiple documents across different clients. At night I am able to remove myself from the home office and spend time watching TV with the family while still catching up online with the days events or working on something for a client while still enjoying time with the family.
Play

For the limited gaming that I do with the device the experience can feel like a major console title sometimes. GTA III plays wonderful with a Bluetooth controller & the space flight Sims with the on screen controls are a blast and often have found myself passing by more then a few hours with them,  however I've found Zen Pinball to be the one I spend the most time with cause it always come down to Pinball in the end.

At bedtime a mix of the Kindle App , Barnes & Noble , & Aldiko have gotten me back into the habit of reading more books not just the latest tech manual though the size of the device does make one handed reading a light strain on the wrist, but still a enjoyable experience. My favorite past time of RPG's has become more enjoyable now that I have a device with a big enough screen to pause a game and look at a map on IGN of where in the sand box style world my character needs to be.   

Durability

The durability of the device has been thoroughly tested in a manner of speaking being almost put through hell & come out surviving some accidents with very little issue. The kids always want to use my table to play games from "Angry Birds" to "Chess" to the cute "LEGO" app. While most parents encourage their kids to sit at the table and play nice with the tablet I let mine disappear to that dark place all parents fear ... their room. While I have seen the tablet drop from their hands a few times and get a accidental kick from them running to pick it up it still has stood strong.

I myself have dropped & thrown the device more then a hand full of times and when I say thrown I mean full force across the room smack against the wall and ..  it lived just fine. While I would not recommend dropping it from a high place glass down it can survive the rampage of child and that of a fully grown adult, not to mention surviving just fine in a locked car on a 101 degree day with 90% humidity.
 
Ice Cream Sandwich / Desktop OS

When Ice Cream Sandwich came out in March 2012 for the device I was more then thrilled with the improvements that ICS brought to the device over Honeycomb but this did not come without issue.

The one main problem myself and other owners faced was random reboots. These random reboots would happen at least twice a day for almost 3 weeks until ASUS released an update then another update then another update till finally in May of 2012 & 2 updates later all was well and the reboot issue stopped. It should be noted however that while using the official OS I did try a handful of CyanogenMod based ROM's where the random reboots where not an issue. The ICS update & continued updates since march have made some great enhancements in not only speed but also in App optimization. Apps designed for phones seemed to run better then before on the device after the update even when the App had not yet received a update adding support in for ICS.

Along with the open boot loader I can run a alternative ROM such as CyanogenMod but also a full Desktop OS like Ubuntu on a dual boot option. Ubuntu mobile edition still needs some work when going on the tablet front, but I was still able to play around within the environment and have an overall good experience with Ubuntu on the tablet. While this series of tablet may never see Ubuntu with all the bells and whistles I am sure Ubuntu will "Surface" in on other similar hardware in the months to come.
 
 Final Thoughts

 I can say that now in June 2012 after the May update on a stock OS but still on a CWM Recovery I'm still super thrilled with my purchase as the device as served me well these past six months. My tablet is almost always within arms reach and is a great asset when on the go at a clients office or about town. The battery life for what I use it for is beyond the stated specs from ASUS as at times I've gone 4 days without needing to charge my device using it only as a in between from the office to a clients office.

While on vacation and even on the go the included SplashTopHD remote (normally $21.99) was great to have when emails from clients came in allowing me to connect to my home computer to pull files, do some quick editing in Microsoft Expression Web & even allowed me to do some lite CAD all over WiFi & 4G.

In the part of family life it has done a well enough for me to know I made the right choice by not picking up a traditional laptop or netbook due to the Apps & services being what I need them to be to suit my needs for my family. The use of it during our vacation was a big help in trip planning as it was nice to be able to use it for Navigation when the car GPS decided to act up. At night now when normally I would be confined to the office away from the family it's most enjoyable to have a light weight device I can sit in bed with the wife & watch a movie while still being able to get things done for work.

Saturday, June 23, 2012

How much of Xbox Live do we pay for?

First off let me say that I love Xbox Live. The services that Xbox Live offers are a wonderful given the fact that some people can't afford to own separate streaming devices or only have 1 PC in a home, but can still access services such as Facebook, Twitter, Netflix & others right from their game console.  XBL offers one of the most cost effective options for XBL Gold members such as their "Family Plan" which offers 1 yr of XBL Gold service for up to 4 accounts with membership pricing decreasing each year of renewal not to mention some other nice perk features. However not everyone has a need for 4 accounts much less 2 and while Netflix, HuluPlus, Zune, Facebook, Twitter, etc can all be found offering great services I only use XBL for multiplayer gaming so what happens when some people don't use 95% of the services we pay for.

Since the birth of  XBL many complained about "Free To Play" multiplayer gaming claiming that the system & game costs were enough already going from a $50 price point to $60 amongst most systems for new game titles. While in 2006 I couldn't agree completely with the "Free To Play" when you consider the cost of server maintenance, hardware upkeep, & programming , but in 2012 the stage has changed. With more & more devices having the ability to stream content over cell & home networks I feel the once powerful 360 Media hub is slowly forgetting it's roots in the hands of gamers and turning into another stream box that can also play games. While many gamers enjoy the extra options of a XBL Gold membership what about gamer who doesn't use Netflix or social media on thier 360 & still have to help pay for what John Q uses down the streets cause he needs ESPN on demand?

Xbox Live as turned into a service , a service that was built by Microsoft founded on us the gamers. If gamers who only use the Xbox360 for gaming paid half the cost of a gold membership but were limited to multiplayer & marketplace & not access streaming content I wonder how many more current silver accounts would go gold.

Friday, May 11, 2012

Taking the Coin out of "Coin Operated"


A few years ago the company I worked for also had their hands in apartment rentals. In trying to improve their facility they purchased at auction a truckload of brand new commercial coin operated washers & dryers intended for a bankrupt laundromat. Fortunately for me the units were never used and still had the original wrapping on them. Having picked up more then they needed at a good price I was offered for free a new washer & dryer for my home as opposed to buying a new set costing me an upwards of $400 & up. The only downside to the units were the fact that they were coin operated which wasn't to much of an issue as I had the coin tray key so I could use the same 5 quarters for both the washer and dryer.

While the system of using the same coins worked well for a number of years after some time it just became tiresome. Having no luck finding answers online I asked my father an engineer with over 30 yrs experience in the field of Industrial Operations how to remove the coin aspect of the units his response was one of "Don't do it!!, the machine won't work correctly." Trusting my father as all kids do no matter how old they get I left it alone until a few weekends ago thanks to the tooth fairy needing to borrow some coins from me I was stuck in a situation where I couldn't do my laundry due to not having $1.50 in quarters and every time myself or my wife would go out somewhere we would forget to get quarters once again I needed to find a better solution.

While I did have the key to the coin box I was missing the more important key that unlocks the compartment where the machine timers and start leaver are located. Taking a drill and a 3/8 drill bit I proceeded to drill out the lock to grant me access to the control compartment.



After opening the lid and getting a better look at the control mechanism I already noticed that to spite what I had been told previously this was going to be an easy "hack" in a manner of speaking.





For those who don't know the inside of a coin laundry machine, when the coin tray is pressed in all the way a arm pushes the timer spring loaded lever back and allows the tray to move the timer forward engaging the machine. Simply removing the coin part would allow me to do the same function with out the need for the coins.





Looking inside I noticed the only thing holding the coin mechanism in place was 4 #2 Phillips machine head screws and a long threaded bolt. After loosening the timer I removed it from the machine to give me more working space, as you can see you don't have a lot of room to work with.






After removing the plastic coin guide that allows the coins to fall into the coin tray I proceed to remove the screws and the 1 bolt.






On the bottom of the coin tray past the cover are arms like levers that allow the coin tray to fully engage the timer as long as there are quarters in the tray other wise it stops dead as it should when trying to move the tray forward.





Removing the pin that holds the arms in place allowed me to remove the arms and allowing the coin tray to engage the timer fully without the need for coins as you can see from the short clip below



The same type of system holds true for the dryer with regards to the coin tray removal and arm's that allow movement when the coins are in place. The only big difference between the two units other then one is on the right side & the other is on the left is that the timers are different as you can see from the video below.





The purpose of putting this little short blog post out there was to help those who may be in the same situation that I was in, as you would be surprised the number of well maintained laundry equipment that you can find for sale under $50, but unfortunately are over looked due to the Coin aspect.








Friday, April 27, 2012

Arduino Based Book Report Diorama



     My 10yr old daughter recently had to do a diorama for a school book report as a presentation. Seeing examples of diorama's from museums, libraries and other kids projects at school she asked if we could make it cool. Asking her what she meant by "make it cool" she asked if we could add lights or moving parts to it, in which I was more then glad to accommodate as it would be a great way to introduce her to micro controllers and earn her another badge for the Adafruit "Hack Scouts".

In wanting her to learn just what micro controllers are used for I lent her my copy of "Getting Stared with Arduino" which even though is a little technical for younger readers just getting started, was a great reference tool to show her just a few examples of what people can do with an Arduino and explain the coding involved within Arduino.


Her design (as seen below) called for some simple things that were easy to accomplish with the Arduino platform. She wanted to have a yellow glowing light shining from inside the dresser drawer as described in the book, a light on the ceiling in the boys room, the boy, a bed, and a dresser.


Originally when helping her plan things out she wanted to have the dresser drawer open & close but unfortunately due to time & cost restraints we had to skip that moving part of the diorama and leave it fully open with just the LED's lighting up.

Taking a trip to our local Radio Shack we picked up a Servo motor, a 10mm white LED, & 2 yellow 3mm LED's for less then $20. Starting work on her project on April 22nd Earth Day I thought it would also be good to incorporate the use of recycled materials from parts & wire we already had here at the house from our parts pile which usually consists of broken computers, printers, scanners, etc.

To prevent any trips to the hospital I cut and shaped out the wooden box for the diorama along with the dresser, & bed. She picked the colors she wanted to paint things and we got to work on the projects appearance. Next we positioned everything were it needed to be along with hot gluing down things like the dresser, bed & LED's in their respective locations.








 After all the eye candy was done we went to work on the back of the box where the wires and everything else would be housed at. Already working towards earning her multimetter skill badge we talked about the importance of wiring and why Ohms law was so important when dealing with electronics, though while she didn't grasp all parts of Ohm's law she knows with out the use of a resistor in certain parts of electronic you might damage the micro controller.






When it came time to make the Ardunio work it's magic we used the "Sweep" example by BARRAGAN found within the Arudino example library and modified it to match our specifications as well as add the function to turn on the LED's.
// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.


#include <Servo.h>

Servo myservo;   // create servo object to control a servo
                            // a maximum of eight servo objects can be created

int pos = 0;          // variable to store the servo position

void setup()
{
 pinMode(13, OUTPUT);    
  pinMode(12, OUTPUT);

  myservo.attach(7);  // attaches the servo on pin 7 to the servo object
}


void loop() {
 digitalWrite(13, HIGH);   // turn on the LED
  digitalWrite(12, HIGH);   //turn on the LED
 
  for(pos = 0; pos < 40; pos += 1)    // goes from 0 degrees to 40 degrees
  {                                                     // in steps of 1 degree
    myservo.write(pos);                     // tell servo to go to position in variable 'pos'
    delay(15);                                     // waits 15ms for the servo to reach the position
  }
  for(pos = 40; pos>=1; pos-=1)       // goes from 40 degrees to 0 degrees
  {                               
    myservo.write(pos);                     // tell servo to go to position in variable 'pos'
    delay(15);                                     // waits 15ms for the servo to reach the position
  }
}
The video below is my 10yr old daughter showing off her project and giving a "shout out" to the open source hardware community.




While we won't know her final grade until next week, she has told me after the comments from YouTube, Twitter & seeing her project appear on the Adafruit blog , she knows it's an A+.

On a side note a very big THANK YOU to everyone who has left comments on her project. A very big thank you to the Arduino community & to Adafruit for their idea of "Hack Scouts" and everyone else doing work with the Open Source Hardware Community.