Mendel in the Cambrian

September 11, 2010 3 comments

So, after weeks of building non-functional extruders, I decided to turn my attention to other things that I have left on the backburner for far too long. Herewith, is a short description of a computer-vision application, specifically written to monitor mendel movements. I have included a video, of my findings…. but firstly, the video does require some explanation.

This video is the output of a C++ application, that tracks mendel motion, as that motion relates to instructions, received from reprap host software, and consequently executed by the mendel hardware. The application generates a clear, visual comparison between true- and target positions.

The application takes two inputs:
1. It reads a text file/stream of GCODE
2. It reads a video stream/camera/file
 
The application interprets input data as follows:
1. The GCODE file is interpreted, and a target position is calculated, for the extruder and y-axis, respectively. The target position, appears as a green rectangle.
2. In addition, the GCODE time-stamp is read, and compared to the incoming time-stamp of the video stream. If the former is greater, then the video stream information enjoys priority, and all data from the latter gets updated.
3. From the data of the video stream, the actual position is calculated, for the extruder and y-axis, respectively. The actual position appears as a red rectangle.
4. The extruder rectangles appears at the approximate centre-left of the screen, while the y-axis rectangles, appear at the bottom-left of the screen.
 
Currently, the application generates a stand-alone video file (see attachment).
Future plans and testing include the following:
1. Run the application in real-time. Currently, all video- and gcode data is fed to application via offline files.
2. Integrate application with RepRap Host software, so that real-time corrective gcode can be sent to mendel (camera-in-the-loop). A socket connection can be used for inter-process communication purposes. To send gcode information from host software to application, a pipe can be used. 
3. Incorporate and interpret STL build information, so that build progress can be monitored, and problems can be identified (and avoided, as far as possible) during build.
4. Test “visibility” of extruded plastic, and test whether this can be monitored as well.
5. Test “visibility” of geared/pinch-wheel extruders.
6. Automate object recognition viz. all objects to be tracked, must be “recognised” auto-magically, on program start-up.
 
 
The basic camera setup, as well as measured distances, can be seen in the following diagram:
Video CAM position to monitor Mendel

Cambrian Mendel

 The cam configuration above, together with video graphics resolution, gives a movement resolution of approximately 0.5mm per pixel. No camera calibration model has been included in the code.
 
Categories: Mendel, OpenCV, RepRap

A little bit of printing….but not too much

August 15, 2010 4 comments

So, I have a mendel that prints little bits at a time. And the main culprit, barring me from full functionality at this time, is definitely the extruder. I have mastered such esoterica as; axis belt tensioning, homing, axis squaring, printbed preparation, extruder preparation etc.

At the present, my printbed is not heated. To compensate for this, I have temporarly put double sided tape on the print surface. I will experiment with Kapton tape at a later date, once I have optimised my extruder settings, and built the electrnics for the heated bed.

I am experimenting with different extrusion temperatures, and tentatively settled on 230C. This is the temperature as reported by the RepRap Host software, and I have no idea how close this reported value is to the “actual”/true temperature value. The extrusion rate is glacial.  Even when applying a considerable amount of manual force, i.e. bypassing the motor all-together. And I am left wondering which of the following might be the reason for my slow extrusion:

  1. There is some adhesion chemistry going on inside the hot-end
  2. My extruder motor needs to be more “burly” i.e. requires more torque
  3. There is something peculiar about the chemical make-up of my particular batch of ABS 

 

There is another peculiarity of my current mendel setup: my heater stops working at random times. I am not sure whether this is due to some software configuration issues like firmware/RepRap host software compatibility, or maybe something completely different. Loose electrical connections could also cause erratic temperature readings, but I have located and fixed all loose connections….I hope.

Below are some sample pictures of the Mendel geared extruder.

Mendel extruderMendel extruder

 And another view….

Mendel extruder

 The blue tape, is a little bit of insulation wrapped around the melting zone, which includes the kapton tape  insulated nichrome wire, and thermocouple sensor. The PTFE thermal barrier was inserted into lasercut portion with epoxy.

The printbed has been covered with double-sided tape, as a temporary measure, until I get the extruder configured correctly.

Categories: Mendel, RepRap

dressing mendel in new clothes

It has been a long while since my last blog, and not much has happened since I last wrote here. You be the judge as I gradually put on the emporer’s new clothes……

I have migrated from self-made stepper boards, to the pololu offering, which is alot more compact, and an order of magnitude easier to build. Also, from a cost-perspective, it is not all that hard on the pocket, which is always good news. Clearly, what is still missing is the heat-sinking, and a fan for cooling, since by all accounts, these little ICs tend to get very hot. I have not run them long enough to confirm this. Up to now, they have always been rather cool to the touch. For safety’s sake, I have also included 1.5A fuses – just in case.

 

Below is a fan that is intended to cool pololu boards and runs on i/p 12V, and can be directly coupled to 12V lead acid battery.

 

