Welcome! Log In Create A New Profile

Advanced

Can't load the boot loader - parallel bit bang gen 7 prusa mendle

Posted by rossfree 
Can't load the boot loader - parallel bit bang gen 7 prusa mendle
November 25, 2011 04:26PM
Hi all,

I'm just stuck. I've spent the majority of two days trying to get a parallel port talking to the Atmega644 to set fuses and load the boot loader. I don't know what else to do. There are so many places this problem could be... my XP computer's parallel port, a possible mistake on my gen 7 board, the cable I made, a typo at the dos prompt... etc.

It relentlessly gives the message:

AVR device not responding, initialization failed, rc=-1

I don't know what else to try.

I've triple checked the gen 7 board. I have 5 and 12 volts where they should be and the traces appear good, all checks good. I've plugged in the serial programming port correctly and checked each wire in the cable from parallel port connector to chip pin... all good there. I've loaded the Arduino files and unzipped the Sanguinololu directory where it belongs in the hardware directory. I've typed the DOS commands as written in the "DAPA" boot loader instructions being careful to type in the correct directory locations for the files called. I ran giveIO and the command window popped up briefly then closed before I could read anything... I assume that it loaded correctly.

I've read everything I can get my hands on. I've triple checked connections, commands typed and restarted my computer to see if that would help. Nothing has helped.

Does anyone have any possible solutions. My machine is built. If I could get past this I'd be printing parts in a couple of days.

I'm ready to be happy! But I'm not yet. HELP!!!

Happy Thanksgiving!

Ross

Edited 1 time(s). Last edit at 11/25/2011 05:15PM by rossfree.
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
November 26, 2011 11:18AM
I flashed mine the same way. I ended up trying 3 different computers. I finally had success on an old dell laptop running windows 2000. I think the main hang-ups are the OS and then the hardware.

These are the two commands that were successful for me.

avrdude -B 8 -p atmega644P -C c:avrdude.conf -c dapa -P lpt1 -U lfuse:w:0xFF:m -U hfuse:w:0xDC:m -U efuse:w:0xFD:m

avrdude -B 8 -p m644P C:avrdude.conf -c dapa -P lpt1 -U flash:w:ATmegaBOOT_644P.hex

I had both .conf and .hex files in the same DIR as avrdude. Yea each computer gave me different errors. One wouldn't connect at all, the other wouldn't flip the fuses right. I still think it was old win2k that did it, as both other computers were XP. Maybe even try 98 if you have a copy around?

Edited 1 time(s). Last edit at 11/26/2011 11:22AM by jkomp316.
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
November 26, 2011 12:00PM
Are you running your Gen7 at 20Mhz? If so I think you want the Gen7 bootloader rather than the sanguino one. Not sure if sanguino supports 20Mhz yet. You add the Gen7 hardware folder to your arduino directory as per directions in the Gen7 package from github, then pick your hardware from the list in arduino software and use arduino to program the bootloader.

Or give up and get a cheap programmer. That's what I did, and after getting everything running I went back and tried the parallel programmer again and it still didn't work. (My initial problem was cold solder joints on the Gen7 board) I think the parallel programmer is so flaky that unless it works for you quickly it might not be worth messing with. For fifteen bucks on ebay you can get a USBTiny or something and ditch the frustration. (How does that compare to two days of messing around?)
Or have someone program the bootloader for you. Where are you at?
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
November 27, 2011 01:15PM
Thank you for the responses!

It has been a weekend of frustration... I currently have only one (of three) computers to program with. Once computer is dead with a suspected bad motherboard, the other has no parallel port (bother). So I'm stuck with the one.

I saw the boot loader hex files for the different chips and speeds... just didn't get that far. Trying to set the fuses first. I think, in the process of trying different things I may have bricked the chip. I need to order a few components from Digikey anyway so I'll order one of them as well.

I've decided to purchase a cheap programmer. That's what happens when you try to save a buck. I live in southern New Hampshire (USA).

I have a MacBook pro that I would like to use to run the Prusa when I'm finished. Hope I can get this working soon.

Thank you for the support!

