Posts

VFD control with Arduino using RS485 link

Image
Variable Frequency Drives ( VFD ) allow the control of spindles so speed can accurately be controlled and a detailed acceleration profile for the spindle and reverse rotation can all be handled. In essence a VFD is an three phase inverter for three-phase AC motor. I am using a popular (I mean cheap) Chinese VFD and though the reference manual is not great, I could see there is a built-in RS-485 port. I usually control the start, stop and speed selection using the keyboard on the unit but I thought it will be more useful if I could control everything from the same Arduino is doing our CNC table control. Some cheap RS-485 off eBay and some lines of code later, I can start, stop and change the speed from an Arduino. What a cool thing to have! Some configuration of your VFD are needed before you can use it like that.  You need to set PD163=1 (I am using address 1 in the code). PD=164=1 (for setting serial to 9600bps) and PD165=0 (for using ASCII and 8N1 character for...

First steps with ESP8266 wifi module

Image
Some weeks ago it was mentioned in hackaday.com a new wifi module was available at a very tempting price (I paid $10 for two ESP8266  units shipped). It is a full SoC system which firmware can be updated. My main interest was to use it with Arduino projects and, perhaps, as a way to use my 3D printers wirelessly. The module offers, among other choices (I2C, SPI) a serial connection, running at 115200bps. Getting it to work has been a bit weird, as documentation was not very accurate and I was not paying much attention either. Care has to be taken with power supply as the unit is to be powered at 3.3V and using 5V will probably kill it. Likely it seems that I/O are 5V-tolerant (or so they seem till now). My initial setup has been to use an Arduino UNO as a power supply for the 3.3V and another 3V USB to Serial adapter with one FTDI chip. This way I was able to interact with the board using a serial terminal software (Coolterm). Unfortunately my initial setup was a no go. I...

The ever shrinking Arduino

Image
The las version of Arduino I bought is the micro. Around the size of the Arduino Pro Mini but featuring a processor that handles the USB port too and costing $7.50. As I bought mine from an Asian online seller off eBay I decided to give a try before providing feedback. Last week I have got trouble with two items I bought on Aliexpress: a set of Kossel linear rails that have rough spots along the rail and a set of hardened chromed smooth rods that are very smooth but bent too. In both cases they first impression was they were ok and I give them the heads up so they could get my money. Unfortunately, on closer inspection I discovered the problems mentioned above and I am still in the process of sorting it out with the sellers. This time I wanted to be quite sure everything worked as expected ... but it did not. I could happily upload new sketches once I selected the Arduino Micro as the target board. But I could not get Blink program to work. After checking Arduino docs about the Mi...

Stupidity-R-US

Today, after a long wait, I made my mind to shopping for a brand-new MacBook Air. I went to the Apple store in my city before the summer but I did not like what I was told: They will make me a nice discount for being a university professor but only if I was billed personally. I wanted the machine to be invoiced to my university that would slash the discount seriously. It did not matter that my university was a leading public university in the country. I left the shop shocked and empty handed. After checking with some colleagues it seems that is Apple's usual policy, though nobody was able to explain why. Anyway, after doing some taxes math I saw it was still more convenient for me to charge the bill to my personal expenses account I hold with my employer so I went for it. These is more or less my experience today at the Apple Store in Valencia. Apple rep1 (at the door): How can we help you today Sir? Me: I would like to buy a MacBook Air. Apple rep1: Do you have it reserved...

Reading binary STL files in Java

Image
I liked the source code from MaskedRetriever user on github and I assumed it would work ok. It seems it was an attempt to create a self-contained tool for 3D printing but somehow it was left at an early stage. But I liked the fact that source code was documented. My needs were to read STL files and to slice them. As usual you need to get familiar with the different classes involved but it took me not much to get it going. I stripped most of the classes as I was not interested on 3D printing nor on having a GUI for such a tool. However, as soon as I draw the output of the slice process I noticed something was wrong. While the proper slice looked smooth like the image below: What I was obtaining was a bit of a mess, though the general ideal was correct. As it was my first attempt I was not sure where the error might be. After a few tests I realized that the same code would work ok if STL file was ASCII-based but it will fail as above if a binary STL was used instead.  ...

More on delta 3D printers

Image
It's been quite busy around here lately. Still, I have managed to build a couple of delta 3D printers with heated beds and develop a couple of ideas that seemed worth trying. One of these ideas is the use of a heated bed. While I can see that some people are moving away from ABS to use just PLA plastic, I do not see how I can use a PLA-only solutions for environments where temperature can be high, like inside of a car or near a hotend or heated bed. Two different types of extrusions and carriages were tested: wheeled carriages over the extrusion resulted in a quieter and more accurate system than rails. But the IGUS guides used had quite play by design. After watching the videos of them working I am not sure they are a good choice for this particular use, though printed parts do not look bad after all. While Johan pioneered the use of force sensing resistors on the bed for probe-less bed detection, I was not pleased with the additional cost these FSR sensors woul...

Mobile data services for Japan visitors

On the occasion of a trip to Japan, I had to look for a way to stay connected while on the go. Though most hotels will offer free wifi to guests, having an Internet connection while trying to navigate the city is most welcome. And if you are to believe the claim, Tokyo is the most populated city of the world. It certainly has an impressive public transportation system with many different companies just for the light trains and underground systems. Google Maps seems to be properly in synch with local companies schedules and provided accurate results on how to go from point A to point B within the city. But to be able to use it you need Internet mobile access. And this is where Japan seems a bit odd for the visitor: It seems you cannot buy a prepaid voice or data SIM card unless you are Japanese. Maybe I am missing something here but that was what I learned from my online search. One notable exception seems to be B-mobile VISITOR SIM , which offered pre-paid data service SIM card. ...

Viewing g-code files in Linux and OSX

Image
Working with CNC machines and 3D printers and developing CAM software myself I need a tool to quickly display the 3D view of any g-code file generated. For a while I have been using EMC2 software on Linux and Pleasant3D in OSX. The former was a bit picky about certain commands that were not understood that would prevent the displaying of a file completely. The latter is ok, but being oriented to 3D printers, it is not very convenient when handling files of several square feet. It works but your viewing ability and angles are a bit limited. After a bit of searching and playing with several potential candidates I have settled with version 0.2.3 of OpenSCAM that I had used in the past on Windows but somehow was not available at the time for OSX or Linux (or I was lazy enough not to try to compile it from the sources myself). Current version worked nicely in OSX and gave me some minor problems in Ubuntu Linux, that could be solved by installing libv8-dev library and doing a soft lin...

Delta 3D printers

Since the presentation of the Rostock 3D printer, I have been amazed on the kind of motion that these machines make to print a part. While I have found quite hypnotic the way layers are deposited to create plastic part using fused filament fabrication, when the process is done by a delta robot instead of by a cartesian robot, the show is even more interesting. However the Rostock was a big machine, not compatible with the space I have available at home. But when I saw Richard's 3DR printers, I thought it was a good way for me to venture into the interesting world of this type of printers. Contrary to the Rostock, the 3DR had a small footprint so I built one. But that was just part of the challenge. Delta 3D printers use three vertical parallel carriages linked by a set of rods to a central platform where the hotend is placed. But contrary to some other printers, those vertical axis are not screw-driven but belt-driven, which allows very fast motion. As a result, Delta 3D prin...

Of pumps and stepper motors

Image
I have been quite busy lately due to several factors. One of them things not working out as expected. Of course every failure is a learning opportunity and this case, my chance to get familiar with the world of hydraulics and fluid dynamics. As a Computer Scientist, you do not get any training on that matter (other than maybe learning about fans for cooling down electronic parts). I have been working for more than a year on a project where the least I was expecting was to have trouble with what it is eating a lot of my time lately: pushing a viscous fluid in a precise, controlled-way, from a container to the printing area of a 3D-printer we have designed and successfully built as part of our research project. If you are familiar with 3D printing, you can think of us trying to create a reliable paste extruder. There are many open paste extruder designs out there, but many are designed for not so viscous pastes or liquids. Others can handle viscous fluids but only a very small amount...

First replication

Image
With some friends we created a project a while ago for developing hardware and software for CNC milling of large 3D sculptures. While one of the ideas was to market the hardware we developed, it does not seem to be a feasible thing to do unless you want to invest a fair amount of cash to get some paperwork done. Not being a fan of paperwork myself and not seeing a clear path to profitability, we have put on hold the idea of marketing such systems. Another way of broadcasting our developments was to make it open source and help people to replicate our system. The problem is that while some people may want to have a cheap CNC machine, many of them are not in the mood of building it themselves. But now we have been working with a company in Rome that is willing to do the extra mile and I am flying over to help them get it working. While we suggested one frame, they have gone more conservative and partially build their hardware around MechMate design, but plan on using our Arduino-b...

Fighting with online shops too

Today I have got one bizarre experience. A few days ago I did shop some parts for a 3D printer I am building but I guess the site was overloaded (or poorly procured) and I got several errors till I got my order through. So I decided to ask the seller about my order since a few days have passed without hearing from them. This is the chat transcript. Start Time:  12/31/2013 00:06:30 End Time:  12/31/2013 00:35:14 Operators:  Jayla Transcripts:    Please wait for a site operator to respond... If you do not want to wait, please click here to leave us a message. Operator Jayla has joined the chat. [00:06:30] Jayla: Hi Miguel Sanchez, I hope you are doing fine. How may I help you?  [00:06:38] Miguel Sanchez: HI [00:06:54] Miguel Sanchez: I'd like to know about my order.  [00:07:32] Miguel Sanchez: It's been a few days and it is my first order from you. But mostly the server was giving me errors while going through the order. [00:07:45] Miguel Sanchez: 26...

New tool for the workshop

Image
A recent query from a local company made me revisit the work I did for reverse-engineering Ademco's ECP bus years ago. I did not get this assignment but I learned this company was buying an inexpensive logic analyzer I have never heard of before. After having a look a the device and its demo software (that works in Windows, OSX and Linux!!) I was sold. Even better was to learn that they do have an educational discount. Next day I bought one Logic8 8-bit USB digital analyzer . It is not a digital osciloscope but a logic probe with 8 inputs. The beauty about the software is that it has built-in several serial protocols (ie. Async serial, I2C, SPI, etc). So going from the signals to meaningful data is time-effective and simple.

You get what you pay for ...

Image
Last weekend I have hosted the fourth edition of a workshop where people build their own Prusa i3 3D printer. Trying to learn from past mistakes I attempted to cover all the basis, but unexpected things always come up.  But what got me really angry was the poor quality of one of the boards we used. Once I realize that boards were like that, I double-checked each one, tracing back with the schematics the different pins involved in any faulty behavior observed. Re-soldering those pins did solve the issues discovered, but it was a painful and time-consuming operation, on hardware you already paid for and expected some QA on. (Well ... don't).  This is the letter I sent to the manufacturer . Hi, In my last workshop I have used 10 of your RAMPS 1.4 boards. In a previous communication I reported 3 out of 10 boards showing some fault. Because of that, this time I checked all the boards in advance. What I saw was a mess: 7 out of ten showed some malfunction. I used several h...

Mini UP! 3D printer, first impressions

Image
A friend of mine recently bought a Mini UP! 3D printer from PP3DP . He was looking for a ready to use 3D printer within a budget and that model was my first advice. Once I have seen and used the printer it meets the needs of my friend and it has impressed me on how easy it was to get the first print. However, it came almost without any instructions so many people may have a difficult time using it until they figure out that an online manual has to be available somewhere. Print quality using defaults is very good and so is printing speed. Not so bright is the way heated bed works in this printer: no temperature sensor is there, so you have no idea how hot it is. Large parts will warp badly unless bed is hot enough and well-leveled. Once you patiently wait for at least 15 minutes for the bed to heat up and level the bed, the adhesion is pretty good and any problems we had before were gone. Still, I do not like the idea of not having an accurate idea about the bed temperature. ...

Programming Teensylu/Printrboard from Linux

I have been testing these two boards as a posible replacement for RAMPS in my 3D printers. Nothing wrong with RAMPS, but these two boards are simpler, cheaper and smaller. But they share a problem: they are not easy to program from Arduino IDE. After a long dance I was able to do in Windows, and I am almost positive same can be done in Linux, but I am kind of tired of trying out things. The bottom line is that because these boards are based on ATMega1286 they lack of a USB-to-serial chip as many Arduino boards do (except Leonardo).  So that means the usual bootloader and protocol are not a choice here. Long ago, Paul Stoffregen developed an Arduino-like board using similar chips and built all the required add-ons so they could be programmed from Arduino IDE. These tools can be adapted to be used in the AT90USB1286-based boards with LUFA CDC bootloader and they work ok in Windows (once you manage to get every detail just right). I was not so lucky in Linux and after some sma...

Teaching Rambo how to print

Image
I could not resist the temptation and I bought a discounted RAMBo board a while ago. Today each attempt to upload some code ended up in a list of messages like the ones below: avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer First idea was that the board might not contain a bootloader, but after using my recently acquired ICSP programmer and obtaining a dump of the ATMega 2560 from the board I could see it was exactly the same as the one from a regular Arduino Mega board.  As it is a new board, there is a chance of being a DOA. But I was surprised that no LED was lit when I connected the USB port. However, I could see one of the LEDs from the serial port (I guessed this is what they were) blinking when I was trying (unsuccessfully) to upload a sketch to the board. I realize that while I dumped the flash memory of the Mega, more LEDs were lit. It then hit me that maybe the only problem was that the board (the v...

My printer port is gone!

Image
After the last change of computer I was asked for help to installed the bootloader on an ATMega 1284P processor for controlling a 3D printer. I have been using for years the Arduino Parallel Port Programmer with great success (it worked every time if I remembered to power the board through USB at the same time). But it turns out my new desktop computer does no longer has a parallel port. Not a big deal as all my printing happens through the network, but it was a no go for any type of other fancy uses of the parallel port (no, I do not have a CNC machine controlled with EMC2, though I have EMC2 software installed in my computer). So I finally gave in and ordered a USBASP programmer that was less than 5€ off eBay and fixes the need for a tool for uploading bootloaders to new boards. It comes with a 10 to 6pin adapter too, which was needed for Arduino boards ISP connection. You can use it from the command line with avrdude program or from Arduino environment selecting USBASP as the...

System upgrade "cloud style"

Image
I have got a new computer for my office. The old system was still up and running and so I was a bit reluctant to replace it, but I finally bite the bullet as I could say no to a free new system. I was running Ubuntu 10.04 LTS 64 bit meaning that no major upgrade happened in the last three years to my system. Over time your system also gathers lots of drivers, small utilities and fixes that you only discover you had them once you've migrated to a new one. So last week I used some time to install Ubuntu 12.04 LTS on the new computer, just to discover it won't wake up from suspend properly. The problem was the graphics card driver (an Intel graphics card in the motherboard chipset). But the only way to get the system back to work (without logging in from another computer) was to reset it. When I asked for help to another colleague he mention he had no trouble at all with a similar system. It turned out he was using Ubuntu 13.04 instead. So after almost a week of small installs I...

Building a mini i3 LC

Image
The first Prusa i3 I built used a 6mm-thick acrylic frame. It worked ok, but when I saw sgraber's design  I thought it will add a lot of rigidity to the acrylic frame. I later bought an aluminium frame and I forgot about the matter. Recently I came across a local business laser cutting acrylic and I decided to give it a go with a similar but smaller design. One of the things I have observed about 3D printers is that they tend to be big. Having a large surface for the print area is nice because you can print big parts, but you pay the price of the printer being bulky. As many of the things I print at home are small parts, I thought I would be a good idea to have a small printer at home and keep the larger ones for larger printers I might have at my office. Of course it is still to be seen whether things will work out this way or not. So I ended up building this smaller sibling of my home Prusa i3. These are the sizes of the rods I have used:  X-axis: 2x265mm smo...