Shop OBEX P1 Docs P2 Docs Learn Events
My Propeller Based 3D printer. — Parallax Forums

My Propeller Based 3D printer.

davidsaundersdavidsaunders Posts: 1,559
edited 2015-04-03 07:25 in Propeller 1
I realized that I have been asking questions about details, though have not given a good overview of this project.

I have built a simple 3D printer, that uses a P8X32A as its controller, details following.


The Mechanical HW:
I am using simple 8mm steel rods for the rails, with simple linear bearings. That is for the X and Y axis (the 2D axis for a single layer). The two X rails are at far sides, with the Y Rail hanging in between the two X rails (from the linear bearings on the X rails). The extruder is hung from the Y rail linear bearing, with a second peice of wood to hold the orientation relitive to the bed.

The print bed is on a single vertical rail, with a screw on the opisite side.

The screw is hooked to a Nema 17 stepper to raise or lower the print bed. The X and Y steppers have a wood spool on them with fishing line that is used to move the linear bearings. The X and Y steppers are small $5 stepper motors. All 3 steppers are unipolor.

The extruder and hot end are very simple.

The hot end is just a peice of steel that is hollow, with a thin ceramic insulator and a bit if NiChrome for the heating element. There is a thermistor for monitoring the temperature of the hot end.

The extruder is a continuous rotation servo, with a two part wooden wheel feeder. The tip is just a screw on piece that goes on the end of the hot end, and has a 0.4mm hole in it.

There are simple wire contact zero position contacts for X, Y, and Z. This allows soft zeroing after everything is correctly adjusted.

That is it for the Mechanical HW (well there is a wooden frame holding everything, and 4 leveling screws in the top section of the print bed).


The Electronics:
The steppers and heating element are driven by a 12 volt power supply with the grounds tied through ULN2803's that are controlled from the Propeller.

The wiring is fairly simple, at the propeller it looks like:
::::: PIN USAGE :::::
 0 - 11 : Steppers.                                    : Output.
12      : Feed Continous Rotation Servo.               : Output.
13      : Hot End Heating Element PWM.                 : Output.
14      : X/Y/Z Limit Zeroing Micro Switches.          : Input.
15      : Delta Sigma out for Thermistor.              : Output.
16      : Delta Sigma In for Thermistor.               : Input.
17 - 23 : UNUSED.                                      : UNDEF.
24 - 27 : NTSC video.                                  : Output.
28 - 29 : Read/Write EEPROM's.                         : I/O.
30 - 31 : Comunicate with Host Computer.               : I/O.

I will be adding:
Pin 19: Extruder Switching Servo.
Pins 20 - 21: Select driver set for currrent Extruder.
Pins 22 - 23: Comunicate with other Propellers.
I think that gives a good overview.


The Firmware:
I have written the firmware completely from scratch. Seeing the difficulty iBruce is having porting TeaCup I am glad that I did write mine from scratch.

I am not ready to release my firmware yet, as I am still debugging it. Though the cog usage is:
::::: COG USAGE :::::
COG  :  USAGE                                          : Language
-----:-------------------------------------------------:----------
0    : Control X, Y, Z steppers, and feed servo.       : PASM
1    : Read sensors, and control hot end heater by PWM : PASM
2    : Unused.                                         : NONE
3    : Unused.                                         : NONE
4    : NTSC Status Display, limited single cog.        : PASM
5    : Parse G-Code                                    : SPIN
6    : Read/Write SPI EEPROM.                          : PASM
7    : Comunicate with host computer.                  : PASM

I will be adding:
COG 0: Control Hot End and Extruder selector (up to 3 extruders).
COG 3: Communicate with secondary Propellers for extended functionality.
I will release my code into the OBEX once either it is 100% complete or once I need some enough help that I have to release it to ask for the help.