All-in-all, it has been a learning experience, since I have personally never worked with stepper motors before. Moreso, since the v2.3 stepper circuits blew, for a time I was very concerned that I harmed the individual motors. After following the brief, elementary guide

http://reviews.ebay.com/Stepper-Motor-Testing-and-Implimentation_W0QQugidZ10000000001227707?ssPageName=BUYGD:CAT:-1:LISTINGS:2,

and a few brief tests, I convinced myself that the circuit boards blew, and not the motors.

Once the motors were spinning, it was time to couple the motor-shafts to the mendel frame. I did not like the idea of filing flats onto the motor shafts, as proposed in the original mendel-build wiki, so I opted instead for the solution, as proposed by khiraly http://forums.reprap.org/read.php?14,33125

Below, you can see the modified pulley onto the Y- and X-axis belts, respectively.

 

As can be seen from the image below, I also mounted a diBond bed onto the y-axis, as per nophead (thankyou chris). One of the main reasons for following the diBond route, is to facilitate/anticipate the infamous heated-bed construction. In terms of mechanical stability, the circuit-board mount does seem to stabilise the overall structure alot – reduced lateral motion.

The extruder circuit board is conspicuous by its absence. In fact, the whole extruder mechanism also needs to be built. Some os the parts, that may or may not be used for the purpose, is shown below.

 Nichrome wire, 44 ohm, 5m in length. The wire gauge also seems a bit thin, so I am not sure of this item will end up in the final build.

Welding tip, 0.6mm. The original build wiki recommends 0.5 mm, and I know Forrest and nophead is printing with 0.3mm. So I am not sure if this welding tip will suffice as stand-in, while still giving acceptable quality prints, but I will try ….

 

Further electronics progress – first stepper motor test

So there has been some modest progress since my last blog:

I have managed to successfully convert a Nokia 6101 USB data cable into a suitable USB-serial programming cable for my motherboard. There were some h/w mods required on the cable, i.e. picking up the 5V feed from USB-A connector, and and wiring it directly to datacable-PCB 5V o/p pin. The datacable was surprisingly well marked, so all o/p pins were readily identifiable. YMMV.

The device driver that the datacable came with, did not work😦 So I had windows search for the USB driver on the internet. It promptly returned with “ArkMicro” USB driver, and installed the device on COM5. I could now proceed with loading the firmware onto the motherboard. The firmware programming proceeded in accordance with many experiences already well-documented in various blogs and community forums i.e. I had to hit the reset button, holding it down for 10sec, exactly. Of course, when you see this ….. (apologies for picture quality: this seems to be hosting issue, as the picture displays fine on my local machine)

\

…..your heart skips a beat🙂

Next, I installed the host (Java) software. I unzipped, as per instruction, and executed. Watching the console, it attempts to open /dev/tty0. Hmmm. Not good, I have a windows machine. So I change the relevant entry in the “.reprap.properties” file, situated in the java “user.home” directory, and voila! Watching the cmd o/p console , the motherboard is reading the temperature (from non-existant extruder board). Ok, so far, so good.

The following night, I made a 10-way IDC cable, and connected my only V2.3 stepper board. I connected my 12V power supply, and waited for the explosion. Nothing happened, for a good few seconds, and then power LED lit up, and some stepper-motor LEDs. Ok! I felt the stepper IC, and it seemed fine. I switched everything off, and connected the stepper-motor. Plugged in USB cable for motherboard, started Java host software, connected IDC header cable to stepper board, switched on 12V power supply. No smoke. No heat. Good.

So I open up Java Host software, and follow the instructions on the “Testing electronics” page on reprap.org site. I hit the button that should spin the motor. A few seconds pass. Nothing. Maybe I did not click the button correctly. Click. Wait. Nothing. Hmmm. Now what? It suddenly occurred to me that I never tested my IDC cable for continuity. I casually clicked to the page where the DIY description of this beast lay. And there, they have the individual headers, of the cable, in a vice! Presumably to ensure that the header makes PROPER electrical contact with the wire. I just pushed it in by hand, for goodness sake! Ok, the bigger the problem, the bigger the hammer. Out with my most trusted, heavy-duty, long-nose pliers, and apply exhorbatant amount of force, on offending cable-header. After a considerable amount of clenched hands, and teeth, I re-inserted the cable into the respective boards, and this time continuity tested BEFORE switching on power. (Which I really should have done, right at the start. But, hindsight is a perfect science.)

At any rate, this seemed to fix my stepper motor problem. In short, I now have a fully programmed m/b with one functional axis-motor. I started with the production of my second stepper board, last night.

Categories: Uncategorized

Mendel Gen3 motherboard bootload

February 13, 2010 1 comment

After a few days of painstaking soldering, wire-stripping and continuity testing with my trusty multi-meter, I finally got the Gen3 motherboard off the “production line” and ready for bootloading.

Firstly, you have to download the arduino software from

http://arduino.cc/en/Main/Software

