BritishIdeas

Interesting Tech Projects

RSS Feeds

  • Home
  • About
  • Contact
  • Open Radio Control

Windows XP and Stepper Motors

Nov 4th

Posted by Andy in CNC

2 comments

My first test after assembling the board was to connect one motor to each axis in turn and test using Windows XP SP2 and Mach3. The test involved going to the motor tuning section and pressing the up and down arrows.

On the X and Y axis it was clear that steps were being lost. I had to turn the settings down to the lowest speed and even then there was the occasional loss of a step.

On the Z axis however the shaft only twitched. With identical settings to the X and Y axis it would not spin. So, the conclusion I drew was that there is a board problem with the Z axis.

Now I am testing with EMC2 running on Linux. My first test showed that all three axis, X, Y and Z appear to work just fine. The shaft spins quite happily on the Z axis…

So the moral of the story is that if one axis behaves differently it could be Windows causing it and not the board.

If you are stuck with Windows probably the only ways to determine where the problem lies are to either use a modified cable to swap pins around (so the problem axis is controlled by the pins for another axis) or to switch to TurboCNC and try that (perhaps with FreeDOS).

Bookmark to:


Hide Sites
hardware, software, Windows

Testing EMC2/LinuxCNC on Ubuntu 7.10 Gutsy

Nov 3rd

Posted by Andy in CNC

1 comment

I just completed the first test of running EMC2/LinuxCNC on Ubuntu with the HobbyCNC board. I connected a motor to the X-axis and started EMC2 with the “Axis” interface. I then told it to execute the default G-code file it loads with. Lo and behold the motor started spinning! I then moved the motor to the Y and Z axis and repeated. Seems to work well.

I didn’t notice any stalling so the problems I experienced with Windows XP and Mach3 must be due to Windows XP…

Here is a video:

Details on how to install EMC2 from source along with RTAI will follow when I have them ready. Also I will post the configuration files for the HobbyCNC board a bit further on in the project when I have more confidence that they are correct.

Bookmark to:


Hide Sites
hardware, motors, software

Basic Motor and Board Testing Completed

Oct 31st

Posted by Andy in CNC

1 comment

I have completed a basic test of the board and motors. The motors seem to miss steps even at a very low speed, and I think this is either because there is no load on the motor’s shaft or my laptop doesn’t generate the pulses properly (happens with some PCs). Here is what I did (use at your own risk!).

Testing the board and motors

I installed Mach3 and went to Config -> Select Native Units and chose Inches.

I next went to Config -> Ports and Pins -> Motor Outputs Tab and configured the software for the pins that my board uses. I set direction and step to active low. Consult your board documentation for the settings here.

I then connected a single motor to the X axis, set the jumpers on the board for the largest step, connected the board to my PC’s printer port, turned on the power to the board (24VDC regulated from a bench power supply) and clicked on the large Reset button in Mach3.

Currently I only have a 30VDC, 3A bench power supply to use. Because of this I could only connect one motor at a time. Even so this is a prudent thing to do anyway. If you make a mistake then you risk damaging only one of the expensive driver chips.

Next in Mach3 I went to Config -> Motor Tuning and clicked on the X axis button. I entered the following settings:

Steps per: 16000

Velocity: 0.19998

Acceleration: 0.2296875

Step Pulse: 1

Dir Pulse: 0

I then clicked on Save Axis Settings and pressed the up and down arrow buttons. Each press of the buttons caused the motor shaft to turn a little bit. Holding down the button causes it to turn repeatedly. I did see some missed steps but I think this is due to either my PC or the fact that there was no load on the motor.

I then moved the motor to the Y axis and the X axis and repeated the test at each stage, making sure to turn the power off to the board when connecting and disconnecting motors and my PC.

Finally I took the other two motors and connected them to the X axis in turn and repeated the test.

Bookmark to:


Hide Sites
hardware

Windows XP Running Inside Ubuntu 7.10 Gutsy Gibbon

Oct 30th

Posted by Andy in Linux

1 comment

I am still working on getting EMC2 working in Ubuntu 7.10, but in the meantime I decided to give Virtual Box a try. The Virtual Box website has deb files for Ubuntu so installation was easy. I created a new virtual machine with 192MB of RAM and 6Gb of drive space and stuck the XP SP2 CD in the drive and started the machine. From that point the XP installer went through it’s machinations until I had the desktop running.

