PDA

View Full Version : Using an Arduino for quick interfacing



richards
12-05-2011, 10:08 AM
The Arduino Uno R3 is available from Radio Shack for $35.00

For those who don't know what an Arduino Uno is, just Google "Arduino Uno" and you'll see hundreds of projects that use the Atmel ATmax328 microprocessor that is incorporated into the Arduino.

A very practical use of the Arduino would be to interface proximity sensors. You could use NPN, PNP, Normally Open, Normally Closed, Normally On, or Normally OFF sensors and with a few lines of code, make the signals from the sensors match the expected input on your Shopbot.

Another use would be to add your own air drill. All the Shopbot would have to do is to position the air drill and then send out a "On" signal to the Arduino. The Arduino would handle the entire operation of extending the air cylinder, sensing the Up/Down position of the drill, turning the drill On/Off and then sending a "Finished" signal to the Shopbot.

I use the white "no solder" prototype boards to test a design. Those prototype boards let me use 22 gauge solid wire to quickly test a design. After the design has been tested, I use a prototype "shield" to hard-wire the design. Several shields are available, one costs only $17.00.

The basic advantage of using an Arduino is that the Arduino was designed to "makers", not for engineers. The programming software is free and it works with Windows or with Apple computers (it also works with Linux, but you might have to do some "tinkering"). The software and the hardware are all "Open Source", so there are no licensing fees. There are on-line examples of both software and hardware that lets even the most inexperienced "maker", make a project work.

If you've ever wished that you could find an easy way to add capability to your Shopbot, the Arduino Uno may be just what you're looking for.

dana_swift
12-05-2011, 11:56 AM
Arduinos are the rage in the electronics world, I can see anyone familiar with electronics using Arduinos to extend the capability of the shopbot.

It also requires using the TTL DI/DO interfaces on the shopbot control board so commands can be sent and to the Arduino. The way the Shopbot control language is set up that may be awkward from the software side.

The future of custom hardware is quite interesting, Microsoft and Apple both make direct access to hardware extremely difficult. Arduinos turn that all around.

Its a refreshing change, and will be interesting to see how it gets employed in the bot community.

D

ironsides
12-05-2011, 01:01 PM
I looked it (Arduino) up on Google and Wikipedia, knowing nothing about electronics, I'll wait until ShopBot incorporates this technology into their products.

George

ssflyer
12-05-2011, 03:35 PM
Another option that has been around a long time, is the Basic Stamp. (http://www.parallax.com/tabid/295/Default.aspx) Since it is programmed in BASIC, it may be a little easier for those not versed in C/C++ type languages.

richards
12-13-2011, 02:10 AM
I've received several emails from Shopbotters who asked WHY use an auxiliary microcomputer when the Shopbot has so many I/O pins. That's a very good question.

A Shopbot has the capability to let the user easily interface electronic parts and pieces to extend the usefulness of the machine. However, (there is always a "however"), some things benefit from using a microcomputer.

Let's look at an auxiliary drill as an example:

If you use a microcomputer (Arduino, or similar), you only have to use two input pins and two output pins on your Shopbot controller.

INPUTS:
1. Drill is in the up position
2. Drill is in the down position and the drill is running.

OUTPUT:
1. Lower the drill (and turn on the drill's motor)
2. Raise the drill (and turn off the drill's motor)

The Shopbot doesn't have to use additional I/O to sense the position of the drill, or the speed of the drill. It doesn't have to worry about interfacing to a 24VDC proximity sensor or a 120VAC drill motor, or a 12VDC pneumatic valve. It "offloads" those responsibilities to the microcomputer.

The designer (YOU), gets total flexibility in selecting all components and the proper operation. When the auxiliary drill is powered on, the microcomputer would output a "drill up" signal when the air-valve or stepper or servo had raised the drill to the Up position and the Up Sensor had been detected. When the Shopbot issued a "Down" command, the microcomputer would actuate the air-cylinder, the stepper or the servo to lower the drill. It would turn on the drill motor. It could read a tachometer to determine when the drill was at speed. It would detect the Down proximity sensor and then it would signal the Shopbot controller that it was ready to drill. The Shopbot could then drill a series of holes, knowing that the drill was positioned correctly and that the drill motor was running.

You could choose to use proximity sensors or micro-switchs to sense travel limits. You could choose to use an air-cylinder, a stepper motor or a servo motor to move the drill up and down. You could choose to use an air-drill or an electric drill. The choices are almost endless.

If you decide to use steppers or servos, which require finer control than is normally available with the Arduino, you could use AVR Studio and an AVR Dragon board to program individual microcomputers, each of which could handle a portion of the auxiliary drill's operation. AVR Studio is free and the AVR Dragon with a ZIF socket costs about $75.

If you decide to use an air-cylinder, then an ordinary Arduino (for $35 from Radio Shack could handle the job (along with some G4 modules from Opto-22: Outputs to drive the actual air valve and the AC drill. Inputs to accept signals from the proximity sensors. The G4 modules work off 5-volt I/O signals, so they work well with microcomputers.)

The Shopbot software is capable of doing many things. Adding a microcomputer (or two) greatly extends the usefulness of the Shopbot at a minimal cost.

Even if you have never programmed a microcomputer before, you can get started by buying an Arduino Uno from Radio Shack, along with two books, "Getting Started with Arduino" by Massimo Banzi ($15.00) and "Programming Arduino" by Simon Monk ($15.00). The books start at the very beginning and guide you until you're an expert.

(For the more adventurous, you can download AVR Studio and buy an AVR Dragon and ZIF socket. Be prepared to do a lot of reading before writing a workable program and programming a microcomputer to run that program.)

br928
12-13-2011, 03:51 PM
I got started with Arduino when I read Gene Buckle's post about his collimated display for flight simulation. He used one to control the vacuum behind his "mirror".

I have built two quadcopters from DIYDrones that use the Arduino platform with additional sensors mounted on a daughter board or shield as they call it. My first one used an Arduino UNO and the sensors include 3 axis gyro, 3 axis accelerometer and magnetometer. My second one used a larger Arduino processor and added barometric pressure, sonar and GPS. The quadcopters are capable of flying fully-autonomous. If this little processor can read all theses inputs and make these totally un-airworthy contraptions fly.....controlling some auxillary ShopBot functions would fairly simple.
Just to tie this into ShopBot, all the frame components were designed and cut on my ShopBot.

I have since built another project using a $35 Arduino UNO from Radio Shack. This was a remote controlled speed controller for a dog lure motor. For those who don't know what dog lure racing is...I didn't either two months ago.

The Arduino is a very inexpensive but powerful platform. Writing the software can be a challenge. Based on C++ it is not near as intuitive as basic.

Another good book is the "Arduino Cookbook".

Brady Watson
12-13-2011, 06:09 PM
Been eyeing one of them there drones for a while now...Yours looks nice, Stan. Have you done any aerial photography with them? Results?

I've got a use for one to do some aerial pics and as a deer chaser...

-B

br928
12-13-2011, 06:37 PM
Maybe we need to start a new thread on this subject and not hijack Mike's.

I built the quads with the intent of aerial photography and first person view (FPV). That is flying the craft as if you were in it by transmitting video back to the pilot.

We have done some prototype aerial photography at a local race track and all the drivers loved it.

I have built a camera stabilazation platform for a GoPro that eliminates the roll and pitch of the copter. Best thing is you just plug in the servos and it is functional. All the software is already there.

This mount just bolts under the quad. All the parts were cut on the Bot naturally.