• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Powerbook 1xx internal wifi modem emulator Rx/Tx woes

desertrout

Well-known member
Hey! I'm hoping someone is willing to share some insights for an issue I'm hitting with an internal PB 1xx NodeMCU (8266) wifi modem emulator board I'm fussing with... whenever the board is powered and connected internally, the PB acts possessed.

I've got a pcb with the ESP, max3232 and necessary caps, and the connector fitted - fits great in the internal modem header. The board works properly when powered externally and connected to the external modem port from my PCB's connector, so I know Rx, Tx, and GND are wired up properly for a basic three-wire hookup. Great!

However, things get weird when installed internally. Here's what I can tell you:
- I bridged /MODEM.INSERT and GND, and the board is being detected because I can choose the internal modem from the Powerbook control panel when it's installed (vs no option when it or any other modem is installed)
- I do have the 10k resistor between MODEM.PWR and MODEM.5V (now that read the relevant part of the 'Designing Cards...' docs, lol. Link, pp.502-515: https://vintageapple.org/inside_o/p...for_the_Macintosh_Family_3rd_Edition_1992.pdf )... and the card does power up when I load something like ZTerm
- If the card is powered externally via the NodeMCU's USB jack or directly from US5V on J8, the PB itself starts acting up - it's like it starts messing with trackball signals, where Finder windows scroll to the top and items are seemingly randomly selected
- If the card is powered internally (via MODEM.5V), it still acts up but obviously only after powering up... but by this time I have ZTerm open and it's sending a constant stream of nonsense data to the terminal window... even though the settings are exactly the same as when it was being connected to the external modem port and was working properly...

I do have some additional things to try after looking at https://subethasoftware.com/2018/02...-under-10-using-esp8266-and-zimodem-firmware/ -- and I will keep digging into RS232 literature (I'm just figuring this out as I go), but if anyone has a hint as to what possibly could be happening here I'd love to hear it.
 

desertrout

Well-known member
OK, so after some trial and error, it seems at least one of the symptoms were unrelated to my board - the random-selection-of-things was actually due to the PB being on its side (for access), so, yeah.

Still get some 'nonsense' in the terminal... which is actually the character I type plus another, different character - except U. U's are doubled so... is the internal connector TTL? Or is it something else, like an echo ?

(And yeah, the external ports are RS422 not 232... but this emulator is three wire)
 
Last edited:

twelvetone12

Well-known member
I *think* the Rx line needs to be pulled, you can have a look at my airtalk board in the other thread, it communicates with an esp and is quite stable. I can also paste the schematic here but I can do it when I get off the train this night.
 

desertrout

Well-known member
I *think* the Rx line needs to be pulled, you can have a look at my airtalk board in the other thread, it communicates with an esp and is quite stable. I can also paste the schematic here but I can do it when I get off the train this night.
Hm, yeah ok. I grabbed your Kicad files from Bitbucket and took a look - verrrry helpful - thank you! What I'm seeing is confirming for me that my original plan of taking the original serial modem design and jamming inside isn't going to work lol - I shouldn't have a serial line driver in there at all but just a level shifter like you have.

When your say Rx, do you mean from the ESP (i.e. TX_PB)?

If I'm understanding what I'm seeing correctly (unlikely), it also looks like you're taking advantage of DCD to let the PC know when the ESP has completed booting and connecting to Wifi - is that right? I'd also like to know more about the GEN_ACTIVITY / CTS and if that's involved too... one of the things I'd like to manage is managing state while the ESP boots and connects to wifi.
 

desertrout

Well-known member
So, yeah, it's TTL. You can even connect the ESP module directly to the internal connector without a level shifter and it works. I have a prototype with a level shifter anyway that I'll make into a board.
 

twelvetone12

Well-known member
Sorry I was away and I lost a bit the thread here :) I do use DCD and DTR as "gpio" lines that I probe on my CDEV. For the 5v tolerance, I've read everything and the contrary, and to be sure and avoid long term braseros, I run my 32s only with 3.3v shifting were needed.
 

desertrout

Well-known member
Sorry I was away and I lost a bit the thread here :) I do use DCD and DTR as "gpio" lines that I probe on my CDEV. For the 5v tolerance, I've read everything and the contrary, and to be sure and avoid long term braseros, I run my 32s only with 3.3v shifting were needed.
Ah thanks - and no worries, I'm happy just talkin to myself. :)
 

demik

Well-known member
You will definitively kill the ESP longterm by using 5V in IO pins. It may works fine on a breadboard, but that's not ideal. So good job voltshifting that

Don't know about the 8266, but from experience ESP32s are (relatively) power hogs with bad transient loads. We are talking 500-600 mA power spikes and the PowerBook internal modem is only rated for 150 mA in operation (95 mA typical).

However, the external power up issues make me thing your power domains are mixed somewhat, and thus you are overloading or adding noise to the powerbook internal power control circuity (which is used by the trackball / keyboard indirectly as well) : That's a different issue

I suspect both issues happens. Can you enable the brownout detector on your ESP32 and see if it gets triggered ? What's your decoupling strategy ? You may need between a 10-100uF Tantale and one X7R 100nF cap to get stuff stable in there (on top of what's needed for the LDO)

Is it possible to share schematics ?
 

desertrout

Well-known member
You will definitively kill the ESP longterm by using 5V in IO pins. It may works fine on a breadboard, but that's not ideal. So good job voltshifting that

Don't know about the 8266, but from experience ESP32s are (relatively) power hogs with bad transient loads. We are talking 500-600 mA power spikes and the PowerBook internal modem is only rated for 150 mA in operation (95 mA typical).

However, the external power up issues make me thing your power domains are mixed somewhat, and thus you are overloading or adding noise to the powerbook internal power control circuity (which is used by the trackball / keyboard indirectly as well) : That's a different issue

I suspect both issues happens. Can you enable the brownout detector on your ESP32 and see if it gets triggered ? What's your decoupling strategy ? You may need between a 10-100uF Tantale and one X7R 100nF cap to get stuff stable in there (on top of what's needed for the LDO)

Is it possible to share schematics ?
Good questions. To clarify, I'm not powering it externally: I'm using an NodeMCU ESP8266 module powered from the PB's MODEM.5V pin - so it's being powered internally, and only when the modem is in use. I was testing a bit with external power during some early troubleshooting, but the intent was to use internal supply.

However, I am definitely aware (and leery) of the spikes the 8266 draws during booting and packet operations (around 300mA, ~70mA otherwise) and the mismatch to the PB's requirements you highlight, and it's one reason I'm not super committed to this idea; it is just a whim, and an opportunity to dig into something new and maybe learn a few things. I'm calling it a success on that front so far.

So, I'm exploring. If there's a way to make this work, it would be neat.
 
Top