I am pretty impressed. The speed of XP is almost as fast as if it were running on it’s own. It’s perfectly usable, has network access and can resize the desktop to match the window on the fly. It automatically captures the mouse pointer when it goes over the window, and it is possible to take snapshots of the PC and restore them. In other words, no waiting for XP to boot up; just go straight to the desktop.

Ubuntu 7.10 Running XP SP2

Bookmark to:


Hide Sites
ubuntu, Windows

Updates

Oct 24th

Posted by Andy in CNC

I found out that the linux-rt kernel is not suitable for running EMC2/LinuxCNC. Sorry if you followed those steps. You can remove it using sudo apt-get remove linux-rt. Instead the kernel must be patched with RTAI. I’m currently working out the correct steps to do this. So far I tried the pre-built kernel in the Gutsy experimental folder but ethernet was broken. I don’t recommend bothering with those packages. Instead I hope to come up with the steps to install EMC2/LinuxCNC manually.

I have received most of the parts for the 24VDC, 10A power supply that is needed for the HobbyCNC board. Once I have that completed I will post a complete bill of materials with Digi-Key part numbers.

I damaged once of the stepper drivers on my HobbyCNC board while performing some simple tests with a bench power supply I have. The motor was connected incorrectly. Now I have to order a replacement. Luckily I was testing only one axis, otherwise I could have damaged all the drivers.

As you can see slow progress is being made on several fronts. Hopefully I will have something concrete to post soon.

Bookmark to:


Hide Sites
hardware, power supply, software

Ubuntu Splash Screen

Oct 22nd

Posted by Andy in Linux

Well…the splash screen was not centered. I think this was because the installation detected my monitor as “generic plug and play” with more limited capabilities than it really has. I changed the display settings in Gnome so I can get 1152 x 864 at 75Hz, but this left the splash screen off center. Here is the fix:

Edit /etc/usplash.conf to set the correct x and y resolution.

Run: sudo update-initramfs -k all -u

The update-initramfs needs the “-k all” option to update all kernels. In my case I have the generic and real time kernels.

Bookmark to:


Hide Sites
ubuntu

Linux Real-time Kernel Installed

Oct 19th

Posted by Andy in CNC

EMC2 requires a real-time kernel (which Windows XP and Vista are not). Installing it on Ubuntu 7.10 was pretty simple.

  • Open a terminal window
  • Run sudo apt-get install linux-rt and wait
  • Reboot

After the PC rebooted Gnome complained that the theme manager wasn’t working. Another reboot fixed that problem. Running:

uname -v

gives:

#1 SMP PREEMPT RT Mon Oct 15 01:05:51 GMT 2007

So the real-time kernel is now installed and working. I will play around with the desktop for a while to make sure it is stable before proceeding further.

Bookmark to:


Hide Sites
software, ubuntu

HobbyCNC Kit Arrived!

Oct 18th

Posted by Andy in CNC

2 comments

The kit arrived and here is a picture of everything received:

HobbyCNC Kit

Here is a close up of one of the motors:

Stepper Motor

And here is the board assembled (took about 1 1/2 hours):

Completed HobbyCNC Board

Now I need to hook it up to a PC and test it with a single motor. I can’t connect all three motors until I have built a 10A power supply. My current supply is only 3A so can’t safely drive more than one motor.

Bookmark to:


Hide Sites
hardware

Ubuntu 7.10 Gutsy Gibbon

Oct 18th

Posted by Andy in CNC

Today the latest version of Ubuntu was released – version 7.10. I am hoping to use this with EMC2 a.k.a. LinuxCNC for controlling my CNC machine. Why? Because Linux offers a real time version of the Kernel. The alternatives are Windows with Mach2/3 (which is not free) or DOS and TurboCNC (also not free). Windows is not a real time operating system, so the only software that works properly has to code around this. As far as I know that is the Mach programs. I will still need Windows however for DXF and CAM applications.

Downloading Ubuntu from the mirrors was painfully slow, and attempting to using the official torrent file resulted in “connection refused”. I presume a large number of people are also downloading the OS today. So I used the torrent file on this page. I pulled down the ISO image in two hours. Not bad. Burnt it to CD, added a second hard drive to my desktop PC (not required, but I chose to do it this way), created an image of the Windows partition and booted with the CD in. The install was pretty smooth. Only a couple of glitches. Grub failed to boot because I needed to enable the second drive in the BIOS. And the package manager decided to not install anything, which was quickly solved with this information in this thread.

Hopefully I will be able to get the real time kernel and EMC2 installed. If so I will post instructions, otherwise I will probably have to switch to 6.06 a.k.a. Dapper Drake.

