Hacking the HP45

Powder and inkjet printing
ezrec
Posts: 112
Joined: Sat Aug 15, 2015 1:31 pm

Re: Hacking the HP45

Post by ezrec »

Basically, you need something like this:

http://www.ti.com/lit/ds/symlink/sn74act7806.pdf

An asyncronous uni-directional FIFO memory (they come in larger sizes than 256x18, this is just an example).

You tie the 'write data/write clock' side to the microcontroller, the 'read data' side to the printhead jets, and the 'read clock' side to an optical encoder wheel/strip for the printhead axis movement.
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking the HP45

Post by dragonator »

When I got this idea of offloading the data to external easy to access memory, I did consider FIFO. FIFO does everything better than RAM does, but thus far I have found it very expensive. FIFO chips I cannot find big enough without paying €50. Even 4mbit 16 bit chips I found were less than €10.

Now maybe my requirements for FIFO memory are too tight. FIFO can probably be done with WAY less memory than RAM (not having to store a complete sweep in memory) and maybe I am just not looking the right way. How much memory would I need when using FIFO memory. Can a microcontroller handle 900kbits per seconds of reading from an SD (letting another microcontroller deal with the motion)?
ezrec
Posts: 112
Joined: Sat Aug 15, 2015 1:31 pm

Re: Hacking the HP45

Post by ezrec »

With the FIFO, you just have to consider bursts.

For example, assume you have the following:

1) A Cortex3 ARM micro with a 50Mhz SPI (32-bit wide buffer) bus
2) A serial to parallel demux
3) A FIFO chip with EMPTY, FULL, and HALF_EMPTY signals

There are two buffers pointers in the ARM:

* NEXT_TO_PRINT(start, len)
* NEXT_TO_SEND(start, len)

The ARM sets up a interrupt driven task to drive the printhead:

Code: Select all

On an interrupt from HALF_EMPTY:
   If NEXT_TO_PRINT.len == 0:
      Return
   Else
      sending = min(FIFO_SIZE/2, NEXT_TO_PRINT.len)
      NEXT_TO_SEND.len += sending
      NEXT_TO_PRINT.start += sending
      NEXT_TO_PRINT.len -= sending
      Kick the SPI transmit interrupt

On an interrupt from SPI_TX_DONE (or kick from above):
   If SPI_TX_BUSY or NEXT_TO_SEND.len = 0:
      Return
   Else
      word32 = word32_read_at(NEXT_TO_SEND.start)
      NEXT_TO_SEND.start += sizeof(word32)
      NEXT_TO_SEND.len -= sizeof(word32)
      SPI_TX.buffer = word32
      SPI_CTL.send = 1
Or something like that.

At a 50Mhz clock rate, you should be able to send ~20M dots/second, including the interrupt handler overhead.
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking the HP45

Post by dragonator »

So if I understand this right, the FIFO is only there to do smoothing. It is still assumed that the micro can mostly handle the moving the motors, reading the SD and triggering the nozzles, but the FIFO is in place to handle smaller gaps in reading. Maybe the on board RAM would already be enough, but that is hard to estimate based on guesses.

It is most definitely an option. I will start learning some more advanced programming in the coming months. My skill is currently stuck at advanced arduino (which is beginner at decent programming language) and most of the stuff I see I understand in principle, but not in implementation.

I was always quite biased to the stuff I understood fully, and put off learning the things that would have been better. For this I will try my best to just learn what would be best. First things first though, I still have some basic hacking to do. No use in designing the printer electronics when the printhead is not even hacked. I have it on the list for this weekend, so I hope I will get to try.
ezrec
Posts: 112
Joined: Sat Aug 15, 2015 1:31 pm

Re: Hacking the HP45

Post by ezrec »

Exactly - the FIFO is there to 'relax' the micro's IO servicing timing requirements.

Otherwise, the micro is at the mercy of the dot clock of the printhead - something I learned painfully with BrundleFab.
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking the HP45

Post by dragonator »

Hacking report, day 1
2016-02-13 12.14.jpg
2016-02-13 12.14.jpg (318.12 KiB) Viewed 84374 times
2016-02-13 15.59.jpg
2016-02-13 15.59.jpg (288.79 KiB) Viewed 84374 times
No success getting any ink so far. Here is what I have done today.

First off I started with measuring the printhead. It is common ground and I was hoping that all grounds were internally connected. My hope was right. I found all ground planes exactly where the patents said they would be. This brought my hopes up.

I started with the naive approach, hoping everything would work immediately. I know it rarely does, but I was hopeful. I connected an arduino UNO (Mega on picture did not work) with 2 TLC59213IN latch drivers to ground 1, primitive 1 and address 1. I used 2 latch drivers to get address and primitive their own latch. I wrote simple code to first trigger the address, 2 microseconds later the primitive, hold for 1 microsecond and immediately turn off the primitive. This was followed by the address 3 microseconds later. I connected the clock and _clear pin together, thinking that with clear inverted, it would work. All pin writes are done with port manipulation, because digitalWrite() functions are too slow.

