Monday, October 10, 2011

Counting lines from ls

I needed to count how many directories where in a directory and print the directory number in the output. It was easily done like this:

$ ls -1 | cat -n
1 CBMessageGenerator
2 CRFeedback
3 CRHelpProvider
4 CRhelp
5 CellDiscrepancyManager
6 ConformanceChecker
7 ControlRoomDeskTop_VFI
8 DDSEmailLog
9 DTOutputFileBuilder
10 DTReportServer
11 DatabaseInstallScripts
12 DynoDBLib
13 DynoIntelliShed
14 DynoMail
15 FTPPoll
16 FTPPusher
17 HeartBeat
18 IPBrokerConfig
19 ReportBuilder2.0
20 ReportBuilder2.1
21 ReportingFramework1.1
22 Scheduler_jqf
23 StaticReportGenerator
24 StaticReportNotificationsEmailGenerator
25 SwarmDDS
26 SwarmDDSProcessManager
27 SwarmDTChasis
28 SwarmDTChasis_VFI
29 SwarmDTLoader
30 SwarmDTProcessServer
31 libDynoMail

ls | cat -n
gives the same result.

Thursday, June 17, 2010

XYZ Dark Vader Test

Last weekend, I found some time to work on my RepStrap once again! There was a problem with the Z plain. I thought it was the stepper driver board, because there was smoke coming out of it, the last time I tried running it, but it turn out it was something wrong with the stepper motor. It appeared to be seized!

I found a replacement stepper motor in an old dot matrix printer, and swapped it out. It was at that moment that my dad walked in and asked what was wrong with the previous stepper motor. I showed him it would not move, not even if you took a pliers, gripped the axle and tried turning it. My dad asked if he could open it up and take it apart, and since it was not working, I said sure, since I was curious to see what the insides of a stepper motor looked like... Once it was open, we could see the two coils. Everything looked fine. There where 2 bearings on the top and bottom of the axis. My dad thought that the problem could be a seized bearing, but they where fine... So I tried again with the pliers... and after applying some force, it began so spin like the others when you finger-turn them...

So I hooked it back up and tested it... and it worked... I found the test code for the steppers on the reprap site and burned it to the arduino... I had to comment out some code... like PSU stuff, and the stuff for the enable pins... I will post my code, but here is the link to the original for now: http://reprap.svn.sourceforge.net/viewvc/reprap/trunk/reprap/firmware/Sanguino/Sanguino3G/testers/imperial_stepper/imperial_stepper.pde

Here is the result!

Thursday, October 8, 2009

Wiring up - Round 1

last night, (as in the date on the photos... I'm re posting this from my back up blog site...) I finally took the time to work on my repstrap again… when I say TOOK the time… look at the time on the photos… all in all I spent 4hours working on the robot.

This is what I did:

  1. I placed all the boards on the perspex, and drilled holls for them… making good use of my drill press :) no photos of that needed.
  2. Starting with the arduino and shield, I put :: M3×50 machine screws > washer > PCB > clear tubing > perspex > washer > nut.

  3. Here is the arduino mounted

  4. Here are the 3 stepper driver boards mounted with the arduino showing. This is a view from behind.

  5. Here are all the boards mounted, the two new additions are the PWM driver & the DC motor driver.

  6. And now my wiring nightmares begin… Just take a look at this rats nest! what a mess…

  7. Next I mounted the perspex to the Z axis of the rep strap. The Z axis was taken off to make this a bit easier…

  8. Here is a close up of the clear tubing. Its purpose is to act as a “shock absorber” for bumps and also so that the perspex does not crack if I tighten the screws too tight… which I do… The clear tubing was used to attach all PCB’s
    Because the rats nest is such a mess, I am now going to have to de-solder the IDL headers and hard wire cat 5e cable in its place, this will make it easier to connect to the arduino break away shield and easier to route the wires.

Tuesday, April 7, 2009

Stepper demo

Here is a short introduction to my RepStrap or CNC machine.

video
I demo the stepper driver and the stepper motor running the RepStrap test code, stepping the Y axis.

As mentioned... I have no idea how to tell what parts of the wires coming out of the stepper motor are the A,B,C,D wires. All I do know is which two wires make a pair. I couldn't figure out the ABCD cables connection block either. I clamped the wires to small metal parts, then put them inside the plastic female. When I tried to plug the connections block into its male pins the wires poped out. So I have just improvised for now.

The ribbon cable that has ten (10) wires in it... I cant figure out why there was a need for ribbon cable and where the other end of the ribbon cable is supposed to plug into? since only three (3) wires are used and there is no place on the Arduino or the break away board for ribbon cable connection blocks...

