Hacking the HP45

Powder and inkjet printing
MAsic12345
Posts: 56
Joined: Sat Aug 25, 2018 5:26 pm

Re: Hacking the HP45

Post by MAsic12345 » Tue Dec 04, 2018 10:33 am

how much ampere does hp45 use when working

User avatar
dragonator
Site Admin
Posts: 381
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking the HP45

Post by dragonator » Tue Dec 04, 2018 5:42 pm

It draws peaks of around 4.5A at 12V, but on average it should be 1-2A. The duty cycle on the scale of milliseconds is lower than 50%, probably 10%-20%.

User avatar
dragonator
Site Admin
Posts: 381
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking the HP45

Post by dragonator » Thu Jan 03, 2019 5:38 pm

I have been somewhat busy this vacation getting DMA to work. I am not at a point that I have all of it working in principle, all I need to do now is test it with an actual printhead.

I have not said much about it here, but I am busy getting DMA to work for the inkjet printhead. Right now I need around 220 microseconds for one full burst, and due to the incredibly timing critical nature of inkjet, I could not do anything during that time. DMA can perform simple tasks directly from RAM, without the CPU doing anything with it. The idea is to wire up 2 ports (port C and port D) to the address next, primitive clock (tied to primitive clear which is active low) and all primitive pins to these ports. I load the right pattern I need to inkjet into RAM memory, and trigger it with DMA. I can then do other things while the printhead is busy printing.

I would not be able to do this myself, but luckily, Teensy has a lot of stuff built in, and one of these things is the OctoWS2811 library (https://www.pjrc.com/teensy/td_libs_OctoWS2811.html) that can set 8 strips of addressable leds at the same time without any processor involvement (using DMA). The library does some things that I do not need as well, but most importantly it sets a whole port based on what is in the RAM memory. This is the part that I need, and modified so it also does it to another port.

It took some effort. There are some mysterious issues, mostly that I cannot trigger both ports at the same time and need a 100ns offset between the two. I now have it working. Below the logic analyzer images of the 2 full ports. They look just like they do right now, with the only difference being that this is done over DMA.
HP45 standalone cascade 1-22.PNG
HP45 standalone cascade 1-22.PNG (22.61 KiB) Viewed 219 times
First a cascade where I trigger each primitive individually. There are 3 clocks per address to keep the inkjet stable. This is an old workaround that is still being used.
HP45 standalone Samples pulse.PNG
HP45 standalone Samples pulse.PNG (73.26 KiB) Viewed 220 times
Triggering all primitives. The top row is primitive clocks, the second row is address next pulses. All other rows are primitive signals.
HP45 standalone Samples pulse.PNG
HP45 standalone Samples pulse.PNG (73.26 KiB) Viewed 219 times
A closeup on one pulse showing the offset between the 2 ports.

I hope I can test the inkjet before my vacation is over. otherwise it might take a week more. Once the DMA is tested I will build it into Oasis and test it. I will then also add some functions to the firmware of the printhead driver that make it more useful for general purpose ink jetting.
Attachments
HP45 standalone Samples complete.PNG
HP45 standalone Samples complete.PNG (70.27 KiB) Viewed 220 times
HP45 standalone cascade 1-22.PNG
HP45 standalone cascade 1-22.PNG (22.61 KiB) Viewed 220 times

jnesselr
Posts: 17
Joined: Sat Sep 17, 2016 7:54 pm

Re: Hacking the HP45

Post by jnesselr » Fri Jan 04, 2019 7:06 am

DMA can be difficult to get right, but I definitely think it's the right direction. Theoretically, if you built a board from the ground up, you could use DMA to control the stepper motors and the inkjet head based on the same timer so that everything would be perfectly synchronized.

User avatar
dragonator
Site Admin
Posts: 381
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking the HP45

Post by dragonator » Fri Jan 04, 2019 1:47 pm

Oasis runs 2 different controllers. One is arduino Uno based and drives all the motion. The other is the standalone inkjet controller. The inkjet controller takes it's position from an encoder on the gantry. I cannot use DMA to also control the steppers because they are not attached. If they did it would certainly be an option, though controlling motors through interrupts should also be a decent option.

jnesselr
Posts: 17
Joined: Sat Sep 17, 2016 7:54 pm

Re: Hacking the HP45

Post by jnesselr » Fri Jan 04, 2019 5:40 pm

The other option is that you can use DMA on the motion controller and have it send out a sort of clock signal to the inkjet controller to perfectly synchronize the two.

This may, however, be based on a lack of understanding on how you'e synchronizing them now. Do you mind going into a little bit more detail on that?

User avatar
dragonator
Site Admin
Posts: 381
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Hacking the HP45

Post by dragonator » Sat Jan 05, 2019 9:22 am

Oasis runs 2 controllers. One is motion, controlling the full gantry, spreader, and pistons. The other is the inkjet driver, controlling the printhead. It is separated because writing motion drivers sucks, and having 2 timing critical, complicated things run on the same controller in the past has proven more trouble than it is worth. Both controllers are driven by the same software over usb (and indirectly a form of serial, though teensy's are a bit odd here).

The motion controller is an Arduino Uno running GRBL. It has 4 motors attached to it: X, Y, Feed and Build, all with their respective endstops. The spreader motor is also attached to one of the output pins of the GRBL. On the Y axis is a 150 lines per inch encoder tape.

The HP45 standalone driver has a Teensy 3.2 and is running my own firmware. It has the HP45 printhead and an encoder tape reader attached. The encoder is used to synchronize the position of the GRBL motion to the inkjet. All inkjet print commands are given with a position.

With this setup I do not have to write complicated motion drivers, or take existing motion drivers that will give problems implementing because I have other timing critical stuff. I simple send a Gcode command to the motion driver, and the inkjet data to the inkjet driver. After that they work out themselves what happens next. It works surprisingly well.

Post Reply