Welcome! Log In Create A New Profile

Advanced

New machine, trying to get it moving

New machine, trying to get it moving
August 04, 2012 11:58PM
I designed and built a printer with ~1 cuft build envelope, got myself an Arduino Mega2560 and RAMPS 1.4 board with 4988 stepper drivers and LCD/encoder/SD card module. Arduino is loaded with latest (?) Marlin firmware. Video of it moving here: http://www.rehorst.com/mrehorst/it's_alive.3gp

When I connect the electronics to my computer, run the arduino IDE and open the serial port monitor, I can see G-code that appears to be the Arduino sending commands to the unconnected motors.

When I connect motors but not limit switches (not mounted on the machine yet) to the electronics and power it up, the x, y, and z axes appear to be doing what the g-code previously mentioned says: the x, then Y , then Z axis move about an inch, then move back about an inch and the cycle repeats.

I tried loading pronterface and can't seem to get it to run on my linux machine. I have also loaded replicatorg, and it runs but doesn't display an example model file, so I think I have a java problem. Anyway, it connects to the printer and resets the electronics board when it does, but the control panel can't seem to take control of the board- it just keeps moving x, y, and z back and forth about an inch at a time.

Questions to start, with many more to follow:
1) is the back and forth behavior normal?
2) where is an actual wiring diagram for the ramps board (not a schematic of the board, but an external connections diagram)- should the limit switches connect normally open, or normally closed?

Thanks!
OK Pronterface runs and talks to the printer,
August 05, 2012 08:14AM
but the machine still keeps moving a little back and forth in each axis. I can reset it from pronterface, and I can jog the axes in between the firmware's own x, y, and z movements, but nothing seems to stop it from taking off into the x, y, and z motion routine that is coming from the controller board.

Any suggestions?

Thanks!
Re: New machine, trying to get it moving
August 05, 2012 01:00PM
the factory default current setting of pololu drivers is way too high. Make sure to start at the lowest current setting that will reliably move the motors.

Without getting into the whole explanation of why, it is best to have ALL endstops wired up before testing. Normally open switches can cause false triggers.
Re: New machine, trying to get it moving
August 06, 2012 02:28PM
I tweaked the current pots on the drivers before I ever connected power. They are not an issue.

When I use no endstops, I can communicate with the controller via pronterface. I can see the G-code that is moving the axes back and forth and can inject commands to move an axis.

Here is a sample of the G-code that is driving the axes back and forth:


Marlin: 1.0.0 RC2 - SUMPOD
echo: Last Updated: 2012-04-18 | Author: stohn
echo: Free Memory: 3147 PlannerBufferBytes: 2464
echo:Using Default settings:
echo:enqueing "G90"
echoconfused smileyD card ok
Printer is now online.
echoconfused smileyD card ok
ok T:0.00 B:0.00 @:0
echo:enqueing "G0 X10 F3000"
echo:enqueing "G0 Y10 F3000"
echo:enqueing "G0 Z2 F3000"
echo:enqueing "T0"
echo:Active Extruder: 0
echo:enqueing "G0 E10 F3000"
echo:enqueing "T1"
echo:Active Extruder: 1
echo:enqueing "G0 E20 F3000"
echo:enqueing "G0 X0 F3000"
echo:enqueing "G0 Y0 F3000"
echo:enqueing "G0 Z0 F3000"
echo:enqueing "T0"
echo:Active Extruder: 0
echo:enqueing "G0 E10 F3000"
echo:enqueing "T1"
echo:Active Extruder: 1
echo:enqueing "G0 E0 F3000"
echo:enqueing "G90"
echo:enqueing "G0 X10 F3000"
echo:enqueing "G0 Y10 F3000"
echo:enqueing "G0 Z2 F3000"
echo:enqueing "T0"
echo:Active Extruder: 0
echo:enqueing "G0 E10 F3000"
echo:enqueing "T1"
echo:Active Extruder: 1
echo:enqueing "G0 E20 F3000"
echo:enqueing "G0 X0 F3000"
echo:enqueing "G0 Y0 F3000"
echo:enqueing "G0 Z0 F3000"


