Tag: arduino

RFID and Heat Detector Arduino Project

Posted by Ril3y on February 17, 2010 | No comments

I know everyone has done this before.  RFID and arduino that is.  But looking at the example code it looks like the antenna is always in receive mode.  I am not sure how this affects the life of the chip / reader but I thought of adding a way to detect human presence before activating the receiver.

I found some little IR heat detector (HERE: http://www.allelectronics.com/make-a-store/item/IRD-10/INFRARED-DETECTOR-MODULE/-/1.html and tossed together some analog read code and viola.  Now when the IR detector detects over a certain variable heat temp it activates the RFID reader.

Google Buzz

Tags: , , ,

The Robot Arm is Working!

Posted by rmadams on February 14, 2010 | 2 comments
Picture of the complete robot arm with controller

Complete Robot Arm

One marathon hacking session later, and the robot arm is complete and functional. Thanks to a whole uninterrupted stretch of time, I was able to complete the assembly of the arm- including the most problematic part, the gripper. It is so problematic that Ril3y and I are quickly fabbing up a replacement that will be much more flexible, robust, and easier to assemble. For now, though, the robot structural framework is complete, and matches the photos that have been posted by the Oomlaut Labs guys. Of course, my arm is in the cool, racy red color, which is very nice.

Complementing the hardware, I took a few bits and pieces of software discovered on the net, and mashed it together into a manual control program for the Arduino board and the Pololu motor control board. The code is really messy, and all in Wiring, so not very elegant or compact. But it is pretty clear and easy to understand- nothing hidden, and should work on every Arduino variant. By using a readily-available Playstation PS1 controller, the interface is both familiar and cheap!

Basically, I mapped each pair of buttons to the motor axes, and hard-wired in reasonable limits, to make it harder to completely crash the machine. I also set up the “select” button to change the speed. It works great, and as you can see from the video, you can pick up and drop things with ease.


Next steps are:

1) Get the documentation completed so others can build them too, easily, if desired. Post the programs, such as they are for the same reason.


2) Add a “learning mode” using the “Start” button and L1/L2 to allow the user to program a series of way-points and then play them back. I may add a little EEPROM memory, too, for non-volatile storage of the programs. I have room on the breadboard and pins to spare.

4) Work with Ril3y to design and integrate a better gripper. As mentioned above, the one currently implemented is suboptimal.

5) Develop the framework for the kinematics programming. This will (at least at first) probably be hosted in Processing, to simplify development. There are a number of existing Open Source kinematics packages for 5DOF arms, so I am hoping to leverage (read steal) an existing one and work from that.

6) Redesign the arm to use high-torque and fine-grained stepper motors instead of the servos. This will require some position feedback. Both of these goals will nicely match what Ril3y and Alden are doing in the motion control space. Hopefully, the arm will evolve into a simple test-bed for those concepts.

Lots of fun- and a great, great weekend!

Google Buzz

Tags: , , ,

Progress on the Robot Arm!

Posted by rmadams on January 31, 2010 | 2 comments


A picture of the open source robot arm, first joint  assembled with servos

First joint of the Open Source Robot Arm


Thanks to the Hong Kong Parcel Post, I got my metal-gear servomotors last week, and then thanks to work commitments, they had to sit taunting me on my workbench the whole week. Luckily, I had a chance to do some assembly work this weekend, and got a couple of the major subassemblies put together. As you could see from the earlier post, I had the base assembled, and it was short work to put the base rotation servomotor in place.

You have to make sure that when you assemble the deck, you put the servo in so that it is at the center of its rotation when the arm is facing forward. Once that was done it was short work to get the deck put on. I went ahead and clipped the little screws that hold the servo horn on short, so they won’t rub on the acrylic frame and scratch it. I also added a trio of modified furniture casters to provide a bearing surface for the rotating platform. The oomlaut guys used M8 screws with acorn nuts, but that would also scratch up my beautiful red acrylic, so I chose to go another way. If you look at the flickr set, you can see how I did it. I had to trim them a bit to allow for the small M3 nuts on the bottom of the platform to have sufficient clearance.

