Welcome! Log In Create A New Profile

Advanced

Raspberry Pi2 To RAMPS 1.4

Posted by ICanBeRobot 
Raspberry Pi2 To RAMPS 1.4
March 04, 2016 10:53AM
I have a Raspberry Pi2 running OctoPi that is sitting in the same case as my RAMPS 1.4 Board and Mega. Currently I have a 3 foot long USB A to B cable running from the USB port on the PI to the USB port on the Mega. I would like to connect the two internally on the case using a Logic Level shifter (PI is 3.3V and the Mega is 5V). I am pretty sure this can be done, but I have no idea on the RAMPS / Mega to hook the wires up to and what might need to be changed in Marlin for this to work.
Re: Raspberry Pi2 To RAMPS 1.4
March 04, 2016 10:52PM
There are 4 serial ports on a mega2560, on the ramps they are mapped to the following.

2 RXD0 PE0 ( RXD0/PCINT8 ) Digital pin 0 (RX0) usb
3 TXD0 PE1 ( TXD0 ) Digital pin 1 (TX0) usb
45 RXD1 PD2 ( RXDI/INT2 ) Digital pin 19 (RX1) Z-MAX
46 TXD1 PD3 ( TXD1/INT3 ) Digital pin 18 (TX1) Z-MIN
12 RXD2 PH0 ( RXD2 ) Digital pin 17 (RX2) on aux4
13 TXD2 PH1 ( TXD2 ) Digital pin 16 (TX2) on aux4
63 RXD3 PJ0 ( RXD3/PCINT9 ) Digital pin 15 (RX3) Y-MAX
64 TXD3 PJ1 ( TXD3/PCINT10 ) Digital pin 14 (TX3) Y-MIN

The easiest one is on aux4
And if that’s in use and your not using your max endstops you can move the endstops around a little and get a another serial working. Or move Z and Y endstops elsewhere to get another serial (I was planning to move them onto the the 4 servo lines, just note that the gnd and +5 pins have been reversed from the endstop)

Marlin firmware its simply a case of changing #define SERIAL_PORT 0 to 1,2 or 3

NB I do not recommend attempting to use serial 0 (usb) as then you wouldn’t be able to upload new firmware as the boot loader is hard coded for serial 0
Re: Raspberry Pi2 To RAMPS 1.4
March 05, 2016 06:41AM
I wouldn't recommend to put Pi and control board to same case. Both generate heat and Pi would die first as it is more sensible to it.
How I would solve this is shorter USB cable and power Mega from USB. Less heat from Mega's regulator And Pi has serial port in pins 14 and 15
Re: Raspberry Pi2 To RAMPS 1.4
March 08, 2016 08:39AM
Listening in since I think it sounds interesting, I'm just done with my new enclosure that holds Ramps, Mega and Pi with a cooling fan in the same box. Was thinking of powering the Pi with one of the servo connections on the ramps to the GPIO...
Could any of you explain how to hookup this as the OP asked?
Re: Raspberry Pi2 To RAMPS 1.4
March 08, 2016 08:18PM
The mega/ramps has a very very weak power supply (chips says 1amp, but people tell me you can only reliably get a lot less before it over heats)

rpi needs [www.raspberrypi.org]

ie far more than the mega can provide.

Edited 1 time(s). Last edit at 03/08/2016 08:19PM by Dust.
Re: Raspberry Pi2 To RAMPS 1.4
March 09, 2016 03:57AM
Quote
Dust
The mega/ramps has a very very weak power supply (chips says 1amp, but people tell me you can only reliably get a lot less before it over heats)

rpi needs [www.raspberrypi.org]

ie far more than the mega can provide.

Hm, guess I'll better get a voltage regulator from 12 to 5V then, good ting they are cheap grinning smiley
btw, here's the case if anyone else is interested: [www.thingiverse.com]
Re: Raspberry Pi2 To RAMPS 1.4
March 09, 2016 07:24AM
Yes they are cheap. I have 8 Pis running from wall warts and they have used something like twenty power supplies. I have tried Chinese modules and smell how they let their magic smoke out. I've used phone chargers and now I have bunch of them in my dead electronics box. All have one common thing. They have started with over 50mV ripple at 1A load when new.
Some PSUs didn't burned, they just failed to deliver good enough power. SD card corruption, random hangs etc.

I bought from Farnell
item no: 2427499 item: STONTRONICS T5582DV AC/DC Power Supply, USB, Euro, UK, 90 V, 264 V, 10 W, 5 V, 2 A Price VAT 0%: 7.11 EUR
None of those haven't failed yet. Oldest are about year and newest are less than a week. 25mV ripple 1A load.

Also those which are inside my home server and taking 5V from ATX PSU are working good. Who needs virtual machines when SBCs are so cheap?

Sourcing good parts isn't easy or cheap.

If you have enough power in 12V power source, use some switcher module to step it down to about 7 volts and then linearly regulate to 5 volts. Check your regulators drop-out voltage. And be prepared to give at least 2 amps so you don't kill your power system with heat.
Sorry, only registered users may post in this forum.

Click here to login