Welcome! Log In Create A New Profile

Advanced

ATMega328 firmware

Posted by mccoyn 
ATMega328 firmware
December 29, 2009 12:05PM
I've modified the 5D firmware so that it will work on an Arduino Duemilanove w/ ATMega328P. To help anyone using a similar board, I've uploaded my firmware to github. [github.com]

I merged my changes with joaz's changes so this will also support Arduino Mega.



Darwin clone, Gen 2 electronics, Arduino Duemilanove w/ AtMega328, 5D Firmware, Pinchwheel extruder
[www.codeerrors.com]
Re: ATMega328 firmware
December 29, 2009 11:54PM
I'm not sure what you changed, but I've been using a Mega for quite some time and all I have to do was tweak the pin assignments and a few assumptive #defines, and the mega worked pretty much out of the box.? It's my DC extruder that didn't work with the standard 5D firmare initially.

Buzz.
Re: ATMega328 firmware
December 30, 2009 08:55AM
The Mega was pretty simple, but the ATMega328 had a bug which had to be fixed. [dev.forums.reprap.org]



Darwin clone, Gen 2 electronics, Arduino Duemilanove w/ AtMega328, 5D Firmware, Pinchwheel extruder
[www.codeerrors.com]
Re: ATMega328 firmware
January 01, 2010 09:36AM
Hi mccoyn,

I just merged your changes. I did some small fixing (checking POWER_SUPPLY_PIN >0, moving extruder heater settings to the pins.h ), maybe you should merge those too.


-------------
FiveD Firmware fork (supports Arduino Mega): [github.com]
reprapsource.com
Re: ATMega328 firmware
January 03, 2010 10:56AM
I'll merge it when I get some time. Right now most my time is spent on hardware issues.



Darwin clone, Gen 2 electronics, Arduino Duemilanove w/ AtMega328, 5D Firmware, Pinchwheel extruder
[www.codeerrors.com]
emt
Re: ATMega328 firmware
January 04, 2010 10:35AM
Hi

Is this firmware for the mega using a stepper or DC extruder?


Regards

Ian
Re: ATMega328 firmware
January 04, 2010 11:09AM
I uses a stepper, but davidbuzz has created a fork from it which appears to support DC motors. [github.com]

Edited 1 time(s). Last edit at 01/04/2010 11:10AM by mccoyn.



Darwin clone, Gen 2 electronics, Arduino Duemilanove w/ AtMega328, 5D Firmware, Pinchwheel extruder
[www.codeerrors.com]
emt
Re: ATMega328 firmware
January 04, 2010 12:57PM
Thanks


It is stepper that I hope to use.
How are you driving the stepper? Using a Makerbot driver?

Is there a schematic of the mega connections?


Regards

Ian
Re: ATMega328 firmware
January 04, 2010 08:48PM
be pre-warned, my fork is buggy, and a work-in-progress.
Re: ATMega328 firmware
January 29, 2011 08:05PM
Hey mccoyn,

I have built a RepStrap Mendel and am currently trying to put together my electronics.

I already have a Arduino Duemilanove with the ATMega328 and want to see if it's possible to use that instead of buying a new Sanguino or RepRap motherboard.

Do you still support your modified 5D firmware? Would you still recommend it?

I pulled it off your Github page and am looking it over but i thought there would be a configuration.h file to configure the firmware for my setup. Did you move those settings to another file, or do i need to just copy the standard configuration.h file into your firmware then make my changes.

Also, where do i put that my motherboard is "4".... (for the Duemilanove w/ ATMega328P pin assignment)

Thanks for the help!
-Drew

Edited 1 time(s). Last edit at 01/30/2011 01:23AM by daufhammer.
Re: ATMega328 firmware
January 29, 2011 09:28PM
I still use this firmware on a regular basis with my ATMega328 board. I believe it is still possible to use an ATMega328 with the latest software and features, but may take some development effort. I haven't been keeping track with the latest for the last 6 months.

There are a few issues that have to do with the evolution of the standard RepRap firmware and software. The parameters.h file was renamed to configuration.h (and merged with pins.h?). You will have to have MOTHERBOARD assigned to 4 in parameters.h. You will also have to make sure the pins are correct in the pins.h file in the section after the line that says "#elif MOTHERBOARD == 4".

The current RepRap practice is to include line numbers and checksums with GCode commands. My firmware forked before that feature was offered and so the software that sends the GCode to the Arduino has to be configured to not send that information. This feature adds robustness and safety in the case of communication errors, or unexpected system resets.

I've been wanting to merge my firmware with the latest version to get the new features for a long time now, but I never seem to have the time to do it.

Edit: I've commited my current firmware to GitHub if you are interested. [github.com]

Edited 1 time(s). Last edit at 01/29/2011 09:35PM by mccoyn.



Darwin clone, Gen 2 electronics, Arduino Duemilanove w/ AtMega328, 5D Firmware, Pinchwheel extruder
[www.codeerrors.com]
Re: ATMega328 firmware
January 30, 2011 01:45AM
Great, thanks for the reply!

That makes sense... so basically to use your firmware with the current release of the RepRap host software it would take some modification/updating.

Unfortunately I don't have the programming knowledge necessary to help in the development otherwise i would! I also just saw your updated firmware on Github too, thanks for updating that. I will grab it and give it a try. I got the previous version you had up earlier today compiled and uploaded to my board and was trying to test it, but i don't have a full electronics setup yet. I do however have my RepStrap Mendel about 90% complete, but wanted to start testing the electronics side of things before i got too much farther.

Right now i basically just have my ATMega328 Arduino, 1 Pololu A4983 Stepper driver & stepper motors. I wanted to test to see if i could get one axis up and running before i invested in 3 more Pololu Drivers and the other electronics for the extruder.

After uploading your previous firmware to my Arduino and getting the RepRap host software communicating on the right COM channel it seemed like the Arduino was getting signals from the Host Software because the Tx and Rx led's would blink when i tried to jog the axis'. Im afraid to plug in my Pololu driver though until i can confirm my firmware and host software are working right though.

Do you think it would be possible to get the OLDER version of the RepRap host software that you are using with your current firmware? That way i could get things up and running until there is further development of the firmware for ATMega328's. Let me know if that is possible.

Also, do you know of any way to test my motherboard without plugging in the stepper drivers? I thought of trying to just plug in an LED or multimeter to each pin to see if it was receiving a signal. (an Oscilloscope would be ideal, but i don't have one).

Also, in Pins.h in your firmware you have "-1" on some of the pins... is this how you were disabling those pins/signaling that those don't exist on the board?

Thanks, i really appreciate the help!
stealth
Re: ATMega328 firmware
February 20, 2011 02:30AM
thanks for your work


with my atmel328

communication error reprap host ver20100207

work nicely ver2010105
Re: ATMega328 firmware
February 20, 2011 03:09AM
sorry...

error with
20110207
20100806

work with
20100719 and older version
Re: ATMega328 firmware
February 25, 2011 01:44PM
If you want a modern firmware and want to run modern Hosts, you should have a look at Teacup Firmware. That works equally well from the '168 (Arduino Diecimila) up.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: ATMega328 firmware
July 24, 2011 06:55PM
will ramps 1.3 work with the ATMega328?
Re: ATMega328 firmware
September 15, 2011 11:43AM
is there potentially a way to mod this for the 328 chip so that you use a port expander chip like the Mcp23s17 so that you don't have to sacrifice endstops and other things for lack of pins? and add a switch on whether or not to worry about the extruder? in the event the controller is on a rig that can mill and print
Sorry, only registered users may post in this forum.

Click here to login