Saturday, October 2, 2010

Making my thermostat



A few days ago, the shipment from futurlec with my electronic components finally arrived. It took them almost a full month to get shipped and arrive here. Inside the envelope there were a lot of separate plastic bags, all labeled with what was inside. That's convenient.


After a closer look on the multimeter, I saw a big crack in the plastic and the screen was completely loose inside the case. So obviously it didn't display anything. I've sent them an email about this, but they haven't replied yet. I hope I'll get my money back or get a new one. While waiting for their answer, I borrowed one from my grandpa so I could build my thermostat.


I've worked on this all morning, so I was hoping it would work. But it didn't. The voltage to set the desired temperature only goes up to 60mv. So the thermostat can only regulate temperatures up to 6°C. On the positive side: the led goes on for about 2 seconds before turning off, so I think the hysteresis is working, but it never gets cold enough again to make it go back on once it goes off.


I started measuring if all the resistors were correct and found that the potentiometer is 5k instead of the 2k I ordered. All the other ones were correct. I bought the 2k one because futurlec didn't sell 2.2k. I had already send them an email about the broken multimeter and didn't want to send an other one for something worth less than 1€ so I just ordered a 2.2k potentiometer from ebay. I hope everything will work with the correct potentiometer installed. Below I've added a picture of my thermostat. The broken corner is my fault, I dropped the board while I was unpacking it. Luckily its only a small corner that went away, and the rest is intact.


And while I'm talking about electronics, I might as well mention that I'm still waiting for everything from mendel-parts to be shipped. The electronics have arrived in their shop, but my order hasn't been shipped yet. I suppose sending 50 order in one day is a little too much for them. I couldn't do that either.I hope everything will arrive before next weekend, so I can finally start building my Mendel.

Tuesday, September 21, 2010

Mendel 3D renders

Yesterday I was looking on the wiki for some renders of a completely assembled Mendel. The only thing I found was a tiny picture of the front view. That's really too small to be of any use. I did find the 3D-models of an older version of Mendel made in Solid Edge. Luckily my university has a license for Solid Edge, so I downloaded and installed the software. Once installed, I opened the file and wanted to render it.
I got a lot of errors telling me that the included files had an absolute path reference to \\campus\files\MechEng\... well, just a very long path from a filesystem on a university. I looked for a way to fix them all at once. The only solution I found was putting all files in the same folder as the general-assembly.asm file. I was now able to see the whole Mendel in 3D. That will certainly help me once I start building mine.
I made some high resolution renders of the front, back, top and bottom for people without access to Solid Edge. If you click on a picture, you will be taken to a page with the small version of the image. There is a download button on the top left corner of that page. That's the one you need to download the big image. The images are over 1MB each, so you have been warned.
If you want a view from a different angle or from a specific part of the assembly, leave a reaction below and I'll render it for you.

Front view
Rear view
Bottom view
Top view

Wednesday, September 15, 2010

Arrival of the first parts

While I was programming the extension for mediawiki, some parts for my Mendel arrived in the mail. First one to arrive was the nichrome wire for my heated bed. It's just 10m of nichrome wire for my heated bed, so I don't tink a picture is required.

My broken soldering iron
Next package to arrive was a new soldering iron. I bought a very cheap one on ebay. One would think its just a heating element, so even a cheap one is good right? Wrong. After like 5 minutes of usage, I saw sparks coming out of the metal part. I send a message to tk-stores-494 but still haven't got a reply. They really sell junk, never buy anything there. As I wasn't getting a reply and shipping it back to them would probably just be more expensive then buying a new one, I decided to open it to see what was broken. It was all burned inside. That should really not happen after just 5 minutes.
As it was broken beyond repair, I ordered a new and more expensive one from an other store. The new one hasn't arrived yet.

The next day two packages arrived. The smaller package contained the extruder parts I ordered from reifsnyderb with a .5mm and .35mm nozzle. The nozzles are easy to exchange and everything looks sturdy. The bigger package contained the filament I ordered from reprapsource. It was nicely packaged and they even added a small sample of their black filament. I tried inserting the filament in the extruder, and it fitted nicely.

Today the plastic parts from nophead arrived. The box was smaller then I expected, but it was full of plastic. The parts are nicely made and have almost no errors. I hope I can make stuff with the same quality when my Mendel is finally working. To have a better look at them and see if nothing was missing, I laid the parts out on my desk. After comparing them to a requirement-list, it seems I am missing two x-bar-clamp-m3 and two x-motor-bracket-space. It is an old list, so its possible that these parts aren't needed anymore. I'll only know the answer for sure once I start building my Mendel. If anyone knows the answer, feel free to let me know in a reply. It seems its complete, I should learn to watch more carefully before posting.