You can see that the first joint of the arm is supported by two servos- note that in order to make the parts fit without undue stress on the lasercut plastic, I put one servo inside and one outside the mounts. I also had to make sure that the motors were both turned to the same degree of rotation before mounting them. The way I mounted them, the first joint can swing from fully to the back of the platform all the way to fully front. This should be perfect, and maximize the reach of the arm.

Assembling the second joint turned out to be much more problematic, and necessitated several tear-downs and re-assemblies. As far as I can tell from the (albeit sparse) pictures on the oomlaut website, it appears that the motors are mounted on the outside of the arm assembly, but as far as I can tell, this will not fit without really bending the lasercut frame. I don’t want to do this as I do not want to break the plastic, but I am at a loss about what to do. I am planning on sleeping on it, and ordering a couple of the motors that the oomlaut guys suggest and see if they fit better. According to the specs posted on the motor source website, they are exactly the same size as the ones that I have now, so I am kind of puzzled.

Next up- second arms joint, gripper (which is its own puzzle, to be sure) and the control mechanism. (Yes, I am still hacking around with my old Playstation2 controller!)

Google Buzz

Tags: , , ,

1Wire Real Time Clock With Arduino

Posted by Ril3y on January 20, 2010 | One comment

So I ordered a 1-Wire RTC (real time clock) from the maxim corporation.  To be exact its a ds1904.  What is really cool about the 1-Wire protocol is it only needs 1 wire to send data on.  It is a bit misleading however since it does need a ground as well.  You really need to read the data sheet on these guys to understand fully how they work.  But in the mean time basically one button gets to talk at a time.  Every button has a unique serial number which is kind of a cool feature in it self.  Since its in a steel “can” its really rugged so you could place it on say a card, keychain etc?  It would be cool to use as a key FOB to get into my workshop.  However no time for a new project at the moment.  The reason I am messing with this stuff is I had to take a break from the project I have been working on for work.  Call it a mind break.

I created a DIY (with a laser cutter that is) OneWire button mount as you can see it just holds 2 wires against the top and bottom of the steel can.  Pretty simple.  Not really useful as an end solution but good for testing.

DSC_5387.JPG



Anyhow there is a nice Arduino lib for the 1-wire stuff here.  Just extract this to your arduinoxxx/hardware/lib/OneWire folder.


This is the source code that I used and edited to get the RTC DS1904 working.  Note that you need to uncomment the //write Section upload it to the board let it run then re-comment it and upload it again.  Otherwise the oscillators will not turn on and it does not “count seconds” or more to the point at as a normal clock.

This is the source code that I used and edited to get the RTC DS1904 working.  Note that you need to uncomment the //write Section upload it to the board let it run then re-comment it and upload it again.  Otherwise the oscillators will not turn on and it does not “count seconds” or more to the point at as a normal clock.


#include 
 
// DS1904 Real Time Clock iButton I/O
OneWire ds(10);  // on pin 10
 
void setup(void) {
  Serial.begin(9600);
}
 
