Thursday, 30 August 2012

Less painless upgrade...

Arduino 23 software about screen
Arduino Version 23 For Marlin
I checked the latest release of Marlin this week and found that there has been an update. Having spent a little effort on getting Windows XP to run at 250000 baud, I elected to go for this upgrade on Huxley #710.

I am getting more confident with the Arduino platform as I now have some Arduino Leonardo's to play with and connected them to a Nokia 5110  LCD module from Sparkfun.

The Marlin software compiled and the upgrade went well, without any hitches. Then I looked again this evening on github and there is another upgrade available.  I don't think this affects me, so I am going with the version I have for the time being as I have a queue of printing to get done; including more requests for Minecraft Creepers.
Minecraft Creeper - Huxley #710 interpretation

The Windows XP 250000 baud tweak has been solid so far and its great for debugging, not having to worry about the baud rates of the Arduino software and the Marlin firmware.

I also posted an issue on the Marlin github site;  spelling correction only for today to see how these things work; as I get to grips with the structure of the Marlin code.

I have acquired some ATMega 1284PU parts this week to allow me play with larger software footprints at some point in the future. Perhaps LCD displays. I hope to try loading the boot loader onto these soon ready for playing.

The nasty surprise last weekend was the McAfee firewall issue that blocked the internet on our computers. I had to re-install McAfee on all the computers which took some time to say the least! Second time McAfee has mucked up. If you want to check the BT (British Telecom) service status you might try here. My solution was to use the McAfee MCPR tool to remove the McAfee software. On one Windows 7 installation (32 bit) this mucked up the machine so much I had to repair the installation from the Windows 7 disk. Not much printing as at result of McAfee's dogs dinner of a release, coupled with BT's lack of information to customers. The McAfee product is bundled in at the price of the Total broadband package giving up to 7 machine installations.

Tuesday, 21 August 2012

Maintenace weekend...

This weekend Huxley #710 needed some maintenance.

The most important issue to arise was failure of the heated bed soldered joint power connection. Huxley #710 was printing my latest masterpiece which is one of the largest prints I have ever designed. It's 91 mm in diameter and 38 mm tall. Of course that details none of the complexity in the part which is one of three mating parts that are required to fit together quite precisely. The interconnection between the mating parts is a three feature bayonet fixing at a 120° spacing on the diameter. If time permits I will mock up an example at some point.

Huxley heated bed PCB 3 way terminal block
The issue was that the heated bed started sparking and smoking during this rather complex and long 4 hour print. It transpired that the terminal block pin had fatigued and a dry joint occurred between the PCB pin on the power terminal and the PCB track. With the considerable current running through the table, this sparked quite nicely! Smoked, as the solder resist was cooked black and melted the solder due to the energy involved. The solder was boiling! All in the space of less than 20 seconds, it took me that long to decide not to shut down the print but only switch off the heated bed and allow the print to continue. By chance, I had safety glasses on.

Huxley #710 heated bed terminal block solder pad repair
The repair / replacement of the PCB track; as there was no copper pad left due to the heat. Was to remove some solder resist from good PCB track further down the PCB towards the heated bed and use some solder wick braid to create a bridge between the pin and PCB. To secure the Terminal block in place I super glued the 3 way terminal block to the PCB prior to soldering the joints. I have previously found super glue to be OK provided that the temperature does not get in the region above 95C. Taking super glue above these temperatures is not a good idea as I believe it gives of cyanide gas. Whatever it gives off I can tell you it's not good and should be avoided.

The root cause is straight forward to understand, as you have no doubt guessed from the picture of the power connection to the table. The PCB 3 way screw terminal is essentially exposed to a side force. In fact, thousands of times as the table moves back and forth. It's likely that the PCB 3 way screw terminal was not seated correctly and so after around 300 meters of printing, the soldered joint was the weak point and turned into a dry joint. The rest as they say is history.

To improve the situation the connection to the heated bed might have to be made in line with the direction of travel and additionally perhaps the cable clamped to the PCB to offer a strain relief.

So Huxley #710 sprang into life again and then maintenance incident number two occurred

Z coupling detachment
Both Z couplings had become loose and were no longer attached to - well anything. So I reconnected the Z couplings and re-aligned the system, which I have developed some proficiency in now.

I am starting to think I may be a heavy user of my RepRap Huxley.

