Hacking the HP45

Powder and inkjet printing
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 »

@Jnesselr

The HV57908 could handle the voltage and the speed. I am seeing little in the way of being able to drive a HP45 on more than the addresses. Each primitive takes 400mA (pulsed), giving a max pulse current of 5.6A at a duty cycle between at most 50%. The best the documentation provides is between 15mA and 1.5A on all pins combined. This is not really enough for the primitives. Primitives are current driven.

Addresses are a different story. They are mostly voltage driven. You could easily drive those with this chip. Addresses are basically a Mosfet and need to switch fast and drain the fet itself. This is why TLC chips are not useful for addresses. They can source power, but they do not drain it quickly enough. This chip could be a nice single part to drive addresses. However, if you have 5 printheads, you can connect all heads' addresses together to save components. You would never fire address 5 on one head and in the same time fire address 18 on another. It just complicates things and doesn't add speed.
davidk
Posts: 77
Joined: Sun Mar 12, 2017 6:48 pm

Re: Hacking the HP45

Post by davidk »

Hi Mahsa,

I produce a 1-bit bitmap with ImagePrinterPro or some Photoshop. I made a C program that takes 16 bytes from the first bitmap row then 16 bytes from the second row and so on to build a vertical slice for print. Please check bitmap format for reference. Then I send the array ( less than 32768 bytes) to an arduino due. This is supposed to control the L6452 IC that drive the cartridge. Arduino sends 16bits to SPI to L6452 (14 primitives and 2 blank bits), selects addresses with S0...S3 and fires --LONGPULSE. After firing all odd primitives I select a different address, send another 16 SPI bits and fire LONGPULSE. This way I print 128 bits (16 bytes, one bitmap row). That's why I read only the first 16 bytes from a bitmap row.
This way I print a full vertical slice of 128 bits wide from bitmap. Then I move to the next 128 bits swath.

Overall this is the full workflow; now I have an Atmega64 that do the timing for L6452 but it's too slow and the primitive order is wrong, but I work on the second version that involves only arduino and L6452.
Hope this is clear enough. Good luck!
davidk
Posts: 77
Joined: Sun Mar 12, 2017 6:48 pm

Re: Hacking the HP45

Post by davidk »

Hi,

This is my code for firing L6452. Please look how simple is to use this chip:

Code: Select all