Ross
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
November 27, 2011 11:29PM
Well if anyone's close they might be able to program your chip for you. (I'm in WA, just thought I'd ask in case you were close.) But I wouldn't do it manually if I were you. Programming through arduino environment with Gen7 support installed is a one step process, no messing with fuses, etc. You just plug it in and hit "program bootloader". With a good programmer that is smiling smiley I tried the parallel programmer first too and got fed up after a while. It makes for too many variables when troubleshooting. That's what Adrian would call false economy or something.
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
November 28, 2011 12:28AM
Have you tried older Arduino18? Or any other operating systems?
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
December 03, 2011 03:03PM
Thanks your your help folks,

I purchased a new atmega 644 and a Pololu USB AVR Programmer. I was able to get it working and loaded the fuses, boot loader and firmware. Now I am wading through the process of determining the right software to run things.

You know... I'm a dang good mechanical designer, a good electronics tinkerer, and I can build most anything... but my brain is in constant overload on the software end of things. I just don't know what to do. I use Autodesk Inventor 2010 forty hours a week and we have a Dimension 3D ABS printer at work that I use every day. I can DO this stuff. But I shut down wading through the software side of things.

There are a lot of instructions for loading this and installing that... but I find that many of these instructions lack a small instruction here or there that may have been overlooked by the writer. Or maybe it's so common place to the writer that it is considered unimportant and not put into the instructions.

I'm doing this alone. I've looked for people in my immediate area and have been unable to locate anyone so this has been a real challenge for me. The machine is built, the board is made and I'm communicating with the computer. I'm ready to see something move!

Ross
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
December 03, 2011 05:21PM
My suggestion would be to load the teacup gen7 branch firmware.

1. Get Gen7 support for arduino and stick the folder in the hardware folder.

2. Select your gen7 config in arduino.

3. Get Teacup gen7 branch. Unpack it and then kill the extra numbers and letters in the name of the innermost folder so it reads the same as the pde file. (Arduino needs to see a pde file in the same named folder) So you should have a Teacup_Firmware folder with the teacup firmware files inside it along with a Teacup_Firmware.pde file.

4. copy and rename the config.gen7.h to config.h

5. same with ThermistorTable.gen7.h to ThermistorTable.h

6. Verify and upload firmware using arduino

7. Install Pronterface (Its by far the easiest IMHO) Maybe try the precompiled version, it may be even easier to install.

8. Run Pronterface and set Serial port and baud rate. (Default baud rate for Gen7 is 115200)

9. Connect

10. Jog to your hearts content

(Every time I start again with a new firmware I always forget to do the renaming in 3,4,5 and I have to beat my head against a vertical object for a while till I remember. )

All the same steps will basically apply to sprinter, other firmwares are not optimized for arduino so you'll have to learn to use make for compiling.
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
December 04, 2011 12:49PM
Got it going Bryan!!!

Thank you! Now I'm trying to get skeinforge running so I can run a dry test with an stl file. Having a bit of trouble figuring out where to put it. Sure is nice to see thing moving!

Thank you!

Ross
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
December 04, 2011 01:00PM
I would suggest SFACT for beginners, I think there are instructions on the pronterface page or maybe the SFACT website. It is actually pretty much skeinforge with simplification. It just gets dumped into a folder in the pronterface directory somewhere. Then to slice, you just open an STL file in pronterface and it runs SFACT automagically. Also once you are ready for tuning remember to check the setting for relative vs absolute positioning. They need to be set the same in firmware vs software. I think SFACT defaults to absolute and teacup defaults to relative, I changed my firmware to match SFACT. Also the newer versions of SFACT and Skeinforge default to mm of filament not mm of extruded plastic "Volumetric" extruder settings, so when you calibrate your steps per mm for the extruder you want to keep that in mind.
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
December 04, 2011 08:25PM
Back at you...

I'm typing on a different computer... don't have the host computer in front of me... but I think it was SFACT that I installed. I don't remember. My brain is jelly. I've spent the weekend on this. Whew!

So... All the motors are wired up and jogging them moves them all in the right direction. That's good. I'm using fairly small steppers but they are surprisingly strong. Very happy about that. No worries there. I've gotten to a point where I can pull in an .stl file and Skeinforge slices it ok. But I didn't have the heaters setup and it would seem to get to a point an stop, waiting for the extruder temperature to reach set point. (I think). I also do not have the end stops wired yet. I'll get to them tomorrow.