That's all that has arrived for now. I'll post updates when more stuff arrives or when I did something else worth mentioning.

Tuesday, September 14, 2010

Upload3D extension

During the past days, I have been working on an extension to integrate my stl2png script in mediawiki. I found very little documentation and comments in their source code. It looks like the only documentation they have is how end-users should use it, but nothing for developers. Every function has about two lines of documentation on what it actually does. A little longer description would have been useful. Because of the lack of documentation, it was hard to use their classes and I had to find some workarounds and hacks to make my code work, as an extension is not allowed to change their files. I just made my script change the $_FILES and $_POST arrays. I know that's not smart to do, but its the only way I managed to tell the wiki it should use an other file as source, and not the uploaded zip.

The extension works, but is still in alpha version. The form for uploading the zip still needs work, and the newly uploaded files don't receive a description for some unknown reason. I have temporarily placed a demo of the extension on my pc at home. You can find it on http://tman.webhop.net:8765/wiki. This won't stay there forever and my pc isn't always online, so its very possible that it won't be accessible. Hopefully it will be used on the reprap-wiki by then. The source code can be found on http://www.reprap.org/wiki/File:Upload3D.zip

I'll stop working on this for a while now. With the demo online, it should give people a clear idea of what is possible with mediawiki. Even with the bad documentation, I still managed to make this in a few days. I hope they won't exchange the wiki for an other type of documentation-system. There is a reason that wikipedia is so big, so it would be stupid to change to an other system if you ask me.


Friday, September 10, 2010

A big upload button

As the delivery of the hardware has been delayed, I decided to search for something else that I could do. I found a page on the wiki mentioning that there was a need for a big upload button. After asking, it seemed that they might drop the whole wiki, so maybe the button wouldn't be needed. I don't really understand why they would replace the wiki with something else, as a wiki keeps a history of both documentation and files, so it sounds like a stupid idea to replace it with something else to me.
Anyway, even if they do change the method of keeping the information, it will still require something similar to the upload button. For that reason I decided to make a script in php that would take a zip as input and give stl-files and the matching renders as png-files. I won't create something to integrate everything in mediawiki yet, until I know for sure that they will keep using it.

First of all, I had to re-install a linux os on one of my pcs. I downloaded kubuntu server edition, set up a lamp server in VMWare and added phpmyadmin on the server. The easyest part was already done. Now I had to install povray and stl2pov. I had no problems installing povray, as it was in multiverse of ubuntu (here).
The problems started happening when I had to build stl2pov myself. It seemed I needed gcc, so I installed that one and uncommented the line in the makefile to make it use gcc. The installation instructions now said that everything should work when I used the make command. But it just gave me an ugly error:
Makefile:9: *** missing separator. Stop.
As that line was an include command, I just opened version.inc, copied everything in there and pasted that over the include command. So the first error was solved.
There was still a second error however. The program didn't recognize .if !defined(NOPORTDOCS), I thought "this is a new installation, I bet it won't be defined for me" and removed the if-test. The compilation did work now. Once that was done, "sudo make install" installed everything just as expected.

Now that the software was installed, I searched for how to run it. Stl2pov was very straightforward and didn't need any parameters or settings files. It just converted the file. I was happy it didn't cause me more troubles. Povray however did require settings and parameters. The parameters  were well documented on their site and I quickly found that -i is for the input file, -o is for the output file, +W is for the width of the image and +H for the height. I added 2 more options to the command: +GA for giving all errors in the terminal and -D for not showing the picture while rendering. So that makes the whole command for rendering an image:
povray -i\"render.pov\" +W600 +H600 -o\"$output\" +GA -D
Now I needed to find how to add settings to tell the program how to render the objects. After looking a little around the internet, I tried some different settings and these seemed to work. I found a basic script on a site, but didn't save the url. Sorry, if it yours let me know and I'll add a link to give you credit. I changed the colors, rotation, light source and camera location a little, but didn't touch the things I didn't know what they were for like the global settings or sky sphere. It works and that's good enough for me.

The file requires an include-file that describes the object that has to be drawn. It expects the object to be called  MODELNAME. So in my script I had to replace the name stl2pov was giving it. A few simple lines of code later, my php script could rename the model. As the rendering is the most intensive part of the script, I didn't think about efficiency while replacing the name and just wrote something that is quick to code instead of quick to execute. My script was now able to render any given stl-file into a png. I uploaded it to the wiki.

After dinner I still had some free time and quickly added the extra feature of unzipping the contents of a given zip, looking for stl-files and matching png-images and rendering them if they were not found. That was basically just extracting files, looping over them and deleting unnecessary files, so I won't go into detail about that.

You can now find the script I just created in the wiki as stl2png. I added a few lines of comments in there, but really not that much. If anything isn't clear about how it works, feel free to ask me.