Raspberry Pi based 4 axis controller September 14, 2015 02:27AM |
Registered: 9 years ago Posts: 15 |
Re: Raspberry Pi based 4 axis controller September 14, 2015 04:50AM |
Registered: 10 years ago Posts: 978 |
Re: Raspberry Pi based 4 axis controller September 14, 2015 10:10AM |
Registered: 9 years ago Posts: 517 |
Re: Raspberry Pi based 4 axis controller September 17, 2015 02:13PM |
Registered: 9 years ago Posts: 198 |
Re: Raspberry Pi based 4 axis controller September 25, 2015 03:08AM |
Registered: 9 years ago Posts: 15 |
Quote
frankvdh
Just as a data point, I wouldn't be interested in anything with only 4 steppers. Maybe if you already had an expansion board available right from the start to provide another 2-3.
Are the "limit switch" inputs compatible with active sensors (e.g. optical or Hall-effect?)
But mostly I'd want to know beforehand how you were going to solve the RT control issue.
What software would you implement? A variant of Marlin? Or something different?
Re: Raspberry Pi based 4 axis controller September 25, 2015 03:09AM |
Registered: 9 years ago Posts: 15 |
Re: Raspberry Pi based 4 axis controller September 25, 2015 03:25AM |
Registered: 9 years ago Posts: 15 |
Quote
ElmoC
For the end stop voltage difference, add a mosfet to each input. That would allow higher voltage to be used. Might set it up in a way the user could use a jumper for anything over 3.3v.
4 steppers is not enough these days. Optional unpopulated space for at least two more steppers would be good. Also providing digitally controlled reference voltage for the stepper sticks would be good. I have seen one stick available that has an input for an external reference voltage.
If there are more free pins available, you should add more discrete outputs.
Re: Raspberry Pi based 4 axis controller September 25, 2015 03:36AM |
Registered: 9 years ago Posts: 15 |
Re: Raspberry Pi based 4 axis controller September 25, 2015 06:31PM |
Registered: 10 years ago Posts: 74 |
Re: Raspberry Pi based 4 axis controller September 27, 2015 02:25AM |
Registered: 9 years ago Posts: 15 |
Quote
zerodameaon
Check around to make sure you are not going to violate any patents or anything like that. Photon Elephant eluded to possibly violating something with their PI based board before they vanished into thin air with everyone's money.
Re: Raspberry Pi based 4 axis controller September 27, 2015 02:23PM |
Registered: 10 years ago Posts: 74 |
Re: Raspberry Pi based 4 axis controller September 28, 2015 04:50AM |
Registered: 10 years ago Posts: 978 |
Quote
mrwolfe
It has an SPI port on it which can be used for expansion.
Re: Raspberry Pi based 4 axis controller October 03, 2015 10:40AM |
Registered: 9 years ago Posts: 2 |
Quote
mrwolfe
Extra pins are an issue because the GPIO only has 21 pins plus SPI (which can be 5 GPIO pins or SPI but not both) and ID (which can't be used for anything except the device ID rom). Extra dIscretes can be added via an expansion board. Again, everything can be added but the size and cost goes up.
Quote
mrwolfe
I've just remembered the OTHER reason that I kept the board size down. I cut the board down and did quite a bit of squeezing because if it gets any bigger it goes into the next size range and gets more expensive.
Quote
mrwolfe
Oh, BTW, I could really use some help with the software. Anyone out there have any experience writing kernel mode drivers in a realtime linux environment?
Re: Raspberry Pi based 4 axis controller October 03, 2015 08:21PM |
Registered: 9 years ago Posts: 15 |
Quote
mrvn
Hi,
I'm toying with the idea of building a 3D printer that has a graphical display for more options on what to display, networking to avoid the hassle with usb sticks or sd cards, live video so I can watch the printing while I'm cooking in the kitchen and maybe include the slicer. A Raspberry Pi might provide all that.
Quote
mrvn
Quote
mrwolfe
Extra pins are an issue because the GPIO only has 21 pins plus SPI (which can be 5 GPIO pins or SPI but not both) and ID (which can't be used for anything except the device ID rom). Extra dIscretes can be added via an expansion board. Again, everything can be added but the size and cost goes up.
How many pins do you use so far? I see the need for at least:
4 X Axis: X_STEP_PIN X_DIR_PIN X_ENABLE_PIN X_MIN_PIN
4 Y Axis: Y_STEP_PIN Y_DIR_PIN Y_ENABLE_PIN Y_MIN_PIN
4 Z Axis: Z_STEP_PIN Z_DIR_PIN Z_ENABLE_PIN Z_MIN_PIN
3 E Axis: E_STEP_PIN E_DIR_PIN E_ENABLE_PIN
2 Extruder: HEATER_PIN TEMP_PIN (analog)
=
17 Pins
That would leave 4 + SPI or 9 pins free. If all ENABLE pins are connected together that would save 3 pins. Adding MAX_PIN for each axis would use 3 more pins.
Quote
mrvn
With 4 pins there isn't enough space for a second extruder. Unless some pins could be reused or multiplexed. Ideas:
- Only one extruder is used at a time
shared E_STEP_PIN and E_DIR_PIN and tristate E_ENABLE_PIN (0 = left, 1 = right, float = off)- Z Axis movement is done only inbetween layers (when extruders aren't used)
shared E/Z_STEP_PIN and E/Z_DIR_PIN, 2 pins E1/E2/Z select
Quote
mrvn
Support for 2 extruders and heated plate with the extruders multiplexed by a tristate pin would come to a total of 21 pins by my count.
And how do you handle the analog TEMP_PINs? Unlike an Arduino the Raspberry Pi has only digital inputs. I assume you have some 8 channel AD converter chip?
Quote
mrvn
Quote
mrwolfe
I've just remembered the OTHER reason that I kept the board size down. I cut the board down and did quite a bit of squeezing because if it gets any bigger it goes into the next size range and gets more expensive.
The prices I have for etching boards have 50mm x 50mm and 100mm x 100mm price classes (50mm x 100mm costs the same). Your board is 100mm x 70mm. So there would be room for an extra 30mm width at no price.
Quote
mrvn
Quote
mrwolfe
Oh, BTW, I could really use some help with the software. Anyone out there have any experience writing kernel mode drivers in a realtime linux environment?
I might be interested in writing a linux driver for the board or go one step lower and work bare-metal. Obviously it would help to have a board to play with. Do you have a spare board or could you provide schematics, layouts and parts list? Will your board be GPL like the RAMPS?
Quote
mrvn
As for the $50 price have you seen [www.banggood.com] ? Would be cheaper to connect that to a Raspberry Pi via USB and use that as display + network controller and slicer. But half the fun is in building this yourself.
Re: Raspberry Pi based 4 axis controller October 04, 2015 06:38AM |
Registered: 9 years ago Posts: 2 |
Quote
mrwolfe
Not bad ideas. There are 2 spare pins ATM that could be used as select lines. Taking this idea to its logical conclusion, you could multiplex all of the motor control lines e.g Common Step, Direction, plus 7 enable lines for 7 motor channels. Only problem is that only one motor can be driven at a time. Another possibility is to have seperate X and Y channels with all the others multiplexed ...
Re: Raspberry Pi based 4 axis controller October 09, 2015 03:40AM |
Registered: 9 years ago Posts: 15 |
Quote
mrvn
I was also thinking of using an actual multiplexer, not seperate enable lines. So you would have one signal line and then log(N) address lines. So 3 lines would give you 4 motors, 4 lines 8 motors, 5 lines 16 motors and so on. The signal line can be GND or Vcc if you leave one output of the multiplexer free. That way 2 lines would give you controll of 3 motors as I previously used.
Re: Raspberry Pi based 4 axis controller October 09, 2015 03:57AM |
Registered: 10 years ago Posts: 978 |
Re: Raspberry Pi based 4 axis controller October 09, 2015 05:21PM |
Registered: 11 years ago Posts: 14,685 |
Quote
mrwolfe
Connecting a RAMPS to a Pi via USB is certainly cheap (already done that), but I kind of like the idea of a single unit instead of having cables all over the place. As for the price, I'm pretty confident I can get it down to about the same as that RAMPS kit, but I'll need to do it in volume to get there.
Re: Raspberry Pi based 4 axis controller October 10, 2015 05:02AM |
Admin Registered: 17 years ago Posts: 14,005 |
Re: Raspberry Pi based 4 axis controller October 10, 2015 10:12AM |
Registered: 11 years ago Posts: 14,685 |
Quote
VDX
With reading data from SD and setting the laser-power over an analog port I'm getting something like 90kHz 'pixel-clock' ... without the analog output this will be more something like 400kHz.
Re: Raspberry Pi based 4 axis controller October 10, 2015 02:14PM |
Admin Registered: 17 years ago Posts: 14,005 |
myFile = SD.open("datalog.txt"); if (myFile) { Serial.println("datalog.txt:"); // read from the file until there's nothing else in it: char SDbyte = 0; starttime = millis(); while (myFile.available()) { linenumber += 1; SDbyte = myFile.read(); if (buttonPin){ //analogWrite(analogOutPin, SDbyte); analogWrite(A0, SDbyte); //digitalWrite(ledPin, HIGH); //digitalWrite(ledPin, LOW); //analogWrite(A1, 255); //analogWrite(A1, 0); if (SDbyte<255){ ttime = millis() - starttime; Serial.print(linenumber); Serial.print(": "); Serial.print(SDbyte, DEC); //HEX); Serial.print(" - "); Serial.print(ttime/1000); Serial.write("\n"); } } } // close the file: myFile.close();
Re: Raspberry Pi based 4 axis controller October 10, 2015 06:59PM |
Admin Registered: 17 years ago Posts: 14,005 |
Re: Raspberry Pi based 4 axis controller October 12, 2015 06:21AM |
Registered: 9 years ago Posts: 31 |
Re: Raspberry Pi based 4 axis controller October 12, 2015 11:39PM |
Registered: 9 years ago Posts: 15 |
Quote
frankvdh
There's a KickStarter project called Replicape for a 3D printer controller based around a BeagleBone Black, which apparently has some extra hardware which allows it to do hard real-time stuff. Unfortunately it only has support for 5 steppers :{
Re: Raspberry Pi based 4 axis controller October 12, 2015 11:51PM |
Registered: 9 years ago Posts: 15 |
Quote
dc42
Quote
mrwolfe
Connecting a RAMPS to a Pi via USB is certainly cheap (already done that), but I kind of like the idea of a single unit instead of having cables all over the place. As for the price, I'm pretty confident I can get it down to about the same as that RAMPS kit, but I'll need to do it in volume to get there.
I see two problems with a RAMPS + Pi solution. One is that Arduino Mega/RAMPS is not adequate to drive a delta printer well. The other is that I have recently seen two different users complain that their Octoprint on RPi does not supply data over the USB port to their Arduino Mega/RAMPS printers fast enough to print at full speed. I suspect the issue is that the Pi was also running a webcam, and the lack of hardware flow control in the serial part of the USB-over-serial link on the Mega means that the Pi has to wait for an "OK" response before it knows it is safe to send more data - which leads to Linux descheduling Octoprint in favour of other tasks such as servicing the webcam. So if you want to couple a Pi with another processor to do the hard real time stuff, use a faster processor, and either make sure it has a native USB port or use some other protocol such as SPI to connect them.
Quote
dc42
There are other solutions to providing a network interface to a 3D printer that don't involve using anything as powerful as a Pi or a general purpose O/S such as Linux, but they can't handle webcams, or local slicing.
Quote
dc42
I have wondered whether it would be possible to hack the Linux kernel to use only 3 cores of a quad core chip, leaving the 4th core free for real time tasks. I also heard of a chip recently that combines quad cores for running Linux etc. with a lower-spec ARM core for running real time tasks. That sounds like a good combination to me.
Re: Raspberry Pi based 4 axis controller October 12, 2015 11:54PM |
Registered: 9 years ago Posts: 15 |
Quote
VDX
... I'm developing a 'high-speed' application with an UDOO (linux quad-core with ArduinoDue onboard) as 'master' and two Dues as 'slaves' for motion control and laser-syncing.
With reading data from SD and setting the laser-power over an analog port I'm getting something like 90kHz 'pixel-clock' ... without the analog output this will be more something like 400kHz.
With a BeagleBone-based laser controller I'll get something like 500kHz normal pixel-clock to 2MHz pwm-speeds for simple set frequenzies ...
Re: Raspberry Pi based 4 axis controller October 12, 2015 11:58PM |
Registered: 9 years ago Posts: 15 |
Re: Raspberry Pi based 4 axis controller October 13, 2015 08:13AM |
Registered: 9 years ago Posts: 3 |
Re: Raspberry Pi based 4 axis controller October 13, 2015 10:36AM |
Admin Registered: 17 years ago Posts: 14,005 |
Quote
mrwolfe
Quote
VDX
... I'm developing a 'high-speed' application with an UDOO (linux quad-core with ArduinoDue onboard) as 'master' and two Dues as 'slaves' for motion control and laser-syncing.
With reading data from SD and setting the laser-power over an analog port I'm getting something like 90kHz 'pixel-clock' ... without the analog output this will be more something like 400kHz.
With a BeagleBone-based laser controller I'll get something like 500kHz normal pixel-clock to 2MHz pwm-speeds for simple set frequenzies ...
Hi Viktor.
What flavour of linux are you using? Also, do you know what the latency is like. A comparison I saw shows that non-RT linux has the highest throughput, but the latency (hence jitter) is woeful, and can be as high as 500ms.
Re: Raspberry Pi based 4 axis controller October 14, 2015 07:47PM |
Registered: 9 years ago Posts: 15 |
Quote
VDX
Quote
mrwolfe
Quote
VDX
... I'm developing a 'high-speed' application with an UDOO (linux quad-core with ArduinoDue onboard) as 'master' and two Dues as 'slaves' for motion control and laser-syncing.
With reading data from SD and setting the laser-power over an analog port I'm getting something like 90kHz 'pixel-clock' ... without the analog output this will be more something like 400kHz.
With a BeagleBone-based laser controller I'll get something like 500kHz normal pixel-clock to 2MHz pwm-speeds for simple set frequenzies ...
Hi Viktor.
What flavour of linux are you using? Also, do you know what the latency is like. A comparison I saw shows that non-RT linux has the highest throughput, but the latency (hence jitter) is woeful, and can be as high as 500ms.
... actually I'm busy with programming the windows based programs and IDE-blocks - for the UDOO I've downloaded the images with Ubuntu1204 and Debian Wheezy -- will start with them around mid November ...