Welcome! Log In Create A New Profile

Advanced

Gen7...Some Issues

Posted by icius 
Gen7...Some Issues
April 26, 2011 01:44PM
Hello all,

I have been working hard the past few weeks to get a Gen7 board etched and built. I was finally able to finish building it and am now trying to flush out some issues.

I was successfully able to load the Bootloader to the board and I have also loaded the Teacup firmware to the board using the Arduino software. Specs are as follows:

MCU: ATMega644
Stepper Controllers: Pololu A4983
Stepper Motors: Pololu SY42STH47_1206A

Reprap Host Software Version: 20110207
Teacup Version: ee48186

I have attached the config.h file I'm using with Teacup.

I went about trying to test the four stepper motor controllers using the Reprap Host software. I originally made an error as I did not fully read the instructions for the A4983 stepper controllers. I had not set the Trimming Pot correctly before I plugged in my motor on the X axis. So the motor got quite hot and was quite noisy. I'm hoping I didn't damage it.

Once I got the Trimming Pot on the controllers set correctly I retried the test on the X axis. I'm getting movement when I Home or set a specific X distance in the Reprap Host software.

I got the same result with the Y and Z axis. However, in each axis the motor seems to only want to turn one way. I tried testing this by "nudging" it in both directions. Not sure if this is a result of the software or perhaps I damaged my motor.

I then plugged the motor into the Extruder controller thinking that if I clicked the "Extrude" button in the host software I would get some motor movement.

When I clicked the Extrude button, the host software froze, and the stepper controller for the Extruder turned into a burning ember complete with smoke!!

Not exactly the result I was looking for. So I'm mourning the loss of my A4983 and trying to figure out what the hell happened.

I am rechecking my board and solder points to make sure I don't have any unwanted bridges.

I am a bit dismayed as it seemed like the Gen7 board was a great option for etching my own and saving some $$$, but exactly which Firmware and settings will let me use it seems to be a bit of an enigma. Now I'm afraid to plug a new A4983 back in that slot if this is indeed a software issue.

The best I have been able to find in my searches is "well if you use this config with this Firmware you should get the motors to move". Getting the motors to move and having a fully functioning RepRap is quite a large leap in my opinion.

If anyone is successfully using a Gen7 board with their RepRap, please let me know how you got there and what Firmware/settings you used.

Any and all help is greatly appreciated.
Attachments:
open | download - config.h (19.1 KB)
Re: Gen7...Some Issues
April 27, 2011 06:04AM
Yes, getting from "something works" to "everything works" is a bit more than just clicking a button. Firmware is currently the weak spot of Gen7, as there is no "do this to make everything work" procedure yet. I hope to get some help (and feedback!) from the community to single out the missing spots, so the result can be incorporated into Teacup and perhaps FiveD.

Please find attached a version od Teacup and FiveD, both said to run successfully on the Gen of their creators. Both also have a slightly different pin layout, though.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Attachments:
open | download - Teacup_Jacky2k-Gen7.tar.gz (46.3 KB)
open | download - FiveD_Stoffel15-Gen7.zip (51.8 KB)
Re: Gen7...Some Issues
April 28, 2011 11:01AM
Traumflug,

Thanks for the quick reply and thanks for posting the sample code. I hope I didn't sound too down on Gen7. I think it is an awesome effort and I really appreciate the personal time you have put into it..

I decided to strike out on my own and see what I could do with a Gen7 version of FiveD. I have pulled the latest FiveD code off of Sourceforge and created my own repository at Github.

I am trying to tread very lightly in the FiveD code in the hopes that some day the changes may be integrated back into the main code. Feel free to checkout what I've done so far at:

Git Repository

I was able to get Gen7 specific sections in several files and have successfully compiled it with Arduino using your Gen7 hardware definitions (i.e. Gen7 Arduino IDE Support package)

I am still using the bootloader you provided as well.

I struggled with the code for a while as it seemed like no matter what I did, it was not reading anything out of the buffer when I sent a command over the serial line. Even small test programs that basically just echoed back what I sent in via serial terminal didn't seem to recognize that anything was sent.

