gianluca-nitti / printserver-esp8266

GNU General Public License v3.0
161 stars 32 forks source link

ESP doesn't power #11

Open pavlinb opened 4 years ago

pavlinb commented 4 years ago

Hello,

I used direct connection to printer, using 10 GPIO.

ESP8266 doesn't power on, when it is connected to printer HP LaserJet 1100 MS.

gianluca-nitti commented 4 years ago

Hello,

unfortunately it's quite hard to help debugging an hardware issue with little information, can you provide a diagram? Which ESP module (NodeMCU, Wemos, etc) are you using and how is it powered?

pavlinb commented 4 years ago

Hi, sorry for missing information.

I use following definition for I/O in NODEMCU:

const int nStrobe =15 ; //D8 - pin 11 lpt const int data_0 = 16; //D0 - pin 2 lpt const int data_1 = 5; //D1 - pin 3 lpt const int data_2 = 4; //D2 - pin 4 lpt const int data_3 = 0; //D3 - pin 5 lpt const int data_4 = 2; //D4 - pin 6 lpt const int data_5 = 14; //D5 - pin 7 lpt const int data_6 = 12; //D6 - pin 8 lpt const int data_7 = 13; /D7 - pin 9 lpt const int busy = 3; //RXD0 - pin 1 lpt

I connected pins from NODEMCU directly to printer cable.

If I power-on NODEMCU without printer cable connected, ESP starts and WEB part works. If later connect the printer cable, printer doesn't want to print.

But if I power-on NODEMCU with printer cable connected, ESP doesn't start at all.

Hope this helps.

Regards.

gianluca-nitti commented 4 years ago

Here are some suggestions:

pavlinb commented 4 years ago

Thanks for detailed comments.

I have started with pins 9 (SD2) BUSY and 10 (SD3) as STROBE, but the situation was same. Then I found a good disscution here https://www.esp8266.com/viewtopic.php?f=11&t=20727&start=12 and changed mentioned 2 pins.

I then tried very basic example from your link https://forum.arduino.cc/index.php?topic=74776.0, but the printer is still non-responsive.

Is it a problem that NODEMCU is 3.3V , but LPT standard requires 5V? Should I use shift register in order to communicate with printer?

Kind regards.

gianluca-nitti commented 4 years ago

Is it a problem that NODEMCU is 3.3V , but LPT standard requires 5V?

Back when I made this project I read somewhere that 3.3V was enough to be read as high, and it in fact worked with the printer I was using, but likely the proper way, as you say, would be using level shifters. Maybe your printer is more picky.

Should I use shift register in order to communicate with printer?

Unfortunately it shouldn't make any difference in my understanding, apart from reducing how many lines you need to level shift if you run the register on 5V, with voltage shifting between the ESP and the register as noted in the next page of the discussion you linked on the ESP forums.

pavlinb commented 4 years ago

Thank you for you time.

I'll try some of suggestions.

But seems that my printer is stupid :-)

koller18 commented 3 years ago

Thank you for you time.

I'll try some of suggestions.

But seems that my printer is stupid :-)

Bro, did anything happen? The same printer)

pavlinb commented 3 years ago

Thank you for you time. I'll try some of suggestions. But seems that my printer is stupid :-)

Bro, did anything happen? The same printer)

Hi, sorry, i left the project.

I bought raspberry pi zero and the problem is solved.

koller18 commented 3 years ago

Thank you for you time. I'll try some of suggestions. But seems that my printer is stupid :-)

Bro, did anything happen? The same printer)

Hi, sorry, i left the project.

I bought raspberry pi zero and the problem is solved.

Please give me the connection diagram for the raspberry pi zero. Please, please, please)

pavlinb commented 3 years ago

I folowed this link:

https://howchoo.com/g/ntvlodqwmzq/wireless-printer-raspberry-pi

Works 100%.

Regards,

koller18 commented 3 years ago

I folowed this link:

https://howchoo.com/g/ntvlodqwmzq/wireless-printer-raspberry-pi

Works 100%.

Regards,

I am not interested in rasperry pi itself, only the connection to LPT itself. Which LPT pins you have enabled. I understand the middle level)

pavlinb commented 3 years ago

I used LPT to USB converter. https://m.aliexpress.com/item/4000175557370.html?pid=808_0000_0131&spm=a2g0n.search-amp.list.4000175557370&aff_trace_key=&aff_platform=msite&m_page_id=8150amp-su3qjz458t79GPRu4GIMbg1597596723333&browser_id=de5a313006a445259038f6db430c8557&is_c=Y