Another project spin off - Nokia LCD CAD STEP model
Spakrfun Nokia 5110 LCD Display
One of the things I have been working on for the project is a display housing for a Nokia 5110 84 x 48 pixel LCD display from Sparkfun. The unit was actually acquired from Proto-Pic as we don't have a Sparkfun in the UK.

So if you would like a CAD model of the Sparkfun Nokia 5110 LCD display

Sparkfun Nokia 5110 LCD Display CAD model

Saturday, 11 August 2012

Marlin - Re-upgrade @ 250000 Baud...

Having previously upgraded Huxley #710 to Marlin, I wanted to tweak the software and perhaps add some features of my own to the software. Marlin prefers a communication rate of 250000 baud and of course to do any software modifications it would be neat to monitor the device at 250000 baud in the Arduino IDE (Integrated development Environment). Unfortunately it appears there is a disconnect between Ponterface (Python and its serial support package) baud rates and Windows operating system standard baud rates.

In performing the upgrade previously, I had issues with the upgrade process based on incorrect use of the Arduino IDE release 1.0. Having picked up a tip from the e-Maker shop forum, I switched to the Arduino 23 IDE. With version 23 of the Arduino IDE I managed to install Marlin.

So today I thought I would document the process, which includes documenting the special tweak required to allow Windows XP operation at 250000 baud which is the preferred baud rate for Marlin.

Sanity warning - Playing with the windows registry should be done with a little care and backups taken.

Configuring Windows XP For RepRap Marlin At 250000 Baud
This covers the following hardware configuration: -
  Windows XP (SP3)
  Marlin ( ErikZalm / Marlin )
  Huxley ( eMaker )
  Sanguinololu board 1.3a ( RepRap Wiki )
  FTDI application note ( AN232B )
  Arduino (version 23)
  Pronterface ( eMaker Sources )

You have, or want to use, Marlin with a communications rate of 250000 baud but don't have 250000 baud as a selectable data rate in your serial communication parameters. Arduino IDE version 23 is installed. The operating system is Windows XP with Service pack 3.

Arduino Environment
Starting with the Arduino environment looking for a communication rate of 250000 baud shows a screen similar to that shown below.

Arduino IDE showing maximum baud rate of 115000 baud
Notice how in the Arduino IDE, COM3 which is connected to Huxley #710's FTDI USB to RS232 serial chip; that the maximum board rate available is 115000 kilo baud.

At first site, having previously set the data rate in a Marlin upgrade you would not be able to communicate with Marlin at 250000 baud.

Clearly the screen shot shows that Marlin has rebooted and data transmission has occurred. But the data rate is shown as 300 baud.

- Welcome to the world of data rate aliasing.

What we need to do is configure the Windows XP operating system to handle 250000 baud in some way that the Arduino IDE (and other software such as your own) can use. The Python serial software library is obviously not using the Windows registry for its serial parameters or we would not have this data rate disconnect between Pronterface and Arduino IDE.

The FTDI application note AN232B describes in some detail how this is done. Essentially you can use one of the existing Windows registry entries at a rate other than the standard rate by adjusting entries in the windows registry using REGEDIT.EXE.

If one follows the calculations for a baud rate of 250000 a setting of 0C 00 needs to replace one of the default settings in the registry. I chose the 300 baud entry as described in an example in the application note.

Example registry entry to be modified

 From the application note the calculation is
3000000 / 250000 = 12
as the values will be displayed in hexadecimal format this means that we use 0C. There is no 'sub integer divisor so we use 0C 00 00 00. This value replaces the value for 300 baud which is 10 27 00 00.

The image on the right shows the relevant key for my FTDI USB entry in the Windows XP registry which is set as COM3.
Typical entry: -

Modifed to: -

Example of modified registry entry to allow aliased 250000 baud rate
 Then: -
  Reboot the computer
  Restart the Arduino software
  Select the Arduino serial monitor function
  Select 300 baud on the COM port that the FTDI chip is using (COM3 in the example)
  Reset the Sanguinololu board
  Approximately 6 seconds later the boot message should be shown (see first image in this post)

The 300 baud entry now should be running at an aliased rate of 250000 baud.
To upload new firmware to the Sanguinololu board: -
  Compile it in the Arduino software
  Press and hold the reset button on the Sanguinololu board
  Select the upload function in the Arduino software
  Arduino IDE display 'Uploading to I/O Board'
  When the software displays 'Binary sketch size: XXXXX bytes (of a 63488 byte maximum)'
  Release the Sanguinololu reset button
  The software will transfer the compiled code to the Sanguinololu board
  Arduino software should display 'Done Uploading'