Lastly, I may have popped the main or secondard IC on the stepper driver board. I might have not connected the wires properly or something. Nothing was happening & the heat sink was getting really hot. Hope I haven't done too much damage there.

Monday, April 6, 2009

Final Assembly part 1

Last Thursday evening I had a go at assembling the final bits and pieces of the RepStrap. I started trying to mount the opto end stops... I came into a few annoying problems.

As you can see, the RepRap opto end stop does not like my Perspex opto end stop spacer... My holes where not lined up 100% and if I recall correctly either my dad or I said that we wern't building a swiss clock and we could just drill holes where ever so long as its roughly right.... WRONG!!!
Here is a shot of the reverse side once I forced the parts together... as you can see, its far from square.

Then there was a nother battle trying to get that to line up with my holes I drilled into the X & Y end brackes. Ok so I didn't drill my holes properly and rushed them a bit... But does this image not look a bit odd??? Where is the ethernet cable (cat5e) supposed to go? How is it supposed to reach into the connector? & yes if I swapped the opto end stop around that didn't help either because then its up against the drive screw / threaded rod.

I had to cut a bit off the end of the X stages threaded rod. I had a first go at using my Dremel. Its pretty cool...

Unfortunately the cutting disks dont last too long and snap easily... I borke 5 cutting disks that night! I only managed to cut both sides of the Y stage and one side of the X stage.

The next things I need to get done is, cut the other side of the X stage and cut for the Z stage as well. I ordered a piece of Perspex to mount all the PCB's and the hacked power supply on to.

One thing I can't quite understand is why or what is the great need for a OPTICAL end stop and not just a simple limit switch??? surely a simple limit switch is way cheaper???

That goes for the stepper driver board... It looks a lot more complicated than a board that Murray Horn designed.

If I get time - this could be a year from now - I will try contribute my modifications to the RepStrap and show where I deviated and what I think should change to have a successful RepStrap, but just a bit cheaper.

So far I would replace the Z bearing arm holders... The things that hold the Z satage to the vertical base. I used angle brackets for that. I would swap the opto end stops for limit switches. I would use Murray Horn's stepper boards to drive my stepper motors...


One last very annoying thing... I ordered the electronics from the RRRF. They were expensive and took a long time to arrive. The name says Complete Arduino Electronics Kit. In the RepStrap build instructions it say I will need SIX (6) opto end stops... WHY then does the COMPLETE Arduino kit only come with THREE (3) opto end stops???

Very annoying... Now I am going to have to etch another three (3) opto end stops myself - which will take time - and even worse... I will have to covert that opto end stop double sided board to a single sided board - which will take time - because I only have single sided copper and it took me forever (3 months) to master etching PCB's with ferric chloride... stuff I hate! :(

Sunday, March 29, 2009

My Dremel

I haven't had the time to blog in a while and a lot has happened so I will have to wade though all the back log. I bought a Dremel 300 to use on the Mc Wire RepStrap. I should mention that I finished building ( and testing) all the electronics this weekend and am just waiting for some Perspex to mount all the PCB's on.

Here is the Dremel in its box.

Here is the Dremel's carry case.

Here is the Dremel.


The idea for the Dremel is that it will let me etch PCB's with it and mill things like aluminium and wood, plastic too. Here is the instructables link: http://www.instructables.com/id/Easy-to-Build-Desk-Top-3-Axis-CNC-Milling-Machine/ and here is the RepStrap link: http://reprap.org/bin/view/Main/McWire_Cartesian_Bot_1_2

Wednesday, February 11, 2009

Drill Press

This past weekend my Dad found an old drill press hidden away in the hardware. It's from 1613BC & weighs 6 tons. (It took me about 20min to clean it from all the dust) Its a manual drill press! You have to wind a handle to make it work! There are two speeds! slow & very slow! I attempted to drill ~150 holes for the arduino board using this drill press. Take a look at the raw power in the video!
video
I tried to drill a hole... Broke the first bit on the first try! The chuck comes down with too much force & when the pit hits the fiber glass it snaps! This was with a 1mm bit! I put a new bit in & tried to control the decent a bit better. I then realised that if I let go the handle, the momentum from the top piece of spinning metal at the top, is enough to make the handle swing round with enough force to knock teeth out! I got fed up very quickly with this... It just wasn't going to work!
This how ever was! :) Its a Ryobi drill press, with 5 speeds & a 13mm chuck! Cost me R450! It was a demo model at some other hardware & they wanted to get rid of it... & I wanted it!
video
Here you can see it in action! I didn't set the bit in the chuck 100% so it wobbled a bit... I just wanted to test it out & drill some holes! Works like a dream! (& yes, when I drill proper boards I will have 1 hand holding the PCB & 1 on the acent/decent leaver so the PCB wont spin!)