Thursday, March 20, 2014

3D Printer - First Tests and Prints


or YouTube link

3D Printer Build History

I have not been doing a good job at keeping up with posting about the 3D Printer.  I have managed to take a number of pictures which show the progress over the last few months.

Rough hot end holder

Y-slides and precision rods

Y-slide

Belt idlers 

Early Assembly

XY Stage (Holds hot end)

Filament Extruder (Knurled wheel and idler bearing)

Filament Extruder Gears

Filament Extruder

Hot End

Hot End

Hot End

LCD Holder
LCD Working!



3D Printer

Partnering with my dad, we have designed and built our very own custom 3D printer. He has done the bulk of the mechanical design and fabrication whereas I have done the bulk of the electrical work (the easy part). Now we have something to show. 

Working 3D Printer
You will be seeing a lot more posts about this and hopefully robotic projects utilizing the 3D printer. 

The frame is made from extruded aluminum, mostly from a company called 80/20 "The Industrial Erector Set" (but bought from amazon).

The 8mm hardened rails have cheap linear ball bearing slides. 

We decided to go with the "h-belt" drive which was made popular by CoreXY. The RepRap Marlin firmware (link here) has an option to control such a drive system. It utilizes both motors in order to drive in a single direction. Typical x-y stages have a single motor for a single axis.  The CoreXY site goes into the advantages, but we liked it due to the ability to drive the stage, which holds the hot end, in x and y rather than driving the in a single direction and moving the platform, where you print.  

H-Belt Drive System

We also decided to use the RAMPS 1.4 board which utilizes a Arduino Mega. So far I have been impressed with how simple the electrical and firmware setup has been.  We purchased this kit from Sainsmart (SKU:20-013-213).  

Sainsmart Kit (SKU:20-013-213)

RAMPS 1.4 and LCD Display

