Joel Meisinger Harout Hedeshian Frankie Ning Dominic Boiko Ching-Han Tseng 1 Inputs Job File User Controls Outputs 3D prototype Status Design of a 3D printer for affordable prototyping. Prints each cross section of a 3D object layer by layer Three axis motion in a 2x2 feet chassis for large scale modeling Use of accurate stepping motors for high precision printing Network communication Low Level: Position printer head from basic raw commands Layout material Display printer status Mid Level: Print Simple 3D objects Position Feedback High Level: Print objects base on STL Printer Objective Resolution 25mm/s linear write speed 0.5mm deposition resolution 5mm3/s (0.3 in3/s) Capable of printing a 10cm3 object Capable of printing functional prototypes job files Independent power system 3 Electrical Power System Command and Data Handling RS422 Bus Stepper I/O Position Motor Sensing Controller Controller Interrupt Material Deposition Controller Power RS422 Interrupt GPIO 4 Electrical Power System 5 Provide each sub-system with appropriate power level Isolated Power System Reduced Shock Hazard Continuity of power Noise Reduction Open and short circuit protection Function Decomposition Transformer Design EMI Filter Rectifier Bridge Feedback Isolated Wall Outlet 120VAC 5V Forward converter (Isolated) Transformer/ Reset Winding FPS CDH MDC 12V Forward converter (Isolated) PSC SMC Metallic Enclosure For Grounding Relay(Enable) •Open Circuit Snubber Circuit will be implemented by the transformer and output to prevent “inductive kick” effect. Bleed Resistor for discharging capacitor and prevent OC. •Short Circuit (FPS IC) Latch Mode Protection: FPS shuts down SMPS till AC power is reconnected Auto Restart Mode Protection: Under Voltage Lockout(UVLO) •Other Overload Protection Over Voltage/Current Protection Metallic enclosure grounding Module Inputs Outputs Functionality EMI Filter 120VAC from Wall outlet 120VAC to Rectifier The process that filters out high frequency noises comes in from the wall outlet. EMI dedicates a return-path especially for noises, and therefore greatly reduces the unwanted spike when proceeds. Module Inputs Outputs Functionality Full-Wave Rectifier Bridge EMI Filter 170VDC with approximated voltage ripple to FPS The function that generates full positive waves. The smoothing capacitor, locates at the output of the rectifier, converts the full-wave rippled output of the rectifier into a smooth DC output voltage. Module Inputs Outputs Functionality FPS (Power Switch) 170VDC from Rectifier, Isolated Feedback from output Primary, Reset, Vcc and Secondary windings on the transformer The FPS has the internal switching frequency of 67KHz on MOSFET to makes DC-DC converter. It requires about 15VDC on Vcc winding to drive the chip and startup various functions. Module Inputs Outputs Functionality Transformer FPS 5VDC, 12VDC Converter Base on the turn ratio on the windings, this module may step up or down on voltage Module Inputs Outputs Functionality DC-DC converter Transformer 5VDC, 12VDC rail to each subsystems With manipulations on passive parts, these modules output desired voltage rail and current. Module Inputs Outputs Functionality Feedback 5VDC, 12VDC rails FPS This module supplies or reduce amount of gains to stabilize the output in case of any drastic changes. Primary risk: •Hand-made Transformers might not operate as ideal as the calculation •Fall back to more detailed analysis, calculation, component upgrade, and proper circuit protection •Over-current/short current protection, metallic enclosure grounding and isolation are part of considerations to prevent this hazard Goal •Redesign Transformer and find the better ferrite core •Fully test out the circuits on the perf-board •Power management •Proper debug/Test procedures documented •PCB Command and Data Handling 14 Coordinate all events on printer Communications interface for daughter boards Provide a physical human interface for high level control Platform independent and driverless communications to host computer Not populated on Rev A DEBUG EPS 5V RS232 Power Sequencing SRAM Data Buffer 5->3.3 Buck 5->2.5 Buck ARM Cortex M3 (Stellaris LM3S6965) Main CPU I2C USB>RS232 RS232 Ethernet LCD SPI 4Mb AVR MCU (ATXMEGA128A1) IO Hub CY8C9560A GPIO Expander Buzzer Not populated on Rev A Button s RS422 Driver RS422 Driver RS422 Driver Reset lines 6-DIN 6-DIN 6-DIN Module Inputs Outputs Function ality Buck Converters 5VDC 3.3VDC, 2.5VDC Take 5V from the power bus and step it down to 3.3V and 2.5V noting the correct power up sequence. Module Inputs Outputs Function ality ARM Cortex M3 LM3S9595 USB, Ethernet, COM from AVR LCD, COM to AVR Primary processor on 3DP responsible for interfacing 3DP to the real world. Process vectors and coordinate subsystems. Module Inputs Outputs Function ality SRAM Buffer Address, Data Data Space to store circular buffers of packet data for relay and transmission, and retransmission Module Inputs Outputs Function ality AVR MCU COM from CDH, I2C from CY8C9560A, COM(0-3) COM to CDH, I2C to CY8C9560A, COM(0-3) Responsibly for ensuring reliable message packet delivery between all subsystems. Also relay button presses and sends back to CDH Module Inputs Outputs Function ality CY8C9560A I2C from AVR MCU, Buttons I2C to AVR MCU, Buzzer Encodes buttons and drives buzzer. I wanted to play with this chip. Stellaris: FreeRTOS uIP Web server Using a highly modified Telnet server implementation to provide raw TCP socket for communication. • XMEGA: – Mostly interrupt driven custom firmware – Simple functionality acting as a “smart” I/O controller. – Nobody has ported an RTOS to the XMega?! RTOS Kernel Managed Tasks LCD Message Queue uIP HTTPD MAC Management Interrupts System Tick TELNET Ethernet Shell/Protoco l Lots of Cool Blinking LEDs Event Dispatch USB/UART COM Main Loop Interrupts LED Management System Tick COM1 Keypad COM2 Message Routing COMV1 AVR Management COM3 COM4 Original risks from PDR: Primary risk: Ethernet non-functional Working Secondary Risk: USB-UART non-functional ▪ Working New risks: ▪ Getting bored and making LEDs blink in funny patterns Material Deposition Controller Joel Meisinger 23 Objective Keep constant print head tip temperature Keep constant torque on fed printing material Requirements Supply consistent material delivery to the printing area(.5mm diameter +/- .1mm) Be able to start and stop printing material reliably. Notify CDH(main system) when print head is up to temperature and ready to print or when the printer out of material. 24 25 EPS RS232 Debug 5V 12V 3.3V DC/DC converter 5V DC/DC converter MDC XMEGA MCU Deposition Motor Driver RS422 Driver Deposition Thermal Driver CDH Micro data lines Power Print head control Print head Thermal Feedback 26 Module Inputs Outputs Functionality Module Inputs Outputs Functionality Module Inputs Outputs Functionality Module Inputs Outputs Functionality 3.3V DC/DC Converter 5V supplied from EPS, DGND 3.3V Provides power for Xmega MCU and drive signal to motor driver controller. Low current requirement. 5V DC/DC Converter 12V supplied from EPS, AGND 5V Provides power to motor driver controller/stepper motor. High current requirement. RS232 Driver Xmega TX and PC TX, DGND Xmega RX and PC RX Debug port for Xmega and development environment. RS422 Driver Xmega TX and PC TX, DGND Xmega RX and PC RX Communication driver between CDH and XMEGA for drive commands. Module XMEGA MCU Inputs 3.3V, DGND, RS422 TX(CDH), Thermal feedback RS422 RX(CDH), Motor Driver, Thermal driver Controller for the material deposition unit/print head. Regulates temperature and constant torque for the material feed. Outputs Functionality Module Inputs Outputs Functionality Module Inputs Outputs Functionality Thermal Driver 12V, AGND, drive signal PWM Power to the print head nozzle. Drives the heater on the print head. Motor Driver 5V, AGND, drive signal Stepper motor driving signal. Drives the motor to feed the deposition material. 27 MDC Main Init_sys() Init_CLK() Init_IO_PIN() Init_USART_RS232 Init_USART_RS422 Init_Timer0( ) Packet Handlers read_packet(…) write_packet(…) Motor Drive SM_Drive(…) QDEC_EVSYS(…) QDEC_Index(…) PWM Temp Drive PWM_Rate(.) Temp Sensor adc_read(…) LED LED_On(…) LED_Off(…) 28 Print-head is completely custom. Thermal controlled brass tip heated by NiChrome wire at temperatures 221°F 300°F ABS plastic: Possesses outstanding impact strength and high mechanical strength making it well suited for working mechanical parts. Stepper motor with feed gear that will supply constant torque(TBD). Compact having the ability to adapt to most 3d axis systems. 12 square inches. 29 • • 1. 2. ABS not working for dependable deposition Nozzle tip temperature not constant Use other material type such as a PVC or epoxy resin. Also try a variable torque routine that will be suited for changing speed and direction of the print-head when moving from one vertices to another. Use other tip sizes, apertures and heater materials. 30 Position Sensor Controller Frankie Ning 31 Objective Keep track of extruder head location Keep track of motor movements and provide limit warnings Keep track of temperature on stepper motors and motor driver heat sinks Requirements Supply CDH Controller with 3 axis position of the extruder within 1/200th of a rotation Supply motor status to CDH Controller Supply limit warnings and movement verification to Stepper Motor Controller 32 33 RS232 EPS ISP RS422 PSC CDH RS422 6 GPIO Driver RS232 Driver 5V 3.3V DC/DC converter Encoder X SMC 2 Limit X XMEGA MCU Encoder Y Encoder Z 2Limit Y Motor Temp XYZ 2 Limit Z 5V 3.3V GPIO ADC USART 34 Module XMEGA MCU Module Encoder X,Y,Z Inputs 3.3V, GND, RS232 TX(PC), RS422 TX(CDH), Encoder A,B, index signals from Encoder X,Y,Z, ISP ISP, RS232 TX(PC), RS422 TX(CDH) Gathers data from limit, temperature, and encoder sensors. Controls the RS232 and RS422 driver to communicate with the PC or CDH. Also includes GPIO to SMC for temperature and limit warnings Inputs Outputs Functionality Rotary disc in encoder Quadrature A and B, 90o off phase keep track of motor movement and position Module Limit X,Y,Z Inputs Outputs Functionality Limit flag Quadrature A and B, 90o off phase keep track of motor movement and position Module Motor Temp X,Y,Z Inputs Temperature sensor mounted on stepper motor Outputs Analog output 200mV – 1.75V at 10mV/oC Functionality keep track of motor temepratures Module 3.3V DC/DC Converter Inputs Outputs Functionality 5V Regulated 3.3V supply power to on board ICs Outputs Functionality Module ISP Inputs Outputs Functionality PDI_CLK, PDI_RESET, power, ground PDI_Data, AVRISP MkII Programming module for Xmega Module RS422 Driver Inputs Outputs Functionality Xmega TX and CDH TX Xmega RX and CDH RX Communication driver between CDH and PSC, command and data is sent using the RS422 driver Module RS232 Driver Inputs Outputs Functionality Xmega TX and PC TX Xmega RX and PC RX Communication driver between PC RS232 and XMEGA UART 35 PSC Main Init_sys() Init_CLK() Init_IO_PIN() Init_USART_RS232 Init_USART_RS422 Init_QDEC( ) Init_Timer0( ) Packet Handlers Encoder Limit read_packet(…) write_packet(…) QDEC_Direction( …) QDEC_EVSYS(…) QDEC_Index(…) Limit_detect( …) Temp Sensor adc_read(…) LED toggle_ heartbeat( …) 36 US-Digital E5 Optical Rotary Encoder Index Quadrature 512 CPR (cycles per revolution) 2048 PPR (pulses per revolution) Max detectable rpm = 11718 Fits ACME threaded rod 2mm – 10mm or 1/8” – 3/8” shaft Max Frequency Response 100kHz 37 Limited Funding Remove Encoders, reduce cost ▪ Not critical to design/ Good to have feedback ▪ Stepper motors with fine resolution Minimum cost PSC would include ▪ Temperature Sensor ▪ Track temperature of motors and drivers ▪ Photointerrupt Sensor ▪ Detect when print head moves to a X, Y, or Z axis limit Apply to EEF Personal donation 38 Stepper Motor Controller 39 Objective Control motion of extrude head along 3 axis (X,Y,Z) Control speeds of motors using constant current motor drivers Accurate positional translations using high resolution stepper motors as opposed to simple DC motors Requirements Drive steppers motors based on instructions given by CDH controller Provide current motor status when queried by CDH Able to drive motors accurately with enough torque to control extrude head position 40 EPS RS232 ISP SMC 6 GPIO RS232 Driver 5V 3.3V DC/DC converter Motor Driver Linear Actuator X XMEGA MCU Motor Driver Linear Actuator Y PSC RS422 Driver Motor Driver Linear Actuator Z CDH RS422 Legend 12V 5V 3.3V GPIO Isolated Signals UART Module Inputs Outputs Functionality RS232 Driver Xmega TX and PC TX Xmega RX and PC RX Communication driver between PC RS232 and XMEGA UART Module Inputs Outputs Functionality ISP PDI_CLK, PDI_RESET, power, ground PDI_Data, AVRISP mkII Programming module for Xmega Module Inputs XMEGA MCU 3.3V, DGND, RS232 TX(PC), RS422 TX(CDH), ISP, PSC limit sense GPIO ISP, RS232 TX(PC), RS422 TX(CDH), Motor Driver Control Signals Communication driver between PC RS232 and XMEGA UART, Configure motor driver operation Outputs Functionality Module Inputs Outputs Functionality Motor driver TB65605AHQ 5V, 12V, AGND, motor driver control signals PWM current waveform for 2 phase stepper motor Take digital control signals and drive a single stepper motor and defined torques, speeds, and resolution. Single 2-phase bipolar motor driver chip Controllable current for torque management Capable of half stepping and microstepping Digital control inputs Stepping speed determined by input clock Success!!! 44 45 SMC Main init_sys() Init_CLK() Init_IO_PIN() Init_USART_RSxxx () Init_Timer0( … ) Packet Handler read_packet(…) write_packet(…) execute(…) Motor controller Check limits Set control signals Module Inputs Outputs Functionality Main None. None. Call init_sys() to bring XMEGA online. Call read_packet() and write_packet() for interboard communications. Call execute() on commands received from CDH. Call the motor driver handling functions. Module Inputs Outputs Functionality Init_sys() None. None. Initializes the clock, IO pins, USARTs, and timers. Module Inputs Outputs Functionality Packet Handler Packet by serial (see struct for packet) Response packet The packet handler will read bytes from the serial communication and construct a packet based off our defined protocol. Also execute any commands sent in the packet. Module Inputs Motor Controller Limit sense GPIO from PSC. Motor axis states for control signals (see motor_driver struct) Control signals to the motor drivers. Sets the control signals to the motor drivers based on each motor axis current state as defined by the motor_driver struct. Stop motion and alert CDH when limits of motors have been reached. Outputs Functionality // Packet struct typedef struct { uint8_t to; uint8_t from; uint8_t size; uint8_t proto_ver; uint8_t reserved_byte_4; uint8_t payload[32]; } packet; // motor_driver struct typedef struct { uint8_t tq1; uint8_t tq2; uint8_t dcy1; uint8_t dcy2; uint8_t m1; uint8_t m2; uint8_t cw_ccw; //uint8_t clk; //possibly implemented as a single line to all motors uint8_t reset; uint8_t en; } motor_driver; Optoisolators required more current in order to operate with our desired bandwidth XMEGA can’t supply enough current ▪ Added MOSFETs to supply the required current Using part: DMN601DMK-7 (dual N-channel MOSFET) Risks: Motor driver chips are out of stock Have just enough for final revision Possibly able to get more by end of October ▪ Placed order (backordered, estimated ship date 10/20) If not available will need to redesign motor driver controller ▪ Most likely on MDC, only uses 1 motor driver, easier to change Alternative motor drivers are available and in consideration ▪ Smaller versions of current motor driver – sufficient for MDC In other words there is no more hardware risks Software is already partially implemented and works with hardware Schedule Maintaining with schedule SMC is ahead of schedule ▪ Original goal: have flashing LEDs (complete) ▪ Current status: stepper motor driving capability tested and working ▪ Most configuration signals tested (need to test decay mode) Current goal: ▪ establish packet handling (started) ▪ Design motor driver handling firmware 51 Task Ching CDH EPS Primary MDC PSC Secondary SMC Dominic Frankie Harout Secondary Secondary Primary Secondary Joel Secondary Secondary Secondary Secondary Primary Primary Secondary Secondary Primary Mechanical Secondary Primary Secondary User Interface Primary Secondary Secondary Primary Primary 52 CDH LCD display RS422 USB Ethernet EPS First Sage AC Power and EMI Filter Second stage Rectifier working (not transformer) MDC Blinking LEDs PSC Timer interrupt driven LEDs RS422 Temperature sensor data sent to PC Limit Sensor (toggle LED) SMC Blinking LEDs Driving stepper motors RS422 53 Gant chart 54 Item Name Description Unit Price Quant Total ity Amount STR-MTR-17048 ATSTK600 ATSTK600-TQFP64-2 LM3S6965 ATXMEGA128A1-AU ATXMEGA64A-AU MCP9700A-E/To GP1S53VJ000F E5 USDIGITAL LTV-846S FAN8303 B230A DN759x ASV-xxxxxMHZ TB6560 ADM3071EARZ DMN601DMK GBU6J-BPMS FS7M0880YDTU ACM9070-701 598-8710-307F 1N400xDICT-ND WK6249 FOD817A M9975 ASM69AC C0816X7R1Cxxxx ERJ-3GEYxxx4V 161-2306 A35109 Cat5e/ PS2/ DB9/ USB EE80251S3-0000 EPS/SMC/PSC/MDC CDH Stepper Motors STK 600 development kit STK600 socket adapter CORTEX MCU XMEGA MCU XMEGA MCU Temperature Sensors Photo-interrupt Sensors Optical Encoders Optocouplers DC/DC Converter Schottky Diodes Inductors Oscillator Stepper Motor Driver RS422 Driver N-CH MOSFET Rectifier bridge PWM Switching Reg Common Mode Choke LED Rectifier Fuseholder High power Optocoupler High power Inductor Linear slide Passive Capacitors Passive Resistors Mini-DIN connectors DB9 Connectors Cables Fan 2 Layer PCB 4 Layer PCB 19.00 206.96 102.96 15.29 10.2 8.21 0.34 0.85 62.32 0.73 1.12 0.413 2.73 2.63 4.73 3.4 0.61 1.4 3.64 1.58 2.17 0.31 1.88 0.5 3.47 766.00 0.03 0.03 0.93 0.95 41.53 3.27 3 1 1 2 2 8 5 3 3 25 25 14 5 10 5 10 20 3 4 2 10 8 2 4 3 1 1000 1000 10 4 1 1 33 66 Expense Breakdown 8 2 57 206.96 102.96 30.58 20.40 65.68 1.70 2.55 62.32 18.25 28.00 5.78 23.76 26.30 23.65 34.00 12.32 4.20 14.56 3.16 21.70 10.52 3.76 2 10.41 766.00 30 30 9.3 3.8 41.53 3.27 264 132 Total 2175.522 Subsystem Total CDH 246 SMC 273 PSC 251 MDC 250 EPS 200 Mechanical 151 Development Kits 310 Board Order 495 Total 2176 Financial Support UROP 1000 Halleck Willard Inc. 826 ECEE Department 367 Total : 2193 55 MILESTONE 1 Blinking (naked eye) LEDs on SMC, MDC, PSC, CDH Display functional interboard communication on RS422 Display one temperature reading on Realterm through RS232 Display one limit sensor by turning off LED when limit sensor is triggered Drive one motor via command from CDH Ready for Revision B board orders MILESTONE2 Display Encoders data via RS232 or CDH Direction Position Display valid C3DP defined protocols via logic analyzer for SMC, MDC, PSC, CDH 56 57