void loop(void) {
  byte i;
  byte present = 0;
  byte data[8];
  byte addr[8];
 
  if ( !ds.search(addr)) {
      Serial.print("No more addresses found.\n");
      ds.reset_search();
      delay(500);  // for readability
      return;
  }
 
  Serial.print("ROM: ");
  for( i = 0; i < 8; i++) {
    Serial.print(addr[i], HEX);
    Serial.print(" ");
  }
 
  if ( OneWire::crc8( addr, 7) != addr[7]) {
      Serial.print("CRC is not valid!\n");
      return;
  }
 
  if ( addr[0] != 0x24) {
      Serial.print("\t\tDevice is not a DS1904 family device.\n");
      return;
  }
 
/*
  // write!
  Serial.println("writing to RTC...");
  present = ds.reset();
  ds.select(addr);
  ds.write(0x99,1);   // write RTC - this is the write code
  ds.write(0xAC);  //This is the control byte.  AC in hex = 10101100
                   //read the datasheet and you will see that this is important
                   //to start the internal osc's... Or to make the clock start
                   //counting seconds.  --ril3y
  ds.write(0x02);  //0x02 is a random time set it with your own
  ds.write(0x03);  //same with this
  ds.write(0x05);  //this
  ds.write(0x08);  //and this
  present = ds.reset();
  delay(1500);     // unknown if wait needed
*/
 
  // read!
  present = ds.reset();
  ds.select(addr);
  ds.write(0x66,1);   // read RTC
 
  Serial.print("PR: ");
  Serial.print(present, HEX);
  for ( i = 0; i < 5; i++) {
    data[i] = ds.read();
  }
  Serial.print(" CTRL BYTE:  ");
  Serial.print(data[0], BIN);
  Serial.print("\n\ttime:  ");
  for ( i = 1; i < 5; i++) {
    Serial.print(data[i], HEX);
    Serial.print(" ");
  }
 
  Serial.println();
 
}

Note that I did not write most of this code. You can see the original thread here:  This should be enough to get you starting using a 1Wire RTC.  Enjoy!

Google Buzz

Tags: , , , , ,

Arduino Boot Loader Party….

Posted by Ril3y on January 8, 2010 | No comments

Well I was the only one there….  BUT! I did have a few different ATMEGA’s guests.  I had purchased about 10x  ATMEGA168V’s and 5x ATMEGA168P’s both in the SMD packages for some upcoming projects.  My goal was to get a TQFP (which is just the name of the chip foot print or size if you will) socket hook it up to the SPI programming ports that ATMEL uses to flash their chips and then burn the Arduino Boot loader on to them.  Well this turned out to be harder than I though.

First, the wayyyy too cheap TQFP Socket Breakout Board $25 actually when most are around $150 – $200 was too good to be true.  I assumed and did not RTFM (google if it you dont know that one) that it had a standard male breadboard socket headers on the bottom to “breakout” the pins.  It actually had this:

Mystery Connector HELP! So after realizing that my whole “good idea” of removing the 6 pin headers needed to flash and arduino bootloader off of any future design and just use the “breakout board” to quickly flash these guys was starting to seem like it was not going to work.  After about 4 hours of searching for the counterpart of this connector I gave up and got crazy.  I went ahead and desoldered the whole enclosure popped it off solder 6 wires to the right corresponding pins needed to flash the AVR’s.  I needed this to be done quickly as I had a project that’s deadline is approaching so I had to breadboard

Arduino Boot Loader PARTY!

this design rather than make a nice custom eagle footprint for this part and do a DIY PCB via the Laser.

This is where the real trouble started.  I thought I had bought all ATMEGAxx8P’s when in reality I had bought ATMEGA168V’s.  So my trouble was through the arduino IDE I had selected to flash these chips with the Arduino mini pro as the board selected.  All this means is through the IDE the mini pro has the smd atmega168p chip which is what you would have wanted if you had the right chip.

Issuing the avrdude -c tinyisp -p m168 told me that everything was good.  So then I proceeded to select Burn Boot Loader through the Arduino IDE.  This failed and now I was no longer able to talk to these chips.  After reading more I realized they were ATMEGA168V’s which is the same chip the lillypad uses.  I selected that board on a new chip burned the bootloader and now its all working.  However I did “screw up” about 6 other chips.

I posted a question on chiphackers to see if anyone could help me out.  It turns out that the Arduino IDE seems to have changed the fuses on the chip to need an external oscillator.  This is ok if the hex file that the arduino was trying to burn was the right one.  Which it was not as I described above.  So I am in the process now of trying to fix these “screwed up chips”  by adding an oscillator to the xtal pins and then trying to burn them again with the right bootloader.  I will update with more info when I know its fixed.  Here is some more pics of the process.


Arduino Boot Loader PARTY! DSC_5281.JPG DSC_5283.JPG


Google Buzz

Tags: , , ,

Magnetic Linear Encoder – and it works :)

Posted by Ril3y on December 9, 2009 | 6 comments