etc...

If I connect an endstop switch (NC, Signal to GND) or just install a jumper on the RAMPS board, the motion in that axis makes the machine step away from the jumpered endstop- i.e. if I jumper the minimum end of an axis, that axis will step about an inch at a time toward the maximum end. If I put endstop switches (or jumper the board) at both ends of an axis, the motion in that axis stops, though it seems to be trying to do something because the motor clicks.

When I connect ANY endstop switch switch or jumper, I lose the ability to connect to the controller with pronterface. I no longer see the G-code making the machine step and I can no longer send any commands to the controller.

Any ideas? Anyone?

Thanks!
Re: New machine, trying to get it moving
August 07, 2012 04:28AM
Are you sure the endstops are wired correctly? Your description sounds like the endstops short 5V to GND.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: New machine, trying to get it moving
August 08, 2012 01:23PM
I'm wiring the endstops with the switch normally open and the signal line connects to ground when the switch closes.

According to a few sources on the web, the Mega 2560 has on-board pull-up resistors that are enabled by default in Marlin. Than means the ports are looking for a transition from hi to lo to signal an event such as an endstop.

I also find info that says that the default endstop configuration in Marlin is a NC switch, not NO. Maybe the cycling back and forth behavior the "bump the end stop, back off and creep up on it again" type behavior. I'll try wiring the switches NC or invert the logic in the config file for Marlin and see what happens.
Another problem
August 10, 2012 04:56PM
nevermind...

Edited 2 time(s). Last edit at 08/10/2012 05:16PM by the_digital_dentist.
Re: New machine, trying to get it moving
August 28, 2012 12:29PM
I found the problem- first the controller was flashed with firmware for some Chinese printer that for some reason makes the axes hunt back and forth. I DL'd the latest Marlin, edited the config file for my machine, then tried to compile the firmware so I could flash it to my controller. That's when the real trouble started. The Arduino IDE refused to compile. After trying several versions of the IDE I finally settled on 0022 because that's the one that the Marlin author used. This begs a couple questions from someone who doesn't develop software:
Why would someone develop the latest firmware using an outdated version of the IDE that is incompatible with the latest version of the IDE?
Why would the people who develop the IDE release a new version that breaks stuff developed on a previous version but keep the same name (to me it is a different product- call it something else!)?

Fortunately, a fellow milwaukee makerspace member has some good kung-fu and was able to trace the problem in about 10 minutes. It seems that a mathematical function called "round" was defined in two places and the compiler didn't like that. The solution was to comment out one of the two definitions, after which the compiler ran just fine. I was then able to upload my modified firmware to the Arduino and get the machine running.

Video of the machine "printing" the last few layers of a calibration cube here: https://vimeo.com/47444530

I am now waiting for delivery of my dual extruder from the kickstarter people so I can move forward.
Hello,

we seem to have the same problem here, motors are only going back and foreward. Do you know what was changed in the software?

Kind regards,

Max
Re: New machine, trying to get it moving
January 30, 2013 10:41PM
Hello everybody,
I have the same issue
unfortunately i don't understand a word of what you have done to resolve it...
can you explain it to me like if i was a 2 year old child winking smiley ?
kinda step by step thing?
thanks

Manu
Re: New machine, trying to get it moving
January 31, 2013 04:48AM
It sounds as if the boards are coming with the "test" firmware on them, rather than the actual Marlin/Sprinter/Repetier firmware, which I think is a great idea.

First off, the test firmware is available here:
[reprap.org]

What this firmware does, as long as the arduino has power, it will move your Axes back and forward a bit, exactly as everyone has described.

This shows your wiring and power is working correctly

I have recommended using this firmware to a number of people when things aren't working at all.

