Welcome! Log In Create A New Profile

Advanced

Ramps with arduino AND parallelport?

Posted by thetenter 
Ramps with arduino AND parallelport?
December 28, 2010 09:30AM
Hi all,

As this is my first post I'd like to introduce myself and say hello at first. I'm from Switzerland and passionated hobbyist (don't know if this is the right word in english). My brother, father and me have built 3 CNC-machines the last two years and still can't get enough of them.
This summer I came along the whole reprap stuff and was blown away... I knew, i have to build such a cool machine.

The last months I've built a repstrap (without extruder) with RAMPS electronics. It works quite well both with replicatorg/5d firmware and hydra-mmm firmware/host software.

Now my problem. As I want to do printing AND milling stuff with the same machine/electronics and I'm comfortable with mach3, I'd like to add the possibility of parallelport communication to my RAMPS electronics.
Printing: USB -> Arduino -> RAMPS
Milling: Mach3 -> RAMPS

Is this possible and when yes, how?

I've tried to wire the parallelport correctly to the shield, but nothing is working at all. When I measure the voltage between the pins is just 1V although it is 5V on a simple test LED circuit.. Maybe this is an issue.

Have you guys any idea how it could work?

Sry for my english and thanks for any reply.

Greetings,
Joscha

Edited 1 time(s). Last edit at 02/14/2011 05:44PM by thetenter.
Re: Ramps with arduino AND parallelport?
December 28, 2010 03:49PM
This might not be workable without some sort of switch - leaving the mega's pins directly connected to the parallel port may not be the best idea. You could do it with a breakout board though - something that you'd plug the RAMPS shield into that has a DB25 connector on it, correctly connected to rows of pins that imitate the mega's.

It'd be easier to go the other direction - get one of those five-axis stepper drivers with a parallel port interface. Plug into it directly for EMC2, and pull the step/directions pins off the mega into a db25 connector. Make it much easier to switch, as you're using a connector actually designed to be repeatedly plugged an unplugged by the end user.

The third option would be to ditch the mega for stepper control completely. Use EMC2 to control all four steppers, even when printing. Use a "custom M-code" command (see EMC2 docs) to send heater control stuff via the serial line to the mega, which still controls the heaters (though that's all it does). This has been done, and is a fairly "standard" way to do things. You get all the advantages of EMC2's advances acceleration and path-planning capabilities.

see: successful implementation by casainho
see: Reprap Wiki Page about EMCRepRap


--
I'm building it with Baling Wire
Re: Ramps with arduino AND parallelport?
December 29, 2010 11:31AM
thanks for your advice.

I also thought of an EMC2 and extruder board combination. Maybe I should follow this idea.

There's just one thing I don't understand. If I use the pololu shield without an arduino and try to send signals from Mach3/EMC2 via DB25 connector to the correct pins on the shield there is no reaction at all. My idea was that it shouldn't matter if the 5v signal was sent by an arduino or by a DB25 connector as long as the pins are connected correctly... Is my idea just wrong because the two type of signals are just not the same or do I make another fault?
Re: Ramps with arduino AND parallelport?
December 29, 2010 12:25PM
No the idea is not wrong that should work. Did you drive the enable signals low?


[www.hydraraptor.blogspot.com]
Re: Ramps with arduino AND parallelport?
December 29, 2010 02:57PM
no I didn't, do I should?

I plugged in the 12V from the power supply and an output pin of the parallelport to the +5V pin of the shield.
Pin 2 (DB25) -> Pin 28 (X_dir)
Pin 3 (DB25) -> Pin 26 (X_step)
Pin 8 (DB25) -> Pin 24 (X_enable) (set to HIGH)

->nothing at all..
Re: Ramps with arduino AND parallelport?
December 29, 2010 04:55PM
Enable is active low with a pull-down so you need to either not connect it or drive it low. Driving it high will turn off the motor.


[www.hydraraptor.blogspot.com]
Re: Ramps with arduino AND parallelport?
December 29, 2010 07:01PM
friend know that this is not the right place for you this more
I ask you please send me the firmware that you
used on ramps'm riding in my project aki
Brazil but I do not understand that part of firmware
atravez of replicatorg. Thank you and I'm waiting.
can send me e-mail
danielramoseraquel@gmail.com
Re: Ramps with arduino AND parallelport?
December 29, 2010 07:41PM
Have you checked this for arduino mega with db25 for ecm2, with firmware etc:

Hydra-MMM [cpwebste.blogspot.com]


/drool

smiling smiley
Re: Ramps with arduino AND parallelport?
December 30, 2010 07:17AM
@nophead: This explains alotsmiling smiley I'll try it asap and let you know if it works.

@ danielramos: If I understand your post correctly, you search for a firmware working with replicatorg and RAMPS, right? I've used the Hydra-mmm firmware together with its host software -> works fine, but you have to change some codes (pins etc.). Recently I tried the 5d firmware for RAMPS (https://github.com/ramps/FiveD_for_RAMPS_GCode_Interpreter) and it works fine with the reprap host. With this firmware I could also connect to replicatorg and jog the axis'/run the extruder, but I wasn't able to print, because after the warmup commands replicatorg crashes every time. -> I've no working firmware for replicatorg.

@noobman: I've tried Hydra-mmm firmware & host for milling and it worked great. But with the DB25 communication I hadn't any success. As the Hydra-mmm firmware works with thermocouples instead of thermistors, I'll follow the "official" 5d firmware until I find some time to change the Hydra-mmm firmware.
Re: Ramps with arduino AND parallelport?
December 30, 2010 08:16AM
well with the advice from nophead I got some voltage on the coils of the stepper, but it is way too low and the steppers don't move. For some reason the 5V inputs from the DB25 are just 3.2V when I plug them in.
Re: Ramps with arduino AND parallelport?
December 30, 2010 09:16AM
You can't make a meaningful voltage measurement on the steppers because it is a high frequency chopper circuit. It is the current that is relevant and that is set by the preset pot on the Pololu boards.

Although 3.2V is marginal for the Pololu inputs when they have a 5V power supply, I would still expect it to work, but with poor noise immunity.

You could try adding pullup resistors, but I doubt the logic level is your problem.


[www.hydraraptor.blogspot.com]
I don' t know what your hardware and software exactly does, but it seems that you are trying to connect to outputs (parallel intf) together. If one of the outputpins is currently driven high by the one controller AND driven low at the same time by the other controller you will earn a short circuit and possibly a dead interface . (It's a digitaly rule that 2 outputs must not be wired together)
hope this hint was useful !
Re: Ramps with arduino AND parallelport?
January 03, 2011 11:56AM
This explains why my test with the parallelport and the arduino (plugged in) failed.

My ramps electronics are now working pretty well with mach3 and db25 communication. The only strange thing is that I have to get the 5V from the arduino (not plugged in to the shield).. I tried it with 5V from the DB25 as well as 5V from a external power supply, but both setups have failed. Any issues?
Re: Ramps with arduino AND parallelport?
January 04, 2011 04:12PM
thetenter: Where did you apply the 5V to the Arduino? Via the barrel power connector or via the pin headers?

Just a note that the barrel power connector has a regulator on it, so you need to provide a power source higher than 5V usually (eg: 9-12V). Make sure however to check your Arduino design, as I would not be surprised if some of the cheaper clones "lose" this circuitry to save on costs.
Re: Ramps with arduino AND parallelport?
January 05, 2011 03:56PM
My setup was: pc -> ubs -> arduino (without the shield) -> 5V pin (arduino) -> 5V pin Ramps (i.d. arduino works as a 5V power supply)
and 12V power supply directly to the Ramps for the steppers.

everything worked fine, but as I tried to replace the 5V power supply from the arduino with a normal 5V power supply the stepper wasnt responding at all. (with a 5V outputpin from the db25 the stepper got some voltage but I wasnt able to move it)

I think its a very stupid beginner fault/faults I make, but as I'm new to all the electronics stuff I have no clue how to solve it.

thank you for any advice.
Re: Ramps with arduino AND parallelport?
January 06, 2011 02:09AM
maybe enable pin gets to 5v aswell with the rest - when its 5v, only the power led will be on the stepper board, and the outputs will be disabled
i think ramps knows to make it low when it wants to move a motor, but otherwise if its not already low by default / when powered up, you may need an active way to make it low - to put it to gnd or smth

Edited 1 time(s). Last edit at 01/06/2011 02:13AM by NoobMan.
@thetenter: I'm new to the CNC scene, but I've just built a machine with ramps 1.4, and I'm interested in doing milling work with it. Did you have to modify the hydra-mmm config options to work with ramps? What toolchain did you use?

Thanks,
Barclay
With the rep rap system the arduino mega uses it's memory to interpret the Gcode instructions sent from the PC and controls the power going to the pins of the RAMPS by that means, to run your CNC control program from the your PC you do not need an interpreter, as the signals from the serial port will control the pins directly, so the mega board becomes unnessary and simply supplies a 5v power supply for the electronics. I would advise a break out board to isolate the serial ports signals before connecting to the RAMPS for safety of your serial port card.

All you need is to connect to the Pololu boards enable, step and dir pins tom the serial port etc. through the RAMPS shield, and with a motor power supply and a 5v supply connected, you should be up and running, I am about to do the same with my printer (a conversion of a scratch built light duty milling machine), but intend to find a way to use the boards as they are if I can to make the machine universal.

The pololu stepper boards are amazing, so small yet capable of handling quite large amperage for their size, and a bargain for the price !
-------------------------------------------------------
> Hi all,
>
> As this is my first post I'd like to introduce
> myself and say hello at first. I'm from
> Switzerland and passionated hobbyist (don't know
> if this is the right word in english). My brother,
> father and me have built 3 CNC-machines the last
> two years and still can't get enough of them.
> This summer I came along the whole reprap stuff
> and was blown away... I knew, i have to build such
> a cool machine.
>
> The last months I've built a repstrap (without
> extruder) with RAMPS electronics. It works quite
> well both with replicatorg/5d firmware and
> hydra-mmm firmware/host software.
>
> Now my problem. As I want to do printing AND
> milling stuff with the same machine/electronics
> and I'm comfortable with mach3, I'd like to add
> the possibility of parallelport communication to
> my RAMPS electronics.
> Printing: USB -> Arduino -> RAMPS
> Milling: Mach3 -> RAMPS
>
> Is this possible and when yes, how?
>
> I've tried to wire the parallelport correctly to
> the shield, but nothing is working at all. When I
> measure the voltage between the pins is just 1V
> although it is 5V on a simple test LED circuit..
> Maybe this is an issue.
>
> Have you guys any idea how it could work?
>
> Sry for my english and thanks for any reply.
>
> Greetings,
> Joscha
Sorry, only registered users may post in this forum.

Click here to login