Nothing...

Troubleshooting revealed several things. Half of the signals never reached the latch drivers, some of the 5V signal pins were stuck at 2.3V and the latch did nothing. I went 2 steps back and first tested at seconds scale how best to trigger the latch drivers. It took an hour of fiddling with wires to get something reliable, but I could now securely trigger the drivers. Somewhere along the way I dug up a pocket oscilloscope, a DSO Nano V3. It actually works pretty well but is barely (not) fast enough to detect the inkjet triggers. On the scope is what is shown without the load of the printhead present. The probes are between the address on the positive and the primitive on the ground. It is visible that the address becomes high, the line dips when the primitive becomes high, and the line goes up again when the primitive goes low again. Funny thing I failed to make a photo of is that with a printhead, the address (and only the address) has quite a high capacitance. I already added 10K pulldown resistors, but I will probably add lower value resistors to the address in later test.

Everything should work, but still nothing. I tested the first 3 primitives and addresses, but nothing happened. No ink.

I am going to go back a few more steps. I am going to use the microcontroller to open gates and see if I can see power going through the printhead. See if there is continuity. No success so far, but I will spend then next few days trying stuff until I have ink coming out of the printhead. Any suggestions are welcome.
ezrec
Posts: 112
Joined: Sat Aug 15, 2015 1:31 pm

Re: Hacking the HP45

Post by ezrec »

Some thoughts:

Do you have an HP45 printer where you could 'vampire' a scope into the control signals for the head?

HP thermal jetting timing is super picky - and it's ridiculously easy to blow out an inkhead by holding it in 'heater' stage for too long (lesson learned when I forgot to remove my HP head from my InkShield when I was reprogramming my head controller!)

Can you throw up your timing diagram on a post, and the patent # your are referring to?

Do you have a nice fat capacitor across the Vcc/Ground? The instantaneous current draw of these low-voltage heaters is huge. MUCH more than the 30v C6602A family.
User avatar
dragonator
Site Admin
Posts: 595
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking the HP45

Post by dragonator »

Sadly, I do not own a HP45 printer. It would have made my life a lot easier. I might still get one if I can if the inkjet tests stays fruitless. The main issue is that the HP45 is only still used in bigger plotter printers. I will see if there is a printer that is not too expensive that can hold a HP45. I have got better scopes at the local hackerspace, and the el cheapo logic analyzers are not too expensive.

I also know from the C6602A that simply pressing reset while the head is active will destroy at least 3 nozzles. I added extra safety on Plan B, but never did I press reset on Plan B. Maybe this is a good reason to make a separate printhead controller without an easy to reach reset button on a future printer.

This is the patent/datasheet I am referring to with timing diagram enclosed below that:

http://www.google.com/patents/US5946012
US5946012-33.png
US5946012-33.png (26 KiB) Viewed 84360 times
I did forget the capacitor. I am still doing one nozzle at a time, but I can imagine that a 2us 300mA burst at 12V might still be a bit much without some capacitors. I will add a nice beefy one directly on the primitive driver, and a lightly less beefy one on the address driver.
DigitalShadow
Posts: 20
Joined: Sat Jan 30, 2016 1:49 am

Re: Hacking the HP45

Post by DigitalShadow »

This has me thinking that we may need to focus some attention on the temperature sensors and keep those monitored. I would be willing to bet the 10x Resistor pin has something to do with the thermal sense line

Based on what I've seen with nozzles being blown, they could be used as a possible hardware level failsafe. Also, there could hypothetically be many reasons for the nozzle not firing; I think many could be ruled out or confirmed by keeping a close eye on the temperature of the nozzle. If I am correct it will not fire unless it has been sufficiently warmed first. I don't know that I wan't to leave the job of preheating to a constant set of pulses, as the environment may introduce a fair amount of variability(including but not limited to ambient temp, humidity, and diffusion from other nozzles).
Finally, from the controllers point of view, the only way to know if a nozzle has fired is to see the corresponding drop in heat. From what I read on the patent, it isn't uncommon in normal operation for the heads to misfire, and the printer to compensate with the next passing nozzle
ezrec
Posts: 112
Joined: Sat Aug 15, 2015 1:31 pm

Re: Hacking the HP45

Post by ezrec »

I can confirm that with the HP10 heads on the Z310+ printer, thermal sensor monitoring is 'up front and center' in almost all of its self checks and diagnostics w/respect to the printhead.

Normal operating range is 25C-50C

Anything above 80C is considered to be a 'critical alert' and will shut down the head.
Post Reply