Then follow installation instructions as per reprap page

http://objects.reprap.org/wiki/Microcontroller_firmware_installation

Beware! The above page only took me part of the way!  What were the reasons for this incomplete information? Well, firstly:

1.I use a different AVR programmer, than the mainstream RepRap community – I use AVRISP MKII. SEE picture below:

2.The AVRISP MKII programmer does not power its target board! So I had to make the following H/W mods on the programmer…

http://www.ehow.com/how_4998924_provide-v-power-target-board.html

Yes, that means goodbye to my warrantee. But necessity is the mother of invention…..;)

SEE pictures below,

3.The Arduino software needs libusb library from sourceforge

http://libusb-win32.sourceforge.net/

Just a quick note, regarding this library, if you are running windows7, please take a look at this. You will need administrative rights for installation, of course.

http://www.youtube.com/watch?v=MNSh3Np86Fs

4.My electronics are home-made, so the bootloader is not on my CPU, by default.

I would like to take a break in the narrative, here. This was actually my second attempt at constructing the Gen3 motherboard. The first time round, I got the pintout configuration of the Atmega644p wrong! And because I do not have specialised SMT de-soldering equipment, I attempted an emergency board “re-work” which involved a drill, accompanied by “weeping and gnashing of teeth”. OK, so that did not end well.

The second time round, I was alot more circumspect with respect to component placement, although, admittedly, I did “over-etch” the board “slightly”. It does bear making the point that when you get the dreaded “initialization error: rc = -1” from the arduino software, it can mean that:

1.your pinout config is wrong

2.your circuit board has a short- or open-circuit

3.your programmer does not power your target board!!!!

Starting to build my 3D printer – Mendel

I have experimented with in-house PCB manufacture, for the last 3 months. I remember reading various open-source sites like www.reprap.org and fab@home , and saying to myself  – ” I can build this! How difficult can it be? ”

Yes, we all have our moments…….do we not? And this was certainly mine.

At any rate, I started out on the journey of building my very own 3D printer, and settled on Mendel from the RepRap foundation. If you do not know what this is, and what the concept is behind self-replicating machines, I do recommend that you visit the www.reprap.org site. Its well worth a look.

So a fully functional machine, such as a Mendel, has many inter-related parts, and as one would reasonably expect, it is fairly complicated to build. There are many functional elements viz. electronics, mechanical frame, extruder, power supply, software etc.

I started with the electronics. Unlike many other Mendel builders, I decided to go on “the road less traveled” and make my own PCBs. In a certain sense I am glad that I have followed this route. Being resident in South Africa, so far removed from the hub of RepRap activity, a certain measure of self-reliance is not always a bad thing.

So I started……and failed several times, as you can see. Below is a picture of my PCB graveyard.

After several months of trial-and-lots-of-error, I can authoratively say, that PCB manufacture is an art. It is an art that requires an extra-ordinary amount of patience. In order to learn this “art”, you must be willing to take alot of failures on-board (excuse the pun), even after working on a SINGKE board for several days, and not feel discouraged to start ALL OVER AGAIN, AND AGAIN, AND AGAIN. There are several steps in the “production line” of PCB manufacture, and each step has its own unique, and subtle, pitfalls. From cleaning the copper board, spraying with photo-sensitive spray, baking in oven at high temperature, preparing double-sided transparency,

UV box with "black" light

UV exposure, preparing development solution, development and drilling (SEE picture below: board after development and drilling),

 preparing etchant, tinning,

(SEE picture below: board after etching and soldering)

 (I do not silk mask),via and component soldering ……

If you are familiar with the Mendel electronics, you will recognise the board, as Generation 3 motherboard. This board contains the “brain” of the mendel printer. It controls the three dimensional motion, as well as the temperature and extrusion speed.

With respect to the mechanical frame, I can say the following: do not underestimate the amount of time this will take to assemble the mechanical frame!

(SEE picture below: electronics – motherboard and steppermotorboard, some rods, and x-axis “parts”)

(SEE picture below: x-axis is starting to take shape)

(SEE picture below: y-axis with “squashed frog”)

(SEE picture below: main frame without x-, y-  and z-axes)

(SEE picture below: main frame with x-,  y- and z-axes)

If you are all-thumbs, like me, set aside AT LEAST two days for assembling. Remember, you have to saw the rods to correct lengths, fasten “millions” of nuts/screws/washers and make the “squashed frog”, make sure bearings have a “smooth run” over unbent rods, mount motors and belts.

As for my own Mendel, the following remains to be done:

1. Bootload and Program motherboard

2. Connect motherboard to steppermotor board and test

3. Produce OptoSwitches,  two additional stepper boards and extruder boards

4. Mount all electronics with motors

5. Mount build platform with heatbed

6. Build extruder

7. Connect PC power supply

Categories: Uncategorized Tags: , , ,

Hello world!

February 9, 2010 1 comment

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Categories: Uncategorized