I'm not sure what prompted me to do it but I ended up looking at the Gen7/cores/arduino/HardwareSerial.cpp file. In it I found the following block of code:

   #if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1280__)
   ISR(USART0_RX_vect)
   {
     unsigned char c = UDR0;
     store_char(c, &rx_buffer);
   }
   
   ISR(USART1_RX_vect)
   {
     unsigned char c = UDR1;
     store_char(c, &rx_buffer1);
   }

As I am running a 644 not a 644P essentially it appeared that no interrupt trigger for receiving serial data on port 0 was being set for my mcu. I modified the code as follows:



   ISR(USART0_RX_vect)
   {
     unsigned char c = UDR0;
     store_char(c, &rx_buffer);
   }

   #if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1280__)
   ISR(USART1_RX_vect)
   {
     unsigned char c = UDR1;
     store_char(c, &rx_buffer1);
   }

Once I did that my serial line test programs worked fine and I was able to confirm that FiveD was receiving commands and at least "partially" processing them.

Now I am tracking down an issue where the following line of code in process_g_code.pde seems to be hanging.
talkToHost.sendMessage(SendDebug & DEBUG_INFO);

I wondered if you could think of anything else that might be 644P specific that I may need to modify for 644. It seems that all talkToHost commands are hanging. Any thoughts you have would be most welcome.
Re: Gen7...Some Issues
April 28, 2011 11:09AM
In case anyone is interested. I am using Putty as my serial terminal to manually send commands to the FiveD firmware. See the attached files for the settings I have found to work.

I am using this USB to TTL cable for all Serial communications:

USB to TTL Cable

Edited 1 time(s). Last edit at 04/28/2011 11:13AM by icius.
Attachments:
open | download - Screenshot.gif (37.9 KB)
open | download - Screenshot-1.gif (38.5 KB)
Re: Gen7...Some Issues
April 29, 2011 04:29AM
Quote

I hope I didn't sound too down on Gen7.

Not at all. This is how open source works. Sure, I could continue to develop all the details before getting anything to the public, but such behaviour whould hobble RepRap substantially. Especially, if others whould do so as well.

#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1280__)
Well spotted. Perhaps even better whould be to check for features instead of checking for specific ATmega variants:
#ifdef UDR1
   ISR(USART1_RX_vect)
...
This way you catch all current and future ATmegas, as UDR1 is only defined for those actually having an UART1.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen7...Some Issues
May 02, 2011 05:04PM
I am just starting out to make the Gen7 electronics but feel there is something wrong about the FET circuits to drive the heaters.
First off it uses an IRFZ44N FET and this will not fully turn on with 5V, the data sheet seems to indicate 6V.
Secondly there is a 1K resistor in series with the base. This is designed to protect the driver circuit from excess current but this is too high. The result will be that the FET will take longer to turn on thus spending time in the transition region where heat dissipation is very high. Therefore it will get hotter than it needs to be.
A value of 100R is sufficient to protect the processor and minimize the turn on time.
I am currently looking for a proper logic level FET and will post back when I find one.
Re: Gen7...Some Issues
May 08, 2011 10:58PM
Grumpy Mike Wrote:
-------------------------------------------------------
> I am currently looking for a proper logic level
> FET and will post back when I find one.

IRL3803 is lovely! got mine for peanuts at futurlec, although I'm told they're rather expensive at other retailers. Anything with an Rds(on)@Vgs=4.5v of around 10R will be perfect.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Gen7...Some Issues
May 09, 2011 02:37AM
> Anything with an
> Rds(on)@Vgs=4.5v of around 10R will be perfect.
I think you mean 10mR...
Re: Gen7...Some Issues
May 09, 2011 07:01PM
rebecca.palmer Wrote:
-------------------------------------------------------
> > Anything with an
> > Rds(on)@Vgs=4.5v of around 10R will be perfect.
> I think you mean 10mR...

Ah yes I certainly do, thanks for picking that up!


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Sorry, only registered users may post in this forum.

Click here to login