Together we have spent approximately $1,200, however, for that cost we have bought enough components for two printers!  (although only have one built as of this post

First X-Y Test

MORE TO COME!

Friday, January 18, 2013

Heat Sinks

In the last post, I briefly mentioned that I planned on adding a 'heat sink' to my motor driver board in order to prevent it from over heating.  In this post I will cover why a heat sink is often needed and what it does.

Definition 
A heat sink (a.k.a heat exchanger) is a part which transfers heat into the surroundings (air in most cases).  It is typically an additional metal part, usually Aluminum but can be any highly conductive material, which is adhered to the thing that is getting hot.  Additional explanation... Wikipedia definition.
The heat (or 'thermal') energy is exchanged (or 'transferred') in to the air through a mode called convection (mostly).  There are also two other modes which do contribute to some transfer, but tend to be relatively small.  They are known as conduction and radiation.

  • Convection is the thermal energy transfer through fluids, like air (Link)
    • If you hold your hand above to something hot, you can feel the heat mostly because of convection
  • Conduction is the thermal energy transfer through a material, like metal (Link)
    • If you touch something hot, energy is transferred into your hand by conduction
  • Radiation is basically waves of thermal energy (e.i. infrared light) which are emitted by the thing that is hot (Link)
    • If you hold your hand next to something hot, you can feel the heat mostly because of radiation.
    • The earth is warmed by radiation from the sun.  In order for radiation to be of concern, the difference in temperature between the two objects (like the sun and earth) must be very large.


Overview of a Heat Sink


So, when do you need a heat sink?  
Well, that is not always an obvious question... it depends what you are doing, what you are doing it with, and where you are doing it.

What you are doing?
Are you driving a 0.5 Amp (at stall) motor with a 10 Amp motor driver?  Then no.
Are you driving a 6.0 Amp (at stall) motor with a 2.4 Amp motor driver (like me)? Then yes!
Are you driving a 6.0 Amp (at stall) motor with a 6.0 Amp motor driver?  Then probably...

What are you doing it with?
When using a motor driver, pull up the specification sheet and determine the maximum constant operating temperature.  In my case, I am using the L293D chip (Link to data sheet) which has an operating temperature from 0C to 70C.  If you have an IR thermometer, measure the temperature during heavy use.

Where are you doing it?
If you had a motor driver chip on a RC helicopter which is exposed to the wind created by the blades (that is key), you may not need a heat sink.  In this case, the wind causes forced convection into the air. Forced convection allows more thermal energy to be transferred into the air.  That is why you will often find a heat sink with a fan strapped to the top (like the CPU on the motherboard of your computer).

In general, if it gets hot to the touch during operation, I would recommend adding a heat sink.  If it is added correctly, you will only help prolong the life of the chip.

Finding a heat sink
You will typically find a heat sink in your local electronics shop or maybe even a hardware store.  If not, try pulling apart old electronics like computers or an Xbox.  After my Xbox showed me its red 'ring of death', I took the liberty of ripping it apart to salvage anything.  There were two of the coolest (ha) heat exchanges inside.

In most cases, finding a heat sink with fins is preferable.  Some of the really cheap versions are simply a bent piece of sheet metal... essentially creating two fins.  The key to an effective heat sink is surface area.  The more surface area your heat sink has, the better it will transfer the heat to the surroundings.
The image below shows a 'good' heat sink.  However, I am somewhat bias to the cool look of these.  An inexpensive bent sheet metal heat sink may be acceptable in some applications.

Heat Sink with Fins
In order to attach it to the chip, you should find yourself some thermally conductive grease or epoxy (a.k.a heat sink compound).  Simply using common household glue or bolting the heat sink to the chip is not sufficient (The generic glue could create a thermal barrier, having low conductivity, and restrict the flow of energy.  The same is true with an air gap between the chip and heat sink).  Conductive grease or epoxy usually has a high content of conductive particles, like silver, to help the heat transfer through it.  Apply a thin layer to the chip (avoiding bubbles).  The thinner the gap the better (unless you have bubbles). (Search Google for heat sink compound for more info).

Hope that helps.

Balancing Bot Arduino Shield Stack


I am slowly working toward the balancing robot Arduino shield stack.  So far, I have tested the XBee shield by sending information from the Arduino to the XBee and to my computer across the room.  As you can see from the below images, I have soldered my SparkFun 2 axis gyro and 3 axis accelerometer (Link) to my ProtoShield and mounted that to the XBee Shield which is mounted on the Arduino UNO.  The addition of the gyro/accelerometer was simple since no other shield I plan on using utilizes the analog pins (in order to use a stack of shields successfully, two shields can not use the same analog or digital pin... logic power is fine).


Gyro on ProtoShield

Wireless Gyro Stack
Next, I plan on adding the motor shield, which I purchased through the MakerShed (Link), to complete my balancing bot stack.  I have tested this shield and it should work for what I need it to do.  The shield is capable of driving 4 bi-directional motors... however, since my robot has 2 'large' motors (6A stall) (Link), I plan on doing some 'hacking' to allow it to drive 2 motors with all of the 8 outputs (essentially spreading the power around so I don't overheat the chips).  I will also add an Aluminum heat sink, which may be custom made unless I can find my way over to my local electronics store.  If heat sinks are new to you, I will do some explaining in the next post (in a nutshell, they help pull the heat out of the thing it is connected to,  a motor driver chip in this case, and spread it over a larger area).

Balancing Bot Arduino Stack

Friday, January 11, 2013

My First Arduino

After months of doing next to nothing with my electronics, I have finally jumped back into it.  This time I have come back with an Arduino!

I started playing with micro controllers while in college... about 8 years ago... really, 8years ago... I'm getting old.

My first micro controller was a Basic Atom Pro which used a C compiler which cost around $100 if you wanted to get into longer code (50+ lines if memory serves me correctly).

I quickly ran into issues and ended up switching to standard PIC chips (by Microchip) after a coworker, an electrical engineer, gave me a bunch of his old books and programmer.  Since then, and up to now, PIC is all I have used.

Since I began hearing about Arduino a few years ago, I considered giving it a shot... however, up until someone got me a UNO this Christmas, I had never used one.

After installing the software and about 10 minutes of playing... I regretted not switching sooner!  The majority of my time spent on the PIC was figuring out how to set the bits correctly to get something to work.  With the Arduino, although that stuff is still needed, it is all behind the scenes.. and I am glad to see it go.

I have purchased a number of shields and plan on hooking up my balancing bot (or so I hope it will balance).  I will probably update the Sumo Bot also with an Arduino...

Stay tuned...

Arduino UNO, XBee, Proto and Motor Shields

How to Set-Up a Pair XBees

There are plenty of examples on how to set-up a pair of XBees on the web, but since I had some trouble, I thought I would share my resources for the next person who tries.

I bought my XBees (Link) and XBee Explorer USB (Link) from Sparkfun

First, check out this you tube video I found on YouTube.


Here are rough steps
  1. Connect one XBee using a XBee Explorer USB, or equivalent
  2. Find the correct COM port and test the connection (set the Baud rate to 9600)
  3. Move over to the Modem Configuration tab.
  4. Click read to pull the info from the modem
  5. Change the Modem model to XB2-B
  6. Change the function set to ZIGBEE ROUTER/END DEVICE AT (for XBee 1) or ZIGBEE COORDINATOR AT (for XBee 2)
  7. Change the PAN ID to 3FFF (Can be any value within the given range as long as both XBees are set to the same one)
  8. Make note of the Serial Number High and Serial Number Low
  9. Press Write to program your XBee
  10. Perform steps 1 through 8 for the second XBee (XBee 2)
  11. This time, prior to pressing Write, input the first XBee's High and Low Serial Number in the Second XBee's Destination Address hight and low
  12. Ensure the Baud rate is set to 9600 and press Write
  13. Finally, reconnect the first XBee and input the second XBee's High and Low Serial Number in the Destination Address hight and low
  14. Press Write... DONE!

Although I thought I was following his tutorial step by step, I overlooked the fact that the modem type I was selecting was different than his.  In the video, the modem type was "XB24-B" but mine was selected as "XB24-BZ".  I don't know the difference, or why one was working and the other was not, but I don't care.  For my purposes, all I wanted was to send serial data back and forth.

Here are the screen shots for each XBee
Coordinator XBee Settings
Router/End Device XBee Settings

Using some serial source, you can now send data from one XBee to the other.

If you have "Bricked" your XBee, which means interrupted it during a firmware upload, use these steps to get you back up and running (I had to use them)

1. Take the module out of the interface board.
2. Connect the interface board to the computer.
3. Open X-CTU make sure Baud Rate is set to 9600
4. Go to "Modem Configuration"
5. Put a check in the "Always update firmware" box
6. Select proper modem from drop down menu,
7. Select proper function set and firmware version
from drop down menus.
8. Click on the "Write" button. After a few seconds of
trying to read the modem, you will get an Info box
that says Action Needed. At this point, CAREFULLY
insert the module into the interface board.
9. You may get the info box again a short while after,
just use the reset button on the interface board.


This is where I found these instructions (Link). 

Good Luck!