void jet(unsigned char address, unsigned int pdata,unsigned char pwr) //pwr = 0...10 ejecting power
{   unsigned char tmp;
    tmp=pdata%256;
  //-- set SPI primitive data, 16 bits
    SPDR=tmp;  while(!(SPSR&(1<<7))) {;} //SPIF=bit7
    tmp=pdata/256;
    SPDR=tmp;  while(!(SPSR&(1<<7))) {;} //SPIF=bit7  
    LATCHDATA=1; //#asm("nop"); #asm("nop"); #asm("nop");LATCHDATA=0; #asm("nop");
    switch(address) {
        case 1:  CHSEL=0; S3=0; S2=0; S1=0; S0=1; break;
        case 2:  CHSEL=0; S3=0; S2=0; S1=1; S0=1; break;
        case 3:  CHSEL=0; S3=0; S2=0; S1=1; S0=0; break;
        case 4:  CHSEL=0; S3=0; S2=1; S1=1; S0=0; break;
        case 5:  CHSEL=0; S3=0; S2=1; S1=1; S0=1; break;
        case 6:  CHSEL=0; S3=0; S2=1; S1=0; S0=1; break;
        case 7:  CHSEL=0; S3=0; S2=1; S1=0; S0=0; break;
        case 8:  CHSEL=0; S3=1; S2=1; S1=0; S0=0; break;
        case 9:  CHSEL=0; S3=1; S2=1; S1=0; S0=1; break;
        case 10: CHSEL=0; S3=1; S2=1; S1=1; S0=1; break;
        case 11: CHSEL=0; S3=1; S2=1; S1=1; S0=0; break;
        case 12: CHSEL=0; S3=1; S2=0; S1=1; S0=0; break;
        case 13: CHSEL=0; S3=1; S2=0; S1=0; S0=0; break;
        case 14: CHSEL=1; S3=0; S2=0; S1=0; S0=1; break;
        case 15: CHSEL=1; S3=0; S2=0; S1=1; S0=1; break;
        case 16: CHSEL=1; S3=0; S2=0; S1=1; S0=0; break;
        case 17: CHSEL=1; S3=0; S2=1; S1=1; S0=0; break;
        case 18: CHSEL=1; S3=0; S2=1; S1=1; S0=1; break;
        case 19: CHSEL=1; S3=0; S2=1; S1=0; S0=1; break;
        case 20: CHSEL=1; S3=0; S2=1; S1=0; S0=0; break;
        case 21: CHSEL=1; S3=1; S2=1; S1=0; S0=0; break;
        case 22: CHSEL=1; S3=1; S2=1; S1=0; S0=1; break;
        default: CHSEL=0; S3=0; S2=0; S1=0; S0=0; break;  
    }
    #asm("nop"); #asm("nop"); LATCHDATA=0;
    switch(pwr) {
      case 0:
        ENCH=0; //output 12V to selected address line 
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); 
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop");
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); 
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); // --- total 2usAdd to Prim time
        //fire primitives
        LONGPULSE=0;
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); //0.8us
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop");                                       // --- total 1.3us firing
        LONGPULSE=1;
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop");
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop");
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); 
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); 
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); 
        #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); #asm("nop"); //total 3us 
        ENCH=1; break;
     case 1: break;// here I have the same code but longer delay between LONGPULSE=0 and LONGPULSE=1
     case 2: break;// same thing, longer delay
    }
 }   
After I played with this chip, I wouldn't try to use discrete components.
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 »

I was a bit confused where you wrote to values and where to pins. I am used to arduino, where you either have a function or write to a register. Aren't the addresses written to a bit like my decade counters, where you step to your values? Your code seems to suggest some sort of demultiplexer, but the datasheet has a specific step pin and direction pin (and reset).

I still want to really try the L6452. I do however still have a few objections with the L6452 that have stopped me from completely stopping what I am doing so far and use the L6452.
  • Limited availability. Only Mouser sells them in small quantities and I don't know if they restock.
  • Unknowns in the datasheet. The entire VBoost section is an unknown. We assume 19V, but we don't know.
  • Not completely standalone. You still need a boost converter for the driving of the gates.
  • More pins required. I need 9 pins to drive the entire circuit. The L6452 needs 16 (?)
  • (Maybe not 3.3V compatible, but that I still need to test, datasheet is on the limit)
On the other hand it is a bit more compact and has more advanced features. The testing part has a proper constant current source. I will still give this a try cause I still think it is a neat solution, but I have started to make the TLC circuit work, and the last big problem I had (not being able to fire all primitives at once) seems to be gone. I am not going to redo the entire circuit again only to save a few components. If I am going to use the L6452 it will be on V3. After I am done writing the code for V2 I will see if I can experiment with it myself.
Mahsa
Posts: 8
Joined: Sat May 20, 2017 11:28 am

Re: Hacking the HP45

Post by Mahsa »

Hi David,

thanks for your reply.it was so useful. but i have a question?? first you read the bitmap as a binary or hex?
and the hp45 nozzles are in a column so for every firing we should send a byte which is include 7 bits. if its odd so each bit
is one of the p odd.in your algorithm i couldnt find... :?: :idea:
davidk
Posts: 77
Joined: Sun Mar 12, 2017 6:48 pm

Re: Hacking the HP45

Post by davidk »

The code is C, ATMega64.
Regarding address select, I voted for direct demultiplexing, not UP/Down counter. That's because I thought this is more straightforward and, in the future, I could decide the address order for myself.

You're right about the pin count and the availability. Still, you can reduce pin count at about 10 pins, but you won't have auto-check and/or temperature sensing.

