3D Print:      Blog   ·   1   ·   2   ·   3   ·   4   ·   5   ·   «6»   ·   7



Thoughts on Arduino Pin Asignment

This is a list of inputs and outputs that come to mind. I will have to assign the exact pins and decide, which I/O's will be shifted.

# Type Pins Assigned
   Inputs
1 x endstop
1 y endstop
1 z1 endstop
1 z2 endstop
4 4x4 button matrix *2 20, 21 (I2C)
1 SD Card (MISO) 50 (SPI Interface)
1 Emergency Stop 19 (Interrupt 4)
9
   Outputs
3 x stepper (dir, step, enable) *5
3 y stepper (dir, step, enable) *5
3 z1 stepper (dir, step, enable) *5
3 z2 stepper (dir, step, enable) *5
2 roller (step, enable) *1 *5
4 4x4 button matrix *2
12 ink nozzles *4
1 enable cartridge
3 SD Card (SS, MOSI, SCK) *3 53, 51, 52 (SPI Interface)
6 2x16 LCD (RS, E, D4-7) *3 20, 21 (I2C)
40
49 Arduino Mega has 53 I/O Pins
2 serial line for debugging

  • 1: there is no need that this is a stepper, a geared motor with a PWM output would be just fine
  • 2: this would be easy to put on an i2c bus, going from 14 pins to 2 (for example "Devantech LCD03", there are also some nice I2C PWM LED driver chips available from Philips - ya know, for pimpin the machine)
  • 3: using the Enable/Chip Select pin, these devices can share pins
  • 4: since we only fire one nozzle at a time, we may use a 4 bit decoder, reducing the number of pins from 12 to 4
  • 5: we can use a single direction pin, but then we can never position two steppers independently. We can also group the Enable pins into X/Y and Z1/2
  • A: the Arduino has interrupts on 2, 3, 18, 19, 20, and 21
  • B: all endstops should be within the bytes of a hardware port

Later: lid contact, cartridge temperature, ink level, powder collection level, powder temperature, ...


                     LCD + Keyboard
                           |
                          I2C
                           |
                        +---------+
Stepper X ----- 4 ------|         |
Stepper Y ----- 4 ------| Arduino |----- 13 ------ Ink Cartridge
Stepper Z1 ---- 4 ------|         |
Stepper Z2 ---- 4 ------|         |------ 4 ------ SD Card
Roller -------- 2 ------|         |
                        +---------+
                           |
                           2
                           |
                         Debug


About Pins and Inks

The Arduino has 53 I/O pins which seems a lot when counting the I/O's required for Pwdr 0.1, but let's have a quick look at the HP45 ink cartridges. (UDN2981 8 Ch Source Dirver, ULN2803 8Ch Drain Driver)


We need to control the HP 45 in a matrix. There are 22 adresses and 14 groups, adressing 308 (actually 300) nozzles. We control the cartridge address by address, selecting groups that will fire. So we need five lines to select an address and 14 more to select the groups with the right nozzles. That is 19 pins for one cartridge.

In full color mode, things get more complex. We can stick with five lines for the addresses and keep the cartridges in sync, but we need 5x14 lines for the groups of all five cartridges, requiring 75 pins. Since that is more pins than we have in our Arduino, we will need some smart multiplexing to stay in control. At 5us impulses per nozzle (12 kHz for the entire sequence), this will be tough!

US 5946012 Patent on Google


Comments (0)