Disclaimer: The purpose of this series of posts is to examine a well-built piece of hardware and undertake a study of how to develop firmware for the onboard Atmel AVR microcontroller it incorporates to interface with and control motors, lights, buttons, dials, switches, etc.
You could certainly find “AVR development boards” where you have a scratchpad sort of area to design your own circuits, however, unless you’re an electronics designer, engineer, or really advanced hobbiest, you will likely introduce design flaws that would interfere with your software. My focus for this project is purely on designing the software, not the hardware. Therefore it made sense to me to start with something that has been professionally engineered and debugged.
The Cricut Expression is trademarked by Provo Craft, Inc. It is a very nice little machine that cuts designs out of all sorts of materials, and thousands of happy crafters use it to make all sorts of interesting things. When I received my machine (a gift from my sister), it was not working and I was very curious about how this thing works, and how to repair it. It turned into a project…of interesting proportions!
This is an educational project used solely by me to learn Atmel AVR development and hardware interfacing techniques. I am a software engineer by trade, and an electronics enthusiast at heart.
Ok, so with that out of the way, one more thing to add… This information is for my own use, and may not be of use to anyone for any particular purpose. Indeed, if you follow these posts and decide to apply anything you learn to your own machine, you accept full responsibility and accept all warnings and disclaimers posted. The bottom line is, it’s my machine, and I can break it if I want to.
Once the machine is opened from the bottom, the motherboard can be accessed for inspection. The following image displays the major functional elements.
(You can click the images to view the full size version)
I diagrammed this during my exploration and annotated which subsystem I had working. The green highlighting was used to keep track of what I had working at each stage of the process. I would use yellow for partially functional and red for non-functional.
Future articles will describe each of these in depth, so I will summarize the functional areas below:
The keypad connector interfaces with the large matrix keypad and LEDs on the top panel.
The display is an OLED display using the Univision Technology UG-2864ASYDT01 module based on the SSD1325 driver IC. The u8lib AVR library is used to interface with the display.
This interface allows you to program the AVR as well as use the Atmel Studio debugging interface to step through the running code on the chip. This is immensely useful when things don’t seem to be working right. However, when the JTAGEN fuse is enabled the OLED display will be disabled since it uses the same pins.
The FTDI chip is used to convert the serial interface on the AVR to the USB interface for the computer. It is connected to the USB port on the far right.
The typical 6 pin ISP programming header is exposed in this 10 pin cable. Interestingly, this cable is actually connected to the cartridge port on the front of the machine. Eventually I will build a small cartridge board to connect my AVR Dragon programmer to the port instead of hanging a cable out the front of the machine.
This machine (actually,all of these cutters) uses two stepper motors for the two axis (x/y). This motherboard uses eight MOSFETs for the high-power side, and eight smaller transistors for low power. This allows us a great deal of capabilities for accurate micro-stepping movement. Each of the transistors are connected to the output connector. The stepper motors are 6-wire unipolar models. Each of the 4 coils (per motor) are connected to the white connectors at the bottom edge of the motherboard.
Driver for 3 analog dials, connected as follows:
dial | AVR pin
size | PF0 (ADC0)
speed | PF1 (ADC1)
press | PF2 (ADC2)
Each input is a simple voltage divider between 0 and 5V, with a few discrete settings where the pot clicks.
The USB connection is set in my software to 9600 baud, XON/XOFF flow control. This has proven to be the most reliable, and certain software like Sure Cuts A Lot required 9600 baud when using the US Cutter “SC” plugin.
These transistors manage the pen holder’s up/down movement and the “pressure” which equates to a Pulse Width Modulation signal driving the voltage up or down. The mechanism that moves the pen up or down is essentially an electromagnet or solenoid.
The home switch signals the Atmel AVR micro-controller that the cutting head has reached its right-most position. This internally translates to a 0 on the X axis.
The flash memory on the machine is an Atmel AT45DB041D 4 megabit serial flash memory device. For native mode operation, this flash memory contains the George and Basic Shapes cartridge data. For my purposes, I have erased the flash memory and may use it to store projects that I print, so that I can easily reprint them in the future without having to load Inkscape or use the computer. One idea I have for this is to create a menu option to store rather than cut the incoming data. The user would enter a name for the project and the machine would store the incoming HPGL data in flash memory.
With the addition of an SD card connected to the front cartridge port, this might be very useful in the future 🙂