Regarding 3V3 comnpatibility, I suspect all pins would be OK except SDI/SDC because of the high frequency used.

Mahsa, I read the bitmap as a hex file, parse the resolution from the header (X and Y) then I calculate which bytes should build the swath.
I don't use the even nozzles because I can't sync them yet. After building XY carriage, I'll see...
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 »

Not to be stubborn (much), but I am going to continue with the TLC circuit for now. It seems quite capable, even if it is a few more components. Plus, I already have it here and functional. I really want to have something finished instead of starting from scratch (again).

It is now more or less functional. I have tested all nozzles, and I have the nozzle table at the very least mostly in order. There is one gap on one side missing, but all in all the nozzles are working. I still have to make the nozzle test function work and actually print complex shapes, but for now it is a relief to have it at least work. I still need to confirm if I can fire all primitives at once and I need to work on timing in combination with the shift registers, but I am making nice progress.

Attached are photo's of the current setup and carrier that I printed for this one. I can't seem to find a design that is compact and doesn't require a screw to mount the printhead, but I will continue looking for one. With the current width I can luckily afford a nice toggle clamp design.
IMG_20171002_212228.jpg
IMG_20171002_212228.jpg (285.59 KiB) Viewed 18217 times
IMG_20171002_212221.jpg
IMG_20171002_212221.jpg (253.82 KiB) Viewed 18217 times
david
Posts: 73
Joined: Wed Sep 21, 2016 8:43 pm

Re: Hacking the HP45

Post by david »

dragonator wrote: I still want to really try the L6452. I do however still have a few objections with the L6452 that have stopped me from completely stopping what I am doing so far and use the L6452.
  • Limited availability. Only Mouser sells them in small quantities and I don't know if they restock.
  • Unknowns in the datasheet. The entire VBoost section is an unknown. We assume 19V, but we don't know.
  • Not completely standalone. You still need a boost converter for the driving of the gates.
  • More pins required. I need 9 pins to drive the entire circuit. The L6452 needs 16 (?)
  • (Maybe not 3.3V compatible, but that I still need to test, datasheet is on the limit)
On the other hand it is a bit more compact and has more advanced features. The testing part has a proper constant current source. I will still give this a try cause I still think it is a neat solution, but I have started to make the TLC circuit work, and the last big problem I had (not being able to fire all primitives at once) seems to be gone. I am not going to redo the entire circuit again only to save a few components. If I am going to use the L6452 it will be on V3. After I am done writing the code for V2 I will see if I can experiment with it myself.
Your concerns about L6452 are actually true. It is valuable to have a different implementation. BTW, what initially stopped you from fire all nozzles at once with the TLC chip?
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 »

I never measured it directly, but the only real option is a limitation somewhere in the primitive power delivery. This is most likely the TLC59213 simply not being able to provide the current required to fire all nozzles. I now have 4 TLC's, and each primitive has 2 full gates in the TLC, not one. I hope that this has fixed the problem I still need to print more complicated patterns to confirm if the problem is gone, but I have not seen it in my tests so far.
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 »

I have not posted ages, so I though I might share what I have been up to.
IMG_20171029_085447.jpg
IMG_20171029_085447.jpg (337.39 KiB) Viewed 17863 times
I have been busy getting the program for the HP45 standalone controller to work. So far I have decent control of the printhead, with test and preheat, and I have a serial command interface for the controller over USB. This has proven both an advantage and a problem. The printhead runs worse over serial for some reason. I have yet to identify this, but there are still quite a few small other things left as well.

Right now I am working on the buffer and text to buffer so I can send and print more complicated shapes. This should help with troubleshooting.

I do not expect to give many updates right now, on account of it not being that exciting, but when I have real milestones, I will share it.

(PS. the wires are for the oscilloscope testing. I destroyed a teensy and a 595 chip when probing around earlier)
Attachments
HP45_Standalone_V2.01-01 20171029.zip
(22.99 KiB) Downloaded 988 times
Post Reply