Add-on modules for HP 200LX palmtop PC. USB-serial, WiFi, and maybe even more
To make the experience fit your profile, pick a username and tell us what interests you.
While fuzzing with the PCB layout, I also thought bit about the form factor, especially if the dongle-style I was going for is really good solution. While it is pretty neat to have it in a compact package that you can just stick in (like those modern 3G/4G USB modems) without needing to have cables and such, there are several downsides too. One of the biggest problems what I hadn't been thinking originally is the need for external power. A battery is not going to fit into a dongle form factor, no matter what. Another 200LX specific issue is that the "ground clearance" for the serial port is not very great, maybe less than 5mm. My board designs are loaded on both sides (to get the small size), so while I think they'll still fit, it will be pretty tight and designing any sort enclosure will be a challenge. More generic problem is that dongles are kinda fragile and might end up damaging the host port if knocked off because they are all rigid and sticking out in a perilous way. Finally even a reasonably small dongle will feel pretty big when sticking out from 200LX, just because the device itself is so much smaller in comparison to typical laptop which such dongle might be attached to.
So what I'm going to do? Not sure at this point. One idea I had was that I could form a wire mounting clip and hang the module with it on the screen bezel at the back side. It would not address the battery issue at all, but could be otherwise kinda neat way make the whole setup more mobile.
Another more obvious idea is just to put the module in a external box. I could then fit a small lipo cell in there too, so that would solve my battery problems. The also obvious downside being that I'll lose a lot of portability if I have handle a separate box around. On the other hand, external modems are very retro and I could design a fancy custom 3D-printed enclosure that both evokes old classic modems and matches the 200LX design, kinda same way like some of the adorable SD-card floppy disk emulators I've seen:
While all this pondering does not necessarily affect the PCB design all that much, one thing I do need to decide is what sort of mounting holes (if any) I will be adding. For a bare dongle there isn't really need for those, and as such I hadn't planned for them either (whoops..). But if I want to make any sort of enclosure then I most likely will need some holes. Problem being of course that the board currently doesn't really have all that much extra space as such, and I'm not sure if PCB fabs are happy with this sort of things:
I'll have to check if that is ok. For reference, that's 2.7mm hole from KiCAD library for M2.5 screw, which is pretty much the only thing that possibly could fit in (I guess?).
Of course I could redesign the whole board for specifically enclosure in mind, that would probably allow me to make the board bit bigger (if the battery sits on top of the board), and that way I might be able to do it in 2 layers (current design is for 4 layers, which is slightly extravagant) and single-sided assembly which would make life easier.
Saturday well spent. Now I have all components in, nets routed, and passing DRC.
That 680u cap might be slight overkill for ESP. On the other hand, ESP is said to have very spiky power consumption, so I'll want some chunky cap there.
The prettiness of the KiCAD 3D-view makes me want to model all the parts, just for making pretty pictures. Probably won't be doing that, but it would be nice.
The reset switch placement is not ideal, but I feel like it is pretty much the only available space for it. It might be feasible to swap it with flash toggle switch, have to think about it.
Whole layout is still bit of a mess, I just threw the components in, so yeah, very much WIP.
I was just getting the rest of the footprints set up and that also involved selecting what sort of connectors and buttons do I want. I hadn't really been thinking those before and of course its another rabbit hole again.
First the simpler one; switches. Most ESP devboards I had seen did feature a pushbutton for entering programming mode, that you are supposed to hold down on boot. I began to think that maybe having a slide/dip switch would make more sense, you wouldn't need to fiddle with holding buttons down as much. Continuing on that trail of thought led me to the idea that using SPDT switch (instead of simple SPST) would allow me to remove the pull-up resistor from the pin; the switch would always connect the pin solidly to either Vcc or GND, so no floating around. That's nice win, especially as I'm not 100% confident that my great idea of minimizing BOM and using same 249k resistors would actually work that great as pull-ups as they are bit high valued. The downside of using slide switches here is that now I need to order two different types of switches, pushbuttons (or tactiles) for reset and slides (or dip) for programming. I think the tradeoff is worth it.
The power connector is another issue. I had been thinking just using "some generic power connector", but of course there is no such thing as standard common generic power connector. I could put in 0.1" headers in, but those are not really ideal as connectors and they are kinda bulky too. Quickly googling around people seem to be using among others Molex PicoBlades, whole variety of JST connectors, and I also saw some Hirose DF series ones. They all seem pretty much the same to me. I suppose JSTs are most common (?), but there are also like 10 different varieties so that's not all that helpful. I probably will go that route anyways, but I'll need to do bit more research still.
These are the things that are keeping me awake at nights now. And I was naively thinking I would be getting to PCB layout anytime soon..
In unrelated news, I need to do minor redesign of the ESP module because I have a 5/3 level shifter on it instead of 3/5 one. Of course the USB module will still have 5/3 because it represents DTE, whereas ESP is DCE. And I will be needing to make few null modems, gender changers and straight cables to make everything work.
In retrospect, I probably should edit the list a bit considering how the items grew in length towards the end. But eh, its a rant anyways. And I didn't even get to the higher level software things (XMODEM, SLIP, PPP, Kermit, oh my..). Or AT commands, which are another layer of weirdness.
Quick note on power rail protection. LTC4365 (pdf, digikey) seems nice little device for protecting things; it does under- and over-voltage, and reverse polarity protection. It is bit pricey though, but if that avoids setting things on fire then I think its still worth it. Needs to be paired with dual MOSFET, digikey has plenty of options available. DMG9926 (pdf, digikey) was one of the cheapest. Some never-heard company "Taiwan Semiconductor" had parts (pdf) specifically designed for Li-ion battery packs, that included also ESD protection which might be nice?
Did the math on the resistor values for LTC4365, and 2.49M - 249k - 249k will produce exactly 3V/6V thresholds with <5mV offset and 1-2 µA current draw. Seems good, 249 being on the E48 series and readily available as 1% SMD resistor.
Biggest problem (in addition to cost) might be fitting two chips and handful of passives to the board. We'll see how it goes..
I was doing the schematics for the ESP module, and added a programming header without thinking about it too much. I mean, you gotta program the chip somehow, right?
Then I began to think more how annoying it would be to make a programming jig/board for this, and how 10 pin connector feels bit excessive anyways. What do I really need to get the ESP programmed? Well, basically the UART0 Rx/Tx pins.. and those are fixed to the level shifter and furthermore uses that weird connector, so that's not helpful... except.. maybe.. yes! I should in theory be able to use the USB-Serial module, that I was planning to make anyways, for also programming this ESP module. Sure, it goes through pair of level-shifters for no good reason, but it should work. As added bonus I could also program it with the 200LX itself also if I so desire.
Okay, the plan is not all roses; the thorn here being that both modules have the same female header connector for the serial. Meaning that I need to make a custom null-modem style cable for this specific purpose. But I think I can live with that, if it works. Failing to get it working for some reason, I think I can always fall back to either out-of-circuit programming (this jig looks kinda cute), or in-circuit pogo-pins (something like this). And OTA flashing would be neat too, so maybe I don't need to do wired programming all that many times.
The morale of this post is not as much the specific method of programming, but rather how I was initially kinda fixed on thinking that of course I need a separate programming system and then feeling clever that I got out of that idea and figured out a solution that is much more suitable here.
With the programming bit being dealt with, the schematics are almost ready. I would still like to put in an under-voltage protection to prevent brownouts, and maybe some other minor tweaks for the power supply. And then I need to double-check all the pin assignments etc and then comes the fun part; PCB layout.
Worked on the schematic a bit. Need still to figure out what pins actually are needed for booting (and flashing) and what are free for use.
Need also to drop in the LDO, but I need to create kicad part for that and too tried now for such things.
Fun fact: the pin numberings of a random github library part don't actually match the pin numbers in ESP-12F datasheets
I realized that while the USB-module is a piece of cake as there is USB power available, I have no such luck with the wireless module. So I need to figure some way to power the ESP-12F module and the level shifter. Couple of alternatives that came to mind:
Ideally I'd have power port that would accept anything between 3-6V, and convert that efficiently to whatever I'd need. For first revision, I'm kinda tempted to just throw a decent LDO in there and then add proper SMPS on later. It is somewhat questionable how much "real-world" use this will ever see anyways, so it should be fine. Besides, 2000mAh should last for something like 5 hours even with just LDO, so that doesn't sound that bad.
I will want to have some under-voltage protection to prevent brown-outs etc, even if I'm using protected cells or batteries that don't care.
A random reddit link that might be useful: https://www.reddit.com/r/esp8266/comments/4gmkfl/how_to_actually_run_an_esp8266_for_months_on_aa/
Found couple of other projects that are doing similar things. These two are somewhat C64-focused so the featureset does not exactly match my use. Still useful for reference. I would expect that there are probably tons of others too, considering how obvious this sort of project is.
https://github.com/bozimmerman/Zimodem This seems really feature-packed
Become a member to follow this project and never miss any updates