The problem is, the full firmwares have lots of safety checks in place -- that is, you can't drive past an endstop, if it can't correctly detect the temperature of your hot end or bed it shuts everything down and expects the problem to be fixed and a reset code to be sent (prevents fires). Couple that with, the regular firmware programs don't do anything without being told to do it via a computer.

When you power your printer up for the first time and it does not work, the big question is where is the problem?

Is everything working, except your computer connection so you can't command it to do anything, therefore it sits there and does nothing?
Is there somethign wrong with your endstops, such that the MAX and MIN are being triggered at the same time, therefore the printer thinks it cant move at all, and is doing nothing?
Is there something wrong with your hot end thermistor, such that it cannot detect the current temp and has shutoff via the built in safety switch?
Did you accidentally define you have two hot ends, and you only have one, and it cannot detect the current temp of the second hot end, and shuts down?
Did you not hook your motors up correctly and it is trying to move but not?

That's a lot of possibilities to try and diagnose, and all the outputs are the same, namely a printer which does not move or respond.

Now the test firmware does not care about endstops, it does not care about the hotend thermistors and it does not care about host communication.

In the situation above, with the test firmware loaded, if nothing is moving then you have a wiring or power issue. If everything is moving, then you know at least your wiring is good and working, and can proceed with the next step, connecting your computer. If the communication is working, you can see some debug output of what it is doing, to check if the communication is working.

If this is all working, then you can proceed and load the "real" program on. Seeing as you usually have to change your configuration.h file to customize it for your printer, you have to install the firmware anyways, so your supplier is not saving you any trouble by shipping it with the default firmware on it already.
Re: New machine, trying to get it moving
January 31, 2013 09:05PM
thanks,
i have more questions....
where do i find the "real" program?
i ran so many randoms tests that now, nothing works anymore.... and a green LED blinks...
Re: New machine, trying to get it moving
February 01, 2013 01:26AM
The real program depends on what you want to use, you have choices!

I use Marlin
[github.com]

A few people I know use Repetierhost
[www.repetier.com]

A complete list is
[reprap.org]
Re: New machine, trying to get it moving
February 02, 2013 09:30PM
I finally managed to instal marlin, thanks
But of course I have more issues...
Error 0
: Extruder switched off. MINTEMP triggered
And my hot end is not heating anymore...
But it's probably not part of this topic winking smiley
Re: New machine, trying to get it moving
February 03, 2013 03:51AM
Which is precisely why I recommend the test firmware first winking smiley Now you know your printer would move, if it could!

This is the case I mentioned,
"Is there something wrong with your hot end thermistor, such that it cannot detect the current temp and has shutoff via the built in safety switch?"

You have triggered the built in safety switch, since marlin can't detect the temperature of your hotend it refuses to do anything (prevents fires and hot end failures)

In the Configuration.h of Marlin, what did you set as your temp sensor? Look for this line:
#define TEMP_SENSOR_0 7
where "7" is my value (yours might be different - check wherever you got your hotend from they should provide which thermistor it is)

If this is correct, you need to check your wiring. Is the thermistor to RAMPS plug correct (no breaks in the wire?) You can check this by using a multimeter and testing the resistance of your thermistor. You will get a different value depending on the thermistor (hence the table above), but it should change if you test while blowing on the hot end or doing something that will change the temperature. If you have an open circuit ( 1 - - - on my multimeter) or a short circuit ( 0.000 on most multimeters) then check your wiring.

If this is correct, next question is it hooked up to the right pin set on the RAMPS board? Referring to this diagram:
[reprap.org]

you want to hook it up to T0, which is just slightly above where you hook the Z motor hookups to.

I hope this helps!
Re: New machine, trying to get it moving
February 03, 2013 07:20AM
mitchese: You have triggered the built in safety switch, since marlin can't detect the temperature of your hotend it refuses to do anything (prevents fires and hot end failures)

