- Power Supply
- Raspberry Pi 2: Embedded computer to control the printer
- Big Easy Driver: Circuit that converts the control signals of the Raspberry Pi 2 into the stepper motor driving current
- Stepper Motor
- Projector
- Computer: My source of 3D objects to send to the printer
The connection between the Raspberry Pi 2 and the Big Easy Driver needs some explanation. The Raspberry Pi 2 has a number of General Purpose Input/Output pins (GPIO). These pins can be configured to be 3.3 volt inputs or outputs via programming libraries in Python, C, or Ruby. Signal wires soldered to the Big Easy Driver's direction (dir), step, and enable solder pads connect to individual Raspberry Pi 2 GPIO pins. The direction signal controls the direction of rotation for the stepper motor, the step signal tells the motor when to rotate 1 step, which must be signaled 200 times for 1 rotation on my motor, and the enable signal tells the Big Easy Driver if it should be applying power to the stepper motor.
My Windows computer is connected wirelessly to the Raspberry Pi 2 to transfer g-code and slice files via Samba, and to command the printer via SSH console. I'm running Raspbian on my Raspberry Pi 2, if only because it is very stable and well supported by the Raspberry Pi foundation. Since there are many resources on setting up SSH and setting up Samba for the Raspberry Pi 2, I won't be making a post on how I set up my Raspberry Pi 2
Building the Stepper Motor Circuit
After a few shopping trips to procure parts and wiring I didn't have, I started building the stepper motor circuit to demonstrate stepper motor control. The stepper motor circuit is most of the printer circuit above, but not all of it. I didn't need the projector, but did need the computer to program and command the Raspberry Pi 2.
My cousin had an old 366 MHz Pentium computer in his garage. I gently pulled the 100W ATX power supply, as it seemed like a crime to even dismantle such a relic of a computer. I didn't want to modify his power supply and wasn't sure it had enough power, so I created a cable harness out of a motherboard power extension cable. This allows me to change out the power supply easily in the future.
My extremely permanent on-off switch
I also needed a cable to connect the Raspberry Pi 2 to the power supply. I cut a microUSB cable in half, and soldered in a 4-pin molex connector to be able to reconnect each end. Tada! A microUSB cable that allows me to connect my Raspberry Pi 2 to USB power or use half to connect to the power supply.
To my surprise, the Big Easy Driver came with breadboard pins already soldered. Initially, I wanted to take the pins off since the servo wires will need to be soldered to the driver anyway. However, I couldn't figure out how to get them off! This was quite fortunate, because I forgot I was in prototyping mode and would need the flexibility of a breadboard as I encountered wiring difficulties. After connecting the power supply, Raspberry Pi 2, Big Easy Driver, and stepper motor on the breadboard, I found I had incorrect documentation!
My stepper motor. Note the left-right color pairs.
Website photo of the interior
My stepper motor wires seem to have been rearranged compared with the website. This caused the stepper motor to jerk in alternating directions each pulse! The breadboard made the wire change quick and easy once I had the suspicion.
With my initial python tests, I can get the stepper motor going to about 8.5 revolutions/sec, or about 510 RPM at full step resolution. I suspect the limitation is my script. It cannot produce faster pulses because Python's time.sleep(), which I was using to control the pulse rate, is only accurate a little less than a millisecond. At 8.5 revolutions/sec, I get about 30 inches per minute, or 13 mm/s.
The Big Easy Driver supports 1/16 steps per rising edge to provide even more precision, but requires more steps per revolution. With the z-axis having about 16 threads per inch, a single full step changes my z-axis about 8 microns, which is good enough for 100 micron prints.
What I Learned:
I was mistaken in my research that I needed a PWM output to control the servo. The Raspberry Pi 2 has only 1 PWM output which I was planning on using for the servo, but conveniently, the Big Easy Driver simply looks for rising edges of the signal. This made writing a quick test python script much easier, since I could use (almost) any GPIO pin and simply toggle it.
I did not realize how strongly the stepper motor held position when powered (called holding torque in the data sheet). I could turn the motor shaft by hand with the power off.
I did not wire the Big Easy Driver enable pin to the Raspberry Pi 2 GPIO for the time being. I found I will need the enable pin because the servo gets quite hot when powered, regardless of movement. The enable pin will turn off the stepper motor, but at the loss of holding torque.
ANY MORE INFO ON THIS?
ReplyDeleteSpecifically about the circuit, or the 3d printer in general? I'd love to help, but I'm not sure what you'd like to know.
DeleteI haven't posted lately due to not having the funds to continue. I'd like to try FunToDo resins instead of Maker juice to compare next.
Hi, The printer itself. it seems almost impossible to find detailed info on LCD SLA printing.
Delete