Monday, February 25, 2013

New Source for Cheap Parts?

Ok. I just found a great website online and had to tell people about it. I have never ordered from there but I no doubt will soon. http://yourduino.com. They have all kinds of cheap started kits and stuff I've been ordering from eBay for about the same prices.

They also have several Arduino Compatible micro controllers that I would look into. Some have built in servo connections and such. If I hadn't just ordered some stuff from elsewhere, I would probably be buying something from there.

Things that caught my eye:

  • Their shields (the motor controller shield)
  • Their micro controllers (YourDuinoRobo1- $17)
  • The pre-made drive platform
  • The cheap stepper motors
  • The various sensors
  • The starter kits.
  • The jumpers, resistors, etc.
Some of the starter kits actually looked pretty good. I didn't look too in depth. I'm sure some stuff is missing, but it might not be a bad place to start. The robot platform doesn't look to shabby either. I didn't check shipping on the heavier stuff, but some of you might want to look into it.

I realize this is a bit out of the blue, but I honestly am not affiliated with them in any way. I just stumbled across their site when looking for cheap stepper motors and then saw the micro controllers  Then I saw the shields. Then I starting going through practically every page.

That's all I have for today If anyone has bought stuff from there please comment. I would personally love to know what kind of service they provide. 

See you later,
Matthew

Friday, February 22, 2013

Death of an Arduino

Well I said I would tell you about killing my Arduino. So here is the long and short of it.

I decided one night that I had a bit of free time that I would take a break from reading about string theory to mess around with my Arduino. Well looking back at this, this was probably a poor choice.

As I was plugging in the USB cable, the cable that powers the Arduino (from the 8.4V battery) fell over onto the board. The switch was turned off meaning that rather than the switch being connected to the nice insulated cable, it was connected to the open pin. I'm pretty sure I never insulated that tab because.. well because I'm rather stupid.

So, the tab touches the grounded USB socket (the negative wire was not switched). Big spark. Magic smoke escapes. I cried. Nasty smell in my room for an hour or two.

That's how it met its end. Frankly, I'm surprised it survived this long. With all the wires going every which way and me carrying it around and such, it lived a good life. And to be fair, it actually is still working. The last sketch I had on it still runs. Its just the USB to serial chip that is burnt out.

Maybe someday I will look into doing something with it. In the meantime I ordered a new one. I'm certainly glad that I didn't fry a $50 "real" Arduino. Say what you want about buying from China, but if it weren't for the cheap parts from China I would not be doing the stuff I am doing. Granted, I'm not forging any new ground in a research field, but this is part of my education. One day I hope to be a productive, tax-paying (novel idea) citizen. Maybe then I will buy "real" Arduinos.

HobbyKing was out of stock so I ordered one from a US seller on Ebay. $21 shipped. It said genuine, made in Italy, Arduino Mega 2560 R3. I have no doubt that they were lying. If you want a picture of it I'll probably post one when I swap it out on my robot. For now I'm doing some other stuff with my LCD shield and such. It seemed neglected.

Well that's how it happened. Its my fault. I wired the the switch such that there was an open tab and then didn't insulate it (or maybe it just fell off. Either way, my fault). Oh well. Stuff happens. I hope it never happens to you, but if it does, persevere. Find a good friend to talk to. You can find closure.

More on this subject, I referenced this article several times when I was first doing stuff with the Arduino. They are trying to sell their own product, but who can blame them. Its a good read. Interesting stuff on how to kill an Arduino.

Well that's all I have for now. I feel bad for not having any pictures so I found this nice picture to add some color. Its the logo for FIRST Robotics, a program I did in high school. The next few weeks will be pretty exciting in that realm so if you have time, do a quick Google search. Include Ultimate Ascent in the search. Now I'm getting off topic.

See you soon,
Matthew

Monday, February 18, 2013

Differential Steer Robot: Wiring

Greetings once again. I said I would post some more details about wiring up the robot. Well this shouldn't take to long so here it goes.