So I built a quick and somewhat dirty extruder. Not that dirty. It's a threaded brass extruder tube for 1.7mm ABS filament. It screws up into a 3/4 PTFE rod that is turned with a shoulder that locks into the "x" sled. I'm using a threaded block with the heater resistor and a thermistor. I managed to squirt some ABS through it with the default settings in software.

So here's the new hitch. I connect to the printer, and turn on the heater... and the extruder is heating nicely. When it reaches temp, I press the extrude button and it extrudes ABS then stops. I might hit the extrude button a couple of times and the power light goes off and the power supply goes into standby. Nothing works. So I disconnect and immediately reconnect and turn the heater back on and it heats fine. I can leave it that way and it seems happy. But as soon as I extrude once, maybe twice, it appears to glitch the processor and turns off the power.

I had the same problem earlier with the steppers. If I turned up the current pot on the Pololu boards and jogged the steppers, the processor with quit working and the power light would go out on the gen7 board. I'd disconnect and reconnect and it would work again for one or two jogs maybe. When I turned the current pot down a bit on the stepper boards, things started playing nicely and it seemed to solve the problem.

I think the power supply is allowing the 5 volts to drop below the brown-out threshold and the cpu is shutting down. It seems to be current related. Maybe I need a bigger power supply or maybe just a better one. I haven't put the scope on it... have to drag that out of moth balls, but it appears that pulling too much current is causing the problem. When the extruder temp hit set point, the current would be momentarily shut off of the extruder heater. And that's when I would jog the extruder. But if I continued to jog the extruder when it cooled and the heater came back on, that's when it appeared to shut down the processor.

What do you think. Is this a common problem? In all of the myriad of reading I have done on the rewrap site, it seems I ran across something about lowering the brownout detect threshold to 3.3 volts to resolve a problem. I don't know if it was this one or not.

Anyway I'm pretty excited! The extruded ABS measured about 18.5mils give or take a half a mil. Not too shabby! It's hard to believe it would lay down and melt bond to the layer below without cooling off too much first. We'll see.

I haven't begun to look at settings. I'll need a couple of six packs to get through that... but I'll be sure to check the settings you mentioned. One more thing to learn! Sheesh! This will make you appreciate the ease of installing a purchased program and just pressing an install button on your computer!

You don't know how much I appreciate your help. I can see some light now at the end of the tunnel. Lot's of tweaking I know but I am determined that this thing print like the dimension I have at work! And it will if it kills me!!!

Pictures soon!

Regards!

Ross

Edited 1 time(s). Last edit at 12/05/2011 12:31PM by rossfree.
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
December 04, 2011 09:21PM
Seems like I saw similar symptoms with mine, and vibrating of the axes as they jogged. Most of the problem was due to a very imbalanced load on the ATX supply. I assume you have an ATX supply. You really need to load the 5V line quite a bit to get reliable operation. Here are my numbers for ATX voltages under different loads.

[reprap.org]

As you can see it takes quite a bit more than just the 10 ohm 10 watt resistor listed on the PC power supply wiki page

[reprap.org]

Also I seem to get more reliable operation when I power the board's 5V supply from USB rather than ATX. So try jumpering the USB power option and see if that helps. A ferrite on the USB to serial cable has been suggested elsewhere as well. But get a couple 12V 50W bulbs from the nearest store and try that first. They fit pretty well on an ATX molex connector if you get the kind with the pins sticking out, and jam them between the housing and the sockets.
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
December 05, 2011 03:30PM
I'll be wiring the end-stops tonight and try another USB cable with ferrite. I never thought to switch to the USB supply... will do that as well. Then we'll see. Power supply if I get desperate. Tonight may be THE NIGHT! Whoot woot woot!!!

Thank you Bryan!

Ross


You don't need a parachute to skydive. You only need a parachute to skydive twice.
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
December 05, 2011 03:46PM
No problem, and good luck!
Re: Can't load the boot loader - parallel bit bang gen 7 prusa mendle
December 06, 2011 03:20PM
Quick update:

It turned out to be the power supply after all. I thought it was large enough. Nope... 12volts at 12amps max. Not enough. I changed power supplies to one with 18 amps and the problem went away.

First print this morning... a BLOB! Yeah baby!

ross


You don't need a parachute to skydive. You only need a parachute to skydive twice.
Sorry, only registered users may post in this forum.

Click here to login