Google+
Showing posts with label with. Show all posts
Showing posts with label with. Show all posts

Monday, 23 June 2014

Program your Arduino with an Android device!

Hi,
in this Instructable I want to show you, how you can program your Arduino with your Android device. It is very simple and cheap. Also it allows us to program our Arduino where ever we want, this is usefull for permanently installed Arduino boards, like in light controllers...
So lets get started! :)


Step 1: Materials and Tools

Materials:
A USB-Host cable (OTG cable) ( http://www.amazon.de/USB-OTG-Adapterkabel-Adapter-... )
An Arduino( http://de.farnell.com/ )
1 LED (for testing)
A Android device with Android 4.0.0+ (or with host aviability)
Software:
ArduinoDroid or
ArduinoCommander from the Google Play store

Step 2: The USB-Host cable

Such a USB-Host cable is basicaly just a USB cable, but just with a few changed resistors in the mikro USB plug. The internal resistors let the Android device activate the USB-Host mode, in this mode you can also use USB-Sticks or other usb applications on the device. That is very useful, now you could plug a usb-printer in.
The problem is now, that every USB device which you plug in, will now run on the energy of your device, what realy can bring the akku down.

Step 3: Connections

This step is very simple and doesn´t require much text. Just plug the USB-A to USB-B cable into the female USB of the Host cable. Then plug the USB-B plug into the Arduino and the Mikro USB into the Android device.

Step 4: Arduino power up

Now it should look like the connections on the picture. Also your Arduino should now power up and load the last code you uploaded. On my Arduino was the Blink sketch. If it doesn´t power up, check connections.

Step 5: The apps

Now your Arduino is ready to get coded, but your Android device isnt...
Lets change that!
Currently there are 2 apps which allow us to work with our Arduino via the Host mode.
To get them we have to go to the Play Store, then type into the search bar "Arduino". Now tap on "Apps", now there should be only apps. We want the apps "ArduinoDroid" and "ArduinoCommander". Install them and launch "ArduinoDroid", it has to update the IDE, that will need some time. "ArduinoCommander" should be ready sofortly.
Note: We dont need both apps, i just want to show you both! :)

Step 6: ArduinoCommander by Anton Smirnov

Okay, the first app I want to show you is "ArduinoCommander". It is by Anton Smirnov and is for Andorid 2.2 or higher.
This app is for working with the Arduino on an Android device, you can change pins easy (directly set pins hight or low), upload sketches or read analog pins with a oscilloscope mode.
The app is easy to understand, even if the controlls are unusual. It finds the Arduino automatical and doesnt crash.
But sadly some of the functions didnt work when i tried to use them, hopefully that get fixed. Uploading a sketch worked very good!
So I would give this app 4.0 out of 5 stars :)
I want to show you short how you can connect to the Arduino:

Step 7: Step 1

First we have to start the app, now a blue window wih 4 options should appear. As we want to connect via USB we tap on "USB-Device" (on the picture in german :) ).
Other options are:
Ethernet
Bluetooth
USB-extras

Step 8: Step 2

Now tap on "Autodetect", the Android device will now scann for Arduino(s) nad show them on the screen. We will pic our Arduino ( just tap on it ).

Step 9: Step 3

After we did that the app will now show us our Arduino as a drawn animation. Normally it is colored and you can tap the pins, to change their mode. This didnt work for me, sadly i couldnt fix it for me, maybe it works for you. when you tap in the down right corner you get to the menu, where you can upload sketches from your SD-card, what works very well.

Step 10: ArduinoDroid

Now the seccond app, which allows us to upload sketches to our Arduino. This app is called "ArduinoDroid" and is for Android 4.2.2 or higher. It is also by Anton Smirnov!
This app is an IDE, a compiler and an uploader for Arduino, it also uses the host mode to upload sketches, which you can write directly in the app.
After you wrote a code, you can compile it with the "Lightning-Button", that needs some time, but works good.
when its compiled you can press the upload button (the to the right).
The upload should take only secconds.
After that my Arduino started the new code --> It worked very good!
For testing I used the "Blink" sketch.
Why am i talking?! here is a short video of the app compiling and uploading a sketch:

Step 11: Finishing!

As you just saw, it is very easy to write, compile and upload a sketch to an Arduino with an Android device.
And here a big THANK YOU to Anton Smirnov who created the apps for Android!
Read More


Friday, 30 May 2014

Super Awesome NES Advantage Lamp With Options

Children of the 80's and 90's here it is... one of the most awesome desk lamps you have, and will ever, come across. Introducing... the 1987 NES Advantage Lamp (or as some affectionately called her, "the disadvantage").
I am all about options. So with this build I tried to break up this project into three sections from easiest to hardest. You basically have the non-soldered ending all the way to the potential addition of a USB Charging Port and Push-button on/off switch. What geek wouldn't love this lamp?!
It's with some apprehension I show you my methods for this in that I sell these lamps (and others like them) in my Etsy shop here:https://www.etsy.com/shop/FunEclecticHF

Step 1: What You'll Need...

Items you'll need:
  • NES Advantage Controller (preferably not working...) - Found mine on eBay for about $6.50
  • Thift Store Lamp (for parts) - Average cost at Goodwill is $2.99
  • Phillips Head Screw Driver
  • Electrical Tape and/or Glue
  • Single Pole on/off switch (some thrift store lamps, like the one used here, already come with this)
Optional Items:
  • SP/ST (Short shaft) Non-Momentary Push-button On/Off Switch (Radio Shack) - $2.49 to $3.99
    • I ended up using a short shaft, SPST switch from Home Depot since the rocker switches and other push button ones from Radio Shack didn't work out.
  • USB Cell Phone Charger for the wall - Free to $2 online
  • Electrical Wire
  • Solder and Soldering Iron
  • Pliers
  • Strong Glue (ala E6000 or JB Weld)
  • Dremel Tool with a Cutt Off Wheel
  • Hobby Knife or Box Cutter

Step 2: Careful Demolition...

  1. First you'll need to remove the plate metal bottom from the NES Controller.
    • Remove the bottom rubber feet to access the screws.
  2. Second would be to remove the circuit board from the NES Controller.
    • You may need to use the pliers to break the board out (I originally was going to leave the potentiometers attached for sake of time and laziness, but later had to take them out).
    • Be sure to keep track of the rubber button connections and all the parts for the joystick (except for the actual joy stick).
  3. Now either glue the buttons into place, or if you plan to use some of them for one of the optional steps then replace the rubber button pads and tape the buttons and pads into place.