The first place I started was the servos. Like I said last time, these are continuous rotation servos (now that I've modified them). They have three wires. Depending on what brand of servos you have, they will be different colors, I'll assume you have Futaba servos like me, but if you don't its not too hard to figure out.



  • Red: Power. These servos like 4.8-6V. These are based off of the nominal voltage for NiMh (or Ni-Cd)  batteries. So a 5 cell works fine even though its actually higher than that hot off the charger. Don't try to run them directly off the Arduino. 40mA per pin isn't a lot.
  • Black: Ground. This goes to the negative side of the battery. One important note. You must tie the negative side of the battery back into the GND port on the Arduino board. You will beat your head against the wall until you do this. I know this from experience..
  • White: Signal. This wire will go to a PWM enabled digital IO pin. By using the built in servo library you can transmit PWM signals to the servos. Different pulse widths correspond to different angles. The servo will attempt to turn to that position. This is how our servos work. We have disabled the potentiometer so that no matter how much the servo turns, it never thinks it has reached its destination. Some people claim that servos actually run on PPM. I don't really know which is correct, and it hasn't been worth my time to figure it out. The servo library works. If you want to see the servo wave form, Google it.
So I used my extensions to connect my servos so I could leave my servos mostly intact. White went to one of my PWM pins. Then I connected Red to the positive rail on my breadboard. Black went to the negative rail. I connected my 6V battery to the same rails. Then I tried it out! It jittered around and didn't work. After several hours of frustration I realized my stupidity. You MUST wire in a common ground. ie, connect your ground rail on the breadboard to the GND pin on the Arduino. I knew this but forgot and wasted lots of time chasing a problem that should have never existed. Anyway, the picture to the right should clarify if you're confused as to what colors are equivalent.

A quick note, I have been experiencing some odd fluctuations in my servos. A servo will stop until I tap it.Then it will come back on. I have not yet had time to track down the root of these problems. I believe it is a flaky connector somewhere. I have also considered that I need to filter some noise on them. If you know how to do this and wish to, then go ahead. At the moment, I have bigger fish to fry. I doubt that this is the problem anyway.

Ok. Servos are wired. The Arduino itself is much easier. Get a connector and solder it on as dictated HERE.  I scavenged one off of a old power supply, but if you find a good source for these cheap, feel free to email me or post in comments.

Now the ultra sonic sensors. These are pretty straightforward as well. Wire them as written on the board. I use the sensor shield and my female jumpers. Power (5V. Arduino power, not servo battery). Ground. One IO pin to trigger signal. One IO pin to listen for response.

That's about it. I also have the other rail of my breadboard wired in to 5V. This gives me a 6V rail for servos, LEDs and other high current draw stuff and a 5V rail for logic stuff. Be sure to tie all the grounds everywhere together.

That's about it for today I think. I had planned to begin with videos of object avoidance after this, but I have been met with a bit of a tragedy. I'll talk more about that later. Lets just say, stuff happens. Its not a bad idea to have an extra $20 Arduino sitting around. I may try to work around that. We'll have to see. I've got some tests early this week, but maybe towards the end I'll have time to write again. I will say this, I have gotten some ATtinys and am pretty excited about playing with them. Unfortunately they are at the end of a long list of things to do (including type this post).

With that, I think I shall end. If you have any questions, comments, rants, praises, or large sums of money for to give me, post in the comments or send me an email. If not, just follow so as not to miss out on the latest exciting installment! 

Until later,
Matthew

Saturday, February 9, 2013

Differential Steer Robot: Overview

     Greetings. Its been a while. For that I apologize. Today I decided to take a break from Calculus to type up a new post. So here it is! Anyway, you may have been wondering, "What could he have done with that Arduino?" Well I did something no other person in the world has ever done. Guinness is on his way. I made a differential steer robot. I know. One of a kind. No one else has ever thought of that. And there it is!

     Actually, that is not what it currently looks like. That is what it looked like a month or so ago. It now is sporting 5 more sensors and a real time clock module, but that will come later.

     So what are we looking at? Well its pretty simple really. In the middle we have the Arduino Mega previously mentioned. It is wearing the v4 sensor shield.

     To the left of the Arduino is a solderless breadboard. I got mine off of ebay and I haven't seen one cheaper anywhere else. Mine was called "Mini Solderless Breadboard Bread Board 400 Contacts Available Test Develop DIY." Really, just make it has the rails on the side. This one was $3.22. Radio Shack is more than that, but China takes a while. I just order in advance

     Above and below the breadboard we have two ultra sonic range finders (pictured on the left). Now you can buy these for $30ish at places like robotshop, but these two came from ebay as well. HC-SR04, they cost about $2 each. Mine worked flawlessly. They are a great introduction to thinking like a computer. They work like sonar and are pretty good. They don't like angles all that much, but this is a learning  process. We'll move on to the $2000 LIDAR module later (as soon as a reader buys me one).



     To the right of the Arduino we have the batteries. Now these batteries are pretty up for grabs. I used what I had. They are pictured to the right. The big one is a 7 cell NiMh battery made to go in a Traxxas Stampede RC Truck. It is powering the Arduino. Needless to say, it will power it for a long time. It provides 8.4V to the Arduino voltage regulator. I also put a switch in the circuit because that makes things much more convenient. I ordered these switches as well as some limit switches(and LEDs, etc) I used later from Pololu.com. I think they were 50 cents or something. Since then I have discovered BGmicro.com which also has cheap stuff, but I have never ordered from there and am getting off topic.
     The one below the large battery is a 5 cell NiMh that powers the servo motors. Long story short, the Arduino can't provide enough power through a digital IO pin to power them so we wire in external power through the breadboard. Hobby servos like 4.8v or 6.0v (nominal) so this is perfect. The battery is one I got from Hobbypartz.com. Its a China importer based in California( I think). Shipping is faster than China. The connectors are Deans (T-connectors) and Traxxas connectors from Hobbyking. Connectors like that are one of the things you have to buy from there. I've found that even if I only use 2 or 3 of them, I'll break even with the hobby shop. Find Deans HERE, Traxxas HERE. If you are using dedicated batteries for this project feel free to use whatever connector you want. Tamiya, EC3, XT60, etc. But I will say that Deans are easy to solder. If you want, you could even use rechargeable AA batteries. I already had these and the charger from my previous rc plane endeavors so this is what I used. I kept the Traxxas connectors so the big battery will still fit in the truck.

     Below deck is a set of fps-148 Futaba servos modified for continuous rotation. How to do this? I used instructions HERE. Its a 60 second procedure. Google search it. I also had these servos sitting around. If I had to buy everything I would probably go with servos from HobbyKing. I've used some of the HXT servos before for planes, and they work well. I'd go with THESE most likely, but do what you wish. I haven't researched it all that extensively. You want something with a futaba spline if you are going to use the wheels I did.

     Speaking of which.. The wheels came from Pololu as well. I got the ones found HERE. They screw on just like a servo horn. Easy as can be. While I'm at it, the front ball caster also came from there. I got the .75" version found HERE. Alternatively you could search for ball transfers on a site like McMaster-Carr.


      The white thing on the side is just part of an old computer I put on there for its switches and LEDs. We'll get into that later.

     Assembly is quite straight forward. Wood glue, hot glue, and some machine screws. My total dimensions are 8" x 11". The ultra sonic sensors are mounted on a little block that cradles it (mine is balsa because it was easy to shape) and a tab that rotates.
    The Arduino is held on with some little dowel rods that I made to fit the holes and a few metal standoffs. If you use metal standoffs, be sure to put some sort of insulator between the metal and the board. I used homemade washers made from a cereal box.


Other things you'll want:

  • female-->female jumpers. Get these on ebay. Search for dupont connectors. 40pcs for $3.
  • jumper wire: any 22 awg solid wire will do.
  • Resistors: again, I like ebay. I got 400 metal film resistors in assorted sizes for < $5.
  • *optional* THESE. They make connecting the servos more tidy.
  • Other stuff: Electrical tape, heat shrink, etc. 
  • Basic Tools: Soldering Iron, Wire Strippers, Digital Multimeter (Must have some variation of all these things. You just do.)
  • X-Acto Knife: These are dirt cheap at hobbyking. 50 cents. I have many of THESE. And extra blades HERE.

 
     Ok. Well this post is getting pretty long so I better wrap it up. I hope this has inspired you to greatness. If you have any questions, comment or send me an email. I would encourage you to check out Jeremy Blum's YouTube channel too(HERE). He has some great tutorials for Arduino and knows much more about electronics than I do. I have learned a lot from his videos.

     If you want to go ahead and stock up for the future, order some IR LEDs, IR photodiodes, and 2.54mm male headers from Ebay and some of THESE too. Next post I 'll try to get into more details of wiring this thing up. I'll start throwing out some free code soon too. See you later!

Have Fun!
Matthew