How do you know this and how would someone who doesn't find it out? Is there some documentation that tells how Marlin works, including safety switches, etc., or do people just have to dig through notes in the source code? I think a lot of problems would be solved for a lot of people if there was a simple summary somewhere that says "when Marlin starts up it checks this, and this, and this, and if all is well it does this, and here's what happens if it detects this problem..."
Re: New machine, trying to get it moving
February 03, 2013 08:38AM
Documentation I am not aware of, but the problem is there is no "official document"

If you search the forums, or just do a normal google search for "marlin mintemp triggered" you soon discover it is a problem with the thermistor not behing hooked up (the other issue is maxtemp triggered, which is a short circuit).

The problem is, there are tons of different hot ends, different hardware, different firmware, and each "difference" introduces more things that could go wrong. I know this because a year ago with my printer, I had a loose wire and the printer stopped right in the middle of a print due to mintemp. The thermistor wire had fallen out of its connector.
Re: New machine, trying to get it moving
February 03, 2013 10:11AM
Hey thanks a lot!!
i was really lost on this one
i realized i haven't define the motherboard nor the thermistor......
your advices were very very helpful!
i might need some help later but for now i'm good
thanks

Manu
Re: New machine, trying to get it moving
February 03, 2013 12:32PM
How do people program/debug/apply this stuff without any documentation? When I learned programming about 40 years ago (silent 700 terminals on a PDP-11, Fortran IV), we were taught to make diagrams before we ever started writing code. When I do PIC projects in assembly, I still make diagrams and review them frequently to optimize things before I write any code, and then physically order the code to match the diagram and load the source code with notes to make debugging easier.

Searching through forums is a sucky way to have to find out how to get something working.

I'm just sayin'...
Hi Guys,

I'm very new to the 3D printing World and I.m intersted in this Test Firmware but when I extract it there's no pde file? Is this something I need to edit outside of arduino ui and import?

I have RAMPS 1.4 and have managed to flash a few different firmwares to it so far but having some troubles defining all the setting.( hot bed mainly) Again, very new to this. I get the just of it and have made a few changes with success but I think this test firmware would be the way to go in my building/testing phase.

I should mention that I'm building this entire 3D printer from scratch. No kits, no borrowed designs. I'm more of a fabricator than anything else but understand electronics and computers well but the programming is not my strong point. I have built a few other semi automated machines from scratch so im confident I can tackle this with a little advice from the RepRap community.

Can someone tell me what I'm doing wrong with the test firmware?

Any info would be awesome. I'll be happy to contribute any knowledge or info I have or gain.

Thanks
Re: New machine, trying to get it moving
February 05, 2013 12:49PM
when i extracted the RAMPS14test file i got 2 files : ramps14test.ino and thermistortables.h
i ran the .ino one and it works for me
but just like you i'm very new at 3D printing...
Re: New machine, trying to get it moving
February 05, 2013 04:17PM
.ino and .pde are both arduino "projects". A while ago (few years maybe?) arduino switched from .ino to .pde -- this test firmware was written before the switch.

If you open the .ino it will be converted to a pde which is (I think) simply renaming it. If that doesn't work, just rename it to pde and you should be good to go.

--edit-- and good luck with your printer, if you get it working then props to you! I hand soldered my RAMPS 1.4 board and somehow with the SMD components (my first time soldering SMD) I created a short between VCC and ground. I then traced this around for a week, fixing 3 other shorts inbetween, and eventually gave up!

Edited 1 time(s). Last edit at 02/05/2013 04:19PM by mitchese.
Ohh ok, I'll give that it a shot. Thanks

I'm learning all these commands and what they do my self with only the help of doc's and forums. I think i get 90% of it but I'm lost with setting the hot bed config. with one version of sprinter I found the bed powers on but wont turn off (probably something to do with my thermistors because they are only temporarily attached for testing)

Can someone recommend what firmware would be best as a base to start with in setting up all the parameters for a "home made" printer? I see alot of people are most interested in marlin but thats the one I'm having the least luck with so far.
Sorry, only registered users may post in this forum.

Click here to login