Step 3: Lamp Parts...

  1. Start by ripping the bottom cloth off of the lamp's base (if it has carpeting). Otherwise remove the screws, or crack the bottom plastic in order to get the bottom off.
    • There may also be a weight that needs to be removed (and used as a doorstop and/or paper weight).
    • Feel free to paint the lamp or make any changes you want (you can see I painted mine).
  2. Take your pliers and unscrew the nut and washer that hold the lamp to the base.
  3. You may need to unhook some wires to get the main lamp part free (be sure to make note of how the wire nuts are and what wires connect where and how).
  4. Once the lamp arm and it's cord are free I took the housing for the joystick (remember I told you to save everything) and drilled a hole for the lamp wires to go though.
    • Depending on the shaft of the lamp arm, you may be able to fit part of it through as well to attach a nut, or bend some of the metal at the bottom of the base, to secure it to the joystick housing.
    • If you can do this then it will be easy to reassemble the controller and your lamp be attached where you want it.
  5. At this point you can rewire the lamp to its original connections (if you haven't already).

Step 4: You are done! (If you are boring and have no sense of adventure...)

Alrighty then! You are done. That was quick and simple... Simply reattach the plate for the bottom of the controller. If your lamp doesn't have an on/off switch already attached to its cord, then grab your single pole on/off switch and follow the instructions for cutting the cord and attaching this switch.

***If you are adventurous... and are thirsty for more... then don't reattach the bottom plate just yet. Continue to the next step (do not pass "GO", do not collect $200 (yet)). :-)

Step 5: Option #1 Cool On/Off Button...

Here's where we separate the men from the boys...
  1. Figure out which button(s) you want as your on/off switch for the lamp.
    • If I were smarter I would have chosen to use the 1-2 selector as the on/off switch, but alas I took the low road and tried using a SPST rocker switch that I mounted under the Start/Select buttons (that didn't work).
      • All Rocker and Push Button on/off switches were too thick/tall so I finally went with one that would replace one of the potentiometers on the original controller with a push button on/off from Home Depot (the truth, not a shameless plug or bribe to win the contest).
  2. Take and cut a small portion of one side of your lamp wire, exposing the wire.
    • Take two small sections of your wire and solder one to one end of the wire and the other wire to the other side.
    • Then solder one wire to one post of your SP/ST, Non-Momentary, Push Button On/Off Switch and solder the other wire to the other post on the switch.
      • Make sure that none of the connections touch each other. This is where I applied some electrical tape to the connections.
  3. Once everything is soldered and connected/mounted then you can reattach the bottom plate.
** Now if you are just a glutton for punishment... then do not reattach the bottom plate and feet. Continue to the next optional step, but you better hurry before you talk yourself out of it!

Step 6: Option #2 Adding a USB Charging Dock...

Wow, if you are still with me up to this point, you are hardcore! For this step you will need the phone USB wall charger. The USB Charger I used was for the US standards. International standards and wiring will probably be different.
  1. You can take a Dremel tool and cut the case off of the USB board.
    • The two posts will more than likely fall off and you will see the solder spots on the circuit board.
    • The other option (and potentially easier one) is to just leave the USB board in its case.
      • This will depend on how your USB charger input appears and its relation to the outlet prongs.
  2. Cut two more additional pieces of wire and solder one to each prong (or solder spot on the board).
  3. Then solder (or wire nut) the ends connected to the UBS board to the connections you made earlier for the on/off switch.
  4. Now the hard part... deciding where you want you charger port to be... and will it fit?
    • Once decided you will measure and mark out the spot and carefully cut that out with a hobby knife and/or Dremel tool.
  5. Glue the charger port to the underneath/inside of the controller and make sure it sets.
    • You'll want to use some strong glue, like JB Weld or E6000 to adhere it in place.
  6. Once the glue has set, be sure to test the lamp using the external switch, the on/off switch (if you wired one) and then the USB charger port.
  7. If everything works fine, then reattach the bottom plate and the rubber feet.
*** Note: I tried wiring the USB Board below the on/off switch. It simply didn't work. I had to wire it to the lamp wire connections. Doing this, the lamp and the USB Charging Port cannot be used at the same time. Honestly, it could be a lot worse. One or both of the extras we've added could just not work, and all this work be for nothing. Turn the lamp on via the push button on/off switch and look at the bright side (pun intended). :-D

Step 7: Let There Be Light! (and closing remarks)

I know what you are thinking... yes, I could have used a 3-wire appliance cable since I have a lamp and a USB charging unit on the same circuit. Honestly though, it's no different if using an outlet extension splitter and plugging in the USB charger and the lamp into it.
Also, the external switch is just so in case the SP/ST switch ever goes out I have a backup that will still operate the lamp. Keep in mind that the external switch will always need to be on so that the USB charging port will work, and the SP/SP switch will effectively be the on/off switch.
Lastly there HAS to be something I could have done with the LEDs, maybe have one of them turn on when the charger port it in use, SOMETHING! At this stage in my life circuit board scare me because of my unfamiliarity with soldering components. Look at it, as this Instructable showed you how to make something cool. It gave you options, but also left room for improvement and is open to constructive criticism (keyword being "constructive").
So there you have it... one of the coolest lamps I have ever made.
Read More


Join Us

//go.ad2up.com/afu.php?id=25365

© Copyright 2012, Design by Lord HTML.