For awhile now I have been meaning to try to find a way to close the stepper motor “loop” on CNC devices.  What started as an need / idea turned into reality last night.  A few weeks back cruising thingiverse.com I found a post where Zach had created a magnetic linear encoder.  However his design was off and needed fixing.   Instead of re-inventing the wheel with a different linear magnetic chip I decided to use the same setup as Zach.  I contacted him about fixing the problem with the board (the footprint was off) and in about 3 hours after emailing him he had it fixed.

I have blogged about laser etching PCB’s in the past (you can read about it here).  The inherit problem with laser etching PCB’s is that is it very hard to get aligned if its a double sided board.  So I modified Zach’s design to be a single sided board.  Its tight in some spots but if you use the solder mask I created and have a somewhat steady hand its doable.  Here are some pictures of the process and a video of it working!

The AS5306 can be found here:
http://www.austriamicrosystems.com/eng/Products/Magnetic-Encoders/Linear-Encoders/AS5306

Thingiverse entry and files here:
http://www.thingiverse.com/thing:1409


DSC_4915.JPG

DSC_4917.JPG


DSC_4921.JPG

DSC_4925.JPG

DSC_4928.JPG

DSC_4926.JPG

DSC_4932.JPG

Single Sided Linear Encoder

DSC_4937.JPG

DSC_4939.JPG

Linear encoder video




Google Buzz

Tags: , , , , , ,

Mini-CNC Progress

Posted by Ril3y on November 30, 2009 | One comment

The progress of my Mini-CNC build is going along great.  I finished my X Table axis this last holiday weekend.  Here is a video of the newest working section of my CNC running a stepper test program from the arduino.

DSC_4780.JPG

I placed a 35Lbs weight on the table to get  a feel for how sturdy the table was.  The platform is made from two 1/8th” hardboard (masonite) pieces screwed together.  You can view the video below to see it moving the weight np.  The stepper motor  used is a NEMA 23 Alltronics stepper.  I am driving the stepper from the older 1.2V Reprap driver board.  I had built these boards a long time ago and have not had the chance to get the newer (cheaper / better) models.  I currently am waiting for the reprap stepper driver v3 board to become a reality.  This board support microstepping also!  Which should make the accuracy of the Mini-CNC even more accurate while suppressing vibrations throughout.

I still need to finish the Y and Z axis.  This I am hoping show go much faster not that I have the basic idea in what is required for the linear motion using steel tubes to progress.  I am hoping for this week to at least finish 1 axis.  In a perfect work I would get both done.  However I have a work project that is going to need my attention to get together pretty quickly.  So we will see.  I will make updates as I make progress.  Check my flickr photostream for more frequent updates.



Google Buzz

Tags: , , , , , , , ,

OpenWRT + Router Station Pro + Arduino = Fun

Posted by Ril3y on September 30, 2009 | No comments

Around 11PM last night I finally was able to get all the Arduino Hardware talking to my Openwrt Router Station Pro Installation.  These are the packages you need to have on your system.  (if you built your own firmware with theses great! otherwise just opkg install them)

Like So:

root@OpenWrt:~# opgk install usbutils

Install the rest of these packages the exact same way:

  • usb-ohci
  • kmod-usb-serial-ftdi
  • kmod-usb2
  • kmod-usb-serial(Note: these packages are needed if you want to us the MMC/SD Card on the RS PRO)
  • kmod-usb-storage
  • kmod-mmc

Once that is done you can issue the lsusb command to see if your system recognizes the Arduino FTDI interface.  You should see something like this.

Bus 002 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 05e3:0723 Genesys Logic, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

If you do not see the UART (FTDI) device go ahead and reboot your system and it should come up.  If it does not you are missing a package email me we can see whats up.

Will add more later but here some screenshots of the system working.

DSC_4002

Google Buzz

Tags: , , , , , ,

Powered by Wordpress and Stripes Theme Entries (RSS) | Comments (RSS)

Bad Behavior has blocked 104 access attempts in the last 7 days.