Comments

  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-02 02:14
    I should note that this is still a work in progress. At this point I have a bread board wired in to the ProtoBoard so that as changes are needed I can do them.

    I also forgot to mention that two of the steppers are driven at 5V, and the servo is driven at 5V. So that should bring it up to date.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-04-02 10:23
    Neat project! Have you thought about also uploading to github as well as the obex?

    Spin/pasm I assume?
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-02 13:54
    Neat project! Have you thought about also uploading to github as well as the obex?

    Spin/pasm I assume?
    Yes SPIN and PASM.

    No I would not want to put it on github. I have yet to take the time to learn the correct usage of git.

    I am working towards lowering the entry to 3D printing, and once I have enough prints, and 0 software errors will be providing a complete set of plans. As it uses the Propeller it seems that the best place for it is in the OBEX, and I will provide a link from the 3D-Printing forum when it is stable enough.

    I have looked at a bit of my code today, most of it in PASM on the Prop side, and I think I may go with a bit more SPIN. Using more spin would lower the barrier to entry, and also help with my own debugging. Though I must admit that I have some concern about using to much hub mem, as SPIN runs there and has a stack, and I am using a lot of hub ram for buffering G-Code and the parsed commands, plus a partial video buffer.

    Though as the direct control stuff is slow enough to run in SPIN, it may be worth a shot, so long as I can keep the SPIN under 8KB including the stacks. The G-Code parser is already in Spin, so if I put the stepper control, extruder servo control, heating element control, and sensor controls into spin (except for the Sigma Delta for the thermistor), it should still be more than fast enough, and easier for those new to the Propeller to understand. And I think it possible to do and stay under 8KB of hub ram (I hope).
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-02 18:34
    It seems that one part of my plans changed rather radicaly. I just lost all three of my Raspbery Pi's do to a software bug damaging the HW. As these were my main computers, I am now using an old x86 PC semi compatible. So the host side can not be a Raspberry Pi, at least not now.

    ______________________________________________________________________________________________________________________
    On the Propeller side, I am a good chunk into converting the firmware into SPIN, and I believe that it will work out great.

    I do need to get it all off of my Linux SD-Card in order to continue, though there are many things I need to pull off of that card.

    ______________________________________________________________________________________________________________________
    Now I just need to find a new low cost ARM system that will run RISC OS and Linux. And not a RPi beings as it was a bug in the Raspbian updates that caused the trouble and damaged 3.
  • Heater.Heater. Posts: 21,230
    edited 2015-04-02 20:23
    davidsaunders,
    I just lost all three of my Raspbery Pi's do[due?] to a software bug damaging the HW....it was a bug in the Raspbian updates that caused the trouble and damaged 3.
    OMG. That's huge. What happened? Do tell before it happens to anyone else.
    I do need to get it all off of my Linux SD-Card in order to continue...
    I do urge you to use git and github. Had you been doing so you would be up and running on a new machine in the time it takes you to write your post.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-02 20:51
    Heater. wrote: »
    davidsaunders,

    OMG. That's huge. What happened? Do tell before it happens to anyone else.
    I realy am not sure what caused the damage. I did make a post in the Raspbian sub forum of the RPi forums, asking what has been updated that could possibly damage the HW, so hopefully we will find out.
    I do urge you to use git and github. Had you been doing so you would be up and running on a new machine in the time it takes you to write your post.
    I usualy keep good back ups, so I messed up on this one. I am now running from a CD with no HDD of any kind, will be storing work on multi copies Thumb Drives.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2015-04-03 03:59
    I'd be very surprised if it was a hardware problem caused by a update. It's most likely corrupt SD cards. It's may be possible still access the data on the cards with a USB card reader like : http://www.walmart.com/c/kp/sd-card-readers
    and a copy of knoppix Linux ( or other flavors of Linux) http://knoppix.net/. In addition to github storage there are plenty of free cloud storage solutions available such as Google Drive, Drop Box, etc. Amazon now has unlimited storage for $59.99 per year. and free for 3 months.https://www.amazon.com/clouddrive/home.


    If one of the cards doesn't have important data I would manually delete the partitions with knoppix and redo them. Then load raspbian again and try it.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-03 05:40
    I'd be very surprised if it was a hardware problem caused by a update. It's most likely corrupt SD cards. It's may be possible still access the data on the cards with a USB card reader like : http://www.walmart.com/c/kp/sd-card-readers
    and a copy of knoppix Linux ( or other flavors of Linux) http://knoppix.net/. In addition to github storage there are plenty of free cloud storage solutions available such as Google Drive, Drop Box, etc. Amazon now has unlimited storage for $59.99 per year. and free for 3 months.https://www.amazon.com/clouddrive/home.


    If one of the cards doesn't have important data I would manually delete the partitions with knoppix and redo them. Then load raspbian again and try it.
    Well no matter what OS or SD Card I use on the three there are porblems that were not there before I ran the updated Raspbian. And the OS I use most on the RPi is RISC OS, and that almost never writes to the SD (I have a few Thumb drives for my RISC OS boot drives, only the ROM image and RPi firmware are on the SD for RISC OS).

    Though I am going to attempt to talk about my 3D printer.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-03 05:48
    I spent a good chunk of last night rewriting a good part of the firmware in SPIN, so far so good. It looks as if it will fit inside of 8KB (2048 longs)once everything that can be is rewritten in SPIN :).

    I think that to those new to the Propeller it is likely that SPIN is going to be easier to deal with than PASM (I am an exception, 7 years ago when I discovered the Prop I dove into PASM ignoring SPIN).

    As I am doing the conversion largely because I want others to be able to use it, the most tedious part is writing long and very detailed comments, explaining in detail how what works for those that do not know.

    As I am using a custom G-Code sender for the printer anyway I am thinking about just parsing the G-Code on the host machine and sending more concise commands to the printer to reduce the buffer size needed on the printer, any thoughts?
  • Cluso99Cluso99 Posts: 18,069
    edited 2015-04-03 06:34
    Very interesting project. Would be interested to see some pics of the hardware.

    Is your NTSC driver just text and monochrome? If yes, you could use my 1pin tv driver - the font is in cog and the hub is reclaimed for the screen buffer.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-03 06:54
    Cluso99 wrote: »
    Very interesting project. Would be interested to see some pics of the hardware.
    Maybe once I clean it up a bit. The design changed a couple times after the first build, so it looks a bit of a mess .
    Is your NTSC driver just text and monochrome? If yes, you could use my 1pin tv driver - the font is in cog and the hub is reclaimed for the screen buffer.
    Yes it is just monochrome with text (I do draw a couple lines, though that can be done in text). I did not know about the 1 pin TV driver, will look it up.

    Thank you.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-03 07:25
    Cluso99 wrote: »
    Very interesting project. Would be interested to see some pics of the hardware.

    Is your NTSC driver just text and monochrome? If yes, you could use my 1pin tv driver - the font is in cog and the hub is reclaimed for the screen buffer.
    Thank you much. I am going to be using the One Pin TV Text object in my 3D printer for the NTSC Status display now. That will save 3 pins and save a lot of hub ram..
Sign In or Register to comment.