Bookmark to:


Hide Sites
software, ubuntu

Pitch Conversions

Oct 17th

Posted by Andy in CNC

In order to set up the CNC software we need to know the pitch of the leadscrew being used. I found a Pitch Conversions Table to help with this. I have purchased a 6ft 1/4″-20 (20 threads per inch) threaded rod to use as a leadscrew. According to the table this is a pitch of 1.27mm.

With 200 steps per revolution that will give 6.35um per step. Using 1/16 microstepping that should give an average of 0.397um per microstep. However there will likely be a bit of play between the nut on the leadscrew and the leadscrew, eroding this accuracy somewhat. Also the threaded rod and the motor are made to specific tolerances and are not exact.

Bookmark to:


Hide Sites
hardware, resources
« First...«1011121314»
    • Recent comments
    • Popular posts
    • Archives
    • Tags
    • Categories
    • 3D Printing (21)
    • Banjo (1)
    • CNC (47)
    • Computer Aided Design (13)
    • Electronics (4)
    • Flash (2)
    • Linux (24)
    • Mac OS X (2)
    • Mapping (18)
    • Miscellaneous (8)
    • Photography (13)
    • Software Engineering (29)
    • Windows (5)
    a480 alibre design backlash blender CAD canon chdk diy dvd dxf emc2 endmill fireballcnc flex hardware inkscape JOSM machine maperitive Mapnik mendel MonoMac moonlight nunchuck OpenStreetMap pcb python rendering repetier reprap resources ripping robot scripting silverlight sketchup software speed stepper motors time lapse ubuntu weather wii Windows wizoscript
    • May 2019 (1)
    • December 2017 (2)
    • August 2015 (1)
    • November 2014 (1)
    • October 2014 (1)
    • July 2014 (2)
    • June 2014 (3)
    • September 2013 (5)
    • July 2013 (1)
    • June 2013 (1)
    • April 2013 (4)
    • March 2013 (2)
    • February 2013 (3)
    • November 2012 (1)
    • October 2012 (1)
    • September 2012 (2)
    • August 2012 (1)
    • July 2012 (3)
    • June 2012 (1)
    • March 2012 (1)
    • October 2011 (1)
    • September 2011 (2)
    • August 2011 (2)
    • July 2011 (2)
    • May 2011 (1)
    • March 2011 (4)
    • February 2011 (1)
    • January 2011 (3)
    • September 2010 (1)
    • July 2010 (3)
    • June 2010 (10)
    • April 2010 (1)
    • February 2010 (1)
    • December 2009 (5)
    • September 2009 (2)
    • August 2009 (3)
    • July 2009 (7)
    • June 2009 (1)
    • March 2009 (3)
    • January 2009 (1)
    • October 2008 (1)
    • September 2008 (6)
    • July 2008 (2)
    • June 2008 (5)
    • April 2008 (4)
    • March 2008 (2)
    • February 2008 (2)
    • January 2008 (1)
    • December 2007 (1)
    • November 2007 (7)
    • October 2007 (16)
    • CHDK and Canon A480 Quick Start Guide (54)
    • PCB For Raspberry Pi WH1080 Weather Station (33)
    • Jack the Ripper Bot I – Introduction (29)
    • Jack the Ripper Bot IV – Software (13)
    • Jack the Ripper Bot II – Mechanics (10)
    • Using Inkscape for CNC Designs and DXFs (10)
    • Setting up Raspberry Pi for 3D Printing with RepRap (9)
    • How To Install EMC2 on Unbuntu 7.10 Gutsy From Scratch (9)
    • Importing DXF Files Into Inkscape (8)
    • Jack the Ripper Bot III – Electronics (7)
    • Andy: I can't recall sorry - it's been too long.
    • mr. robo: You write "Attach the Y axis to the core using a M8x220mm threader rod. A M8 nut goes into the nut...
    • Ryan: Thanks for this. I just ordered a dial indicator from Amazon for $15. It seems silly to buy a Drum...
    • Andy: Your toaster oven is probably not suitable for doing this.
    • haimiko: Shouldn't the software be trying to follow the curve? My toaster oven is slow to heat up so the...
    • Dan: Hey Andy, I used your script to get started. Very helpful. Happy New Year!!!
    • Unnerby: Makes sense. Thanks a lot Andy !!
    • Andy: I made the track width and length so it has the matching impedance required.
Mystique theme by digitalnature | Powered by WordPress
RSS Feeds Top