Sunday, May 26, 2013

Backfeed / problem USB Hub(s) on the RPi!

New Plugable high speed 7 port USB Hub

The first USB 7 port hub had major problems right from the start.  Even though it had a 2 amp power supply and was a package deal item on Amazon along with the Raspberry Pi.  It was a no name hub that would cause the keyboard to miss or repeat keys really bad.   So much so,  that I bought several keyboards while trying to find the problem.  Finally it burned out the USB connection to the Raspberry...  Not on the RPi itself .  The one on the hub.
 So the next one, I went with a name brand and made sure it was on the list of verified working devices for the RPi.  It was the Belkin F4U040 4 port hub.  I used it for a couple weeks before I  started having keyboard problems again.  I found that I could fix it by powering up the RPi first and then powering up the hub.  I also found that it was backfeeding the Raspberry Pi.   If I unplugged the RPi with the hub still plugged in,  the Raspberry Pi stayed turned on!   Not a good situation and could have really damaged the little computer!   I notice now they have it listed under the approved USB hubs, but with a note that it backfeeds.  Then it is listed TWICE under 'problem'  devices!  But it is still 'verified'!
 Well, I have been running my 3rd USB hub for a few days now...  No sign of a power

Wednesday, May 22, 2013

Add a case to your Raspberry Pi Camera!




Add a case to your RPi camera.  Simple, safe and secure storage for your Raspberry Pi Camera. (Read everything and understand it all before starting this yourself.  Any questions?  Just ask!) 
I received my Rpi camera and got nervous just using it. All the warning about static electricity as well as notices not to kink the cable. There is no safe way to set it down since the circuits are exposed.  Accidentally set it on the pi and short out a couple connections and not only is your camera gone, but it could damage or destroy the Pi itself! 
This entry is going to be detailed (long with lots of photos).  So it can show you how I made a case that allows me to use my Pi Camera without worry.  To start, the case I chose is rather large at roughly 3"x2.25" by 5/8" deep. You could get away with a case measuring 1.25"x1.25"x5/8" The reason being it's the smallest case that Fry's electronics had in stock. The cases can be found at most electronic supply stores and online by searching for "plastic electronic project enclosure".  The one I have is for small projects and is designed to hold a remote control... Like a garage door opener. 


First step is to make sure everything is unplugged and that you wear a grounding strap or ground yourself to a cold water pipe to discharge any static. Figure out where you want to place the camera and mark it with a sharp brad or small drill. Since it is plastic,  drill a smaller pilot hole to position the larger 5/16" drill bit. Don't use brad point drill bits (they may tear it up), drill at a slower speed to prevent melting and let the bit do the cutting.  Don't force it to avoid cracking the soft plastic. 

The camera lens should fit flush against the case. You can smooth the edges of the hole with a piece of 180 sandpaper and your finger-tip. Protect the lens on hard surfaces. 


With the camera in place, I marked the screw holes with a very tiny phillips screwdriver, simply twist it a couple times to score/mark the plastic. 


Same drilling procedure with 5/64" drill bits.  I then inserted the 2-56 x 3/4" nylon screws, then the camera board and the nylon nuts.  I didn't have to tighten them down since the screws are the exact size of the breadboard holes.  Just connecting the board to the nylon screws holds it in place.  (if you do tighten the nuts down or use other hardware, be aware of the components! They are very close and it could damage the electronics!) 
Since the screws are too long, I cut them off with wire cutters. (screws were found at Fry's electronics, but I have also found them in the specialty hardware drawers at local home improvement centers) 


I then used a dremel with a cutoff wheel to cut a tab in the back cover and the end cap, just slightly larger than the ribbon cable so it can move freely.  It can even sit on the edge or lay flat without kinking or folding the ribbon cable.  Sand the cut edges smooth with the sandpaper. 
Tighten the cover's screws and you are done! Protected,  self standing and lay flat for storage.   You have a custom camera case! 



If you have any questions, drop me a line in the comments and I will do my best to help you out! 

Wednesday, May 15, 2013

Robotic Camera Turret Controlled by Wii Nunchuk via Arduino Uno!



Been VERY busy this last week.  I explored a little deeper into how to manipulate the real world using the Arduino Uno and a couple of servos.  The control is the 3-axis accelerometer from from a Wii game system. The remote actually does have a thumb controlled Joystick on top and although the video does not show it, I can swith over using the "C" button and control the turret using the joystick. The "Z" button rapidly lights a blue LED.

Wednesday, May 8, 2013

Motion activated Screen Saver in Python on Raspberry Pi


The past few weeks while installing my Raspberry Pi and Gertboard, configuring and testing other people’s software…I have been sitting on an idea for my first project. On one of my run’s to Radio Shack, I found a Parallax Passive Infrared (PIR) Sensor for only $5. Unknown if it would even work with my system (voltage and sensor type), I picked it up with this single idea in mind.
The idea was to have the PIR sensor detect me as I come into the room and turn off the Raspberry Pi’s Energy Saving Screen Blanking.  Well I dived right in and taught myself enough Python to get the sensor up and working (yes, the Parallax Rev. B PIR Sensor will work at 3.3v. (or 5 off the board as well)). I even managed to get the HDMI to engage and Disengage the power saving Screen Blanking. But it is a hardware issue that requires the screen to be redrawn to put the desktop back on the monitor.

Sunday, May 5, 2013

Installing the Gertboard Software and ATmega328P

First I would like to mention a site for anyone new to linux. http://cli.learncodethehardway.org/book/ I consider myself a newbie although I ran a multi-line Dial-up BBS (1200Bps!) on DOS back in the late 80's early 90's and used a linux shell account to import Internet e-mail and Usenet newsgroups for my users.   Now that I am starting with the Pi,  I have to learn the basics all over again.  Anyhow this site is a really quick read, just over an hour and I think I am up to speed with the basic shell commands again.  Someone with no experience with CLI might take a bit longer, but it is a free site and very informative. I  Absolutely recommend it to the beginner. (I am now using the sister site for Python learnpythonthehardway.org/book/ ..looks like it will take a bit longer to complete, but just  as "easy going"!)
Now for what I have been doing the past few days with the Raspberry Pi.  I have fully installed the Gertboard and all of the related software.  It has taken a lot of research and hunting since the software and details of the complete setup are in several different sites.  I read and did ALL of the sample projects in the user manual. (Python Samples, not the "C".  I also got both the RPi.GPIO and the WiringPi for Python versions working so I could try all the examples!)

Wednesday, May 1, 2013

Made a custom case for my Raspberry Pi

Update:
Just received my new Raspberry Pi and the Gertboard!  So here's a picture of the new case with both installed.  Works way better than I could ever imagine!


Original post:


One thing that makes me nervous is working on the RPI and Arduino with all the circuits exposed.  Well I had some acrylic plastic sitting around for the past few year and I had a spare 30 minutes this afternoon, so I cranked out a protyping platform/protective case.  The boards will mount inside so they are secure. All 4 sides are open so I can run wires in and out with no problems. On the very top I think I am going to mount the solderless breadboard.
  The top cover comes off by removing the 4 top nuts.   Maybe make it even easier by using wing-nuts or even barrel-nuts if I can find them. The whole thing measures 8x9 inches and the opening is a generous 2" inches. Enough room for the raspberry pi, an Arduino mega 2560 and a relay board or motor controller.. Can even stack my pi face or Gert board.