also the updated design is visible here
https://github.com/bkw777/REXCPM_UPS
The schematic now also documents which pins are which on the rexcpm too
just for convenience & reference.
You *could* got ahead and export gerbers and order boards right now
without waiting. But I have a set on the way and I did pay for DHL, so
it will only be about a week.
Once I build one and there is no bonehead mistake, I'll update the
readme with links to oshpark or pcbway or both, and add gerber zips
under releases.
I think the board should have ENIG finish so that the battery contacts
are gold plated, but that makes the cost go up a lot on pcbway. elecrow
and jlc are a lot cheaper for ENIG. oshpark is always ENIG.
But the soldermask from jlc is kind of junk. Maybe it's just if getting
blue or black and maybe green is better, but definitely black especially
is weak and scrapes off easily.
I'm still using them though at least for testing because, well that's
why it's called prototyping.
The boms are already updated with the new parts, including an extra male
connector for the rexcpm, though there are no directions or plan or
anything for what exactly to do with that connector. It's an SMT part
and no obvious non-janky way to hook it up yet. Not even sure it even
fits in the space allowed yet (but probably does, because the original
connectors are already 2.54mm thick and they do not take up the entire
space, so 2.95mm should be ok)
There's some other options for the cables too not shown. Digikey has
some plain black wire cables made by JST.
That doesn't matter for the 100 where the wires are inside a
compartment, but for 102 or 200 where it has to run externally and be
taped to the bottom or something it might be slightly less ugly.
12" for 102/200
https://www.digikey.com/short/0m7pnpwm
4" for 100
https://www.digikey.com/short/5b7vjjvq
or 2" for 100 but which might not be long enough
https://www.digikey.com/short/mqh5ncbd
Similarly, although the bom has white connectors from digikey. adafruit
sells some black connectors:
https://www.adafruit.com/product/4208
--
bkw
On 9/14/23 21:26, Brian K. White wrote:
Yes to most of your understanding, not yet on the 4-cell test.
I just ordered the pcb's yesterday so it'll be about a week.
Although there is not much to actually test about the updated board.
It's just more of the same. It's the same circuit. All it changes is
adding more celles and a ground wire.
The gnd wire isn't really a new addition because when the boards are
installed in the machine, there is an equivalent gnd connection
through the normal gnd pins in both sockets.
Both boards do have their local GND connected to the GND pins on their
own respective sockets, and both sockets are connected to the same GND
rail all throughout the 100. So when both boards are installed, there
is a common GND connection between the two boards the same as a wire.
Nothing about the fitment changes, it's the same pin headers and same
battery holders. The pin headers are pretty tall at just over 4mm and
the was a real question if that would fit or if it needed a special
pin header with shorter shoulders. But that turned out ok. Yiu do need
to flush-cut all the pins on top and then ideally touch each one again
to melt the shap cut to a smooth dome. But that's easy. The new board
is no different. The Qwiic connector is new, but it is 2.95mm, and so
that's that, no worry even though I haven't actually got it yet.
So nothing much changes either electrically or physically, at least
not in terms of wondering if it will work or not.
In the mean time, while waiting for the new boards I have had the
original board installed in a 100 with the memory power switch turned
off, and it's still reading 2.69v at the cap right now after... 4 or 5
days so far? My original email was 4 days ago and I had done over 24
hours of testing at that time.
This is good.
The leakage thing is this:
First, background, the REXCPM lives in a socket that was only designed
for a ROM, and so that socket only has minimal bus signals. Just
power, address, data, chip-enable, output-enable. It doesn't even have
a write-enable signal like an sram would have. What matters in this
case is among the things it doesn't have is it has no provision
keeping something powered-but-disabled while the machine is turned
off. It just has a VCC pin the dies when everything else dies.
The system bus has a bunch of other signals, including RAM_RST, which
is held *high* the entire time the machine is "off". This is to keep
sram disabled and asleep by holding their active-low /CE pins high.
Not just for a peripheral connected to the system bus but also all the
internal ram is disabled (or enabled) by that same signal.
I don't know if this signal was originally intended to be used as a
power source vs just a control signal. The internal ram has an actual
VBAT power line on their VCC pins, and there is no pin for that on the
bus socket (even though there are 3 whole un-used pins just going to
waste, and 4 more duplicate GND pins than really needed.)
But a sleeping sram, especially a modern one, draws so little power
it's hardly any different from an ordinary control input. And
definitely the signal was always intended to to be read by many chips
at once, and that creates a load all by itself that is the same as
drawing power for some other use. So REXCPM and QUAD and probably a
bunch of other add-ons use RAM_RST as both power source to keep sram
alive, and control signal to keep sram asleep.
Since the REXCPM doesn't live in the system bus socket, and the option
rom socket has neither VBAT nor RAM_RST pins, it has to get RAM_RST
via jumper wire from the system bus (REXCPM also *drives* RAM_RST when
active, to disable the internal ram, to take it's place, so it needs
the connection for other reasons besides power, but for now we're only
talking about when the machine is asleep and REXCPM is getting power
from RAM_RST). So think of RAM_RST as "VCC" power supply to the REXCPM
when the machine is asleep. It's not a leak or backfeed, this it what
that line is supposed to be doing.
That's the positive power wire, but there must be a matching negative
wire. REXCPM does not need a matching ground wire back to the system
bus to go along with the "VCC" one (RAM_RST) because the option rom
socket DOES have a GND pin, and it's connected to the same GND as the
ones in the bus socket and everywhere else in the whole 100.
The leakage happens when you remove the boards from the 100.
Normally, for any randome device like NODE DATAPAC, or QUAD, RAM_RST
power is coming from the memory battery inside the 100, to the RAM_RST
pin in the bus socket, through whatever device is connected to the
bus, back to the GND pin in the bus socket, and back to the memory
battery in the 100.
In the case of REXCPM, in normal usage, it's slightly detoured but
still basically the same. mem batt pos -> sys bus socket RAM_RST ->
REXCPM -> optrom socket GND -> mem batt neg.
With the boards installed in the 100, but the memory power switch
turned off, and our own battery on the bus board, power is coming from
the battery on the bus board, over the RAM_RST wire to the REXCPM, to
the GND pin in the option rom socket, through the GND plane in the
100, to the GND pin in the system bus socket, back to the battery on
the bus board. Still no weird leakage or backfeeding in this case.
Both the positive and gnd connections are explicit and normal. The GND
is a little indirect, since it relies on the two sockets being
connected in the 100, while the power wire is a direct point to point
connection, but still, it's just a shared GND, nothing actually weird.
Every chip in the computer actually works the same way, it's just like
the RAM_RST wire is like a bodge wire instead of being a trace in the
motherboard.
With the boards removed from the 100, it *should* be dead. There is no
dedicated GND wire to pair with the RAM_RST wire, so, there should be
no power going anywhere. A voltage reading between gnd and any other
part of the REXCPM should just all be 0v, like reading 2 points along
a dead end wire.
But somehow there is power differential between gnd and vmem (or
whatever the positive side of the big cap is, I say vmem because
obviously it powers the sram) on the rexcpm, and 0.7uA of current
flowing along RAM_RST.
So somehow something is connecting from RAM_RST to GND, though, not a
short. And also, connecting from RAM_RST or GND or both to RAM, since
it's the RAM wire that causes it to work, though I'm getting ahead of
myself about RAM.
There are several components that have pins on RAM_RST and on GND, and
one or more of those is leaking or backfeeding. The pins are really
just inputs or outputs that happen to be on the different nets to
detect them, be controlled by them, or exert control on them.
There are only two possible other wires that could be providing the
gnd path, and simple testing by disconnecting/reconnecting things
shows that it's the RAM line. Nothing happens when you connect or
disconnect the /WR line. Which is no mystery if you look at the
schematic. The /WR line doesn't connect to anything on the bus board.
It just goes from the pin on the bus socket to the pin going to the
REXCPM. Obviously it's used for something on the REXCPM, but there is
no connection to anything *on the bus board*. It's can't possibly be
part of the cricuit that starts at the CR1025 and ends back at the
CR1025, because it doesn't touch withe GND or BATT+ or anything else
eve indirectly on the bus board.
One for-sure part of the circuit is the NOR chip on the bus board. The
RAM line goes to a gate output pin on that chip, and nothing else.
That chip has no other inputs or outputs on either RAM_RST or GND.
That chip's VCC is not powered by RAM_RST but directly by VBUS, and
there is a diode preventing RAM_RST or BATT+ from going into VBUS. But
it does have it's GND pin connected to the same GND as the battery.
So power is going from BATT+ through a diode and out on RAM_RST,
something unknown happens in the REXCPM, and comes back on RAM, leaks
over to GND inside the 74xx2G02, and GND on the bus board is also BATT-.
(The 2G02 is just a 2-gate version of a quad-gate of the same type on
the original board. The original board has a quad-NOR but only 2 of
the gates are used. So this is a smaller part that only has 2 gates.)
The 2G02 is part of the leakage circuit, but only part. Something
similar also has to be happening in the REXCPM for it to get from
RAM_RST over to RAM in the first place in order for it to arrive on
RAM back at the bust board.
It's a weak resistive and/or parasited / voltage-divided connection
because it's essentially going through a string of diodes along the
way going through all those transistors passively, and maybe also
being voltage divided from having multiple paths where some paths
drain some current to gnd without it having to go through the sram,
but a sleeping sram needs so little that it's still enough. At least
while the battery holds out.
My initial pessimistic reaction from the initial voltage drop might
just because of the normal way batteries work and maybe it's not
actually as bad as I thought, even without a proper gnd connection.
batteries DO have a significant early voltage drop, but then they hang
at an 80% level almost flat for most of their life, and then really
die all at once at the end. I saw a 0.2v drop in one day, and only 0.2
to 0.4 available left before hitting 2.0v, and said "this thing will
be dead in one more day!"
But maybe it would actually just hang there at 2.4v and take all year
to to get down to 2.0v.
And installed in the machine so far seems to be totally fine. Only the
expected amount of voltage drop from the battery to the REXCPM, and
apparently no or not much parasitic loss through the various other
signals connected to the 100 when the boards are installed. I'm still
right at 2.7 or 2.69v right now. That's at the big cap on the rexcpm,
so that's after going through a diode on the bus board and maybe
another diode on the rexcpm, and with batteries that are now only
making 2.95v at the battery.
2.83 at RAM_RST (so 0.12 drop across the diode on the bus board), 2.68
on the positive terminal of the big cap on the rexcpm, unknown at the
actual SRAM on the rexcpm.
If I were to turnĀ the memory power switch on, then there is no
battery drain on the bus board batteries as long as the 100's battery
is above 3v.
It's starting to look like even the initial version with no dedicated
gnd connection is worth using after all. It will take months to really
tell though. The only thing I can test faster that would be good to
find out is, if the original simpler version is good for more than a
few days outside of the 100?
It might be that even though there is a large voltage drop through the
crap gnd connection, going from 3v to 2.5v before even starting, and
even though the power available at the REXCPM is under 2.4v after only
a couple days, it might be that it then just hangs there at 2.3v or
2.2v for months before actually going that last little bit to get
under 2.0v.
Even if the gnd connection would be better, that would actually
already be a huge help, and would be simpler for most people to use
because you don't have to modify the rexcpm to bodge on some other
kind of connector. Just plug your existing cable exactly the same as
the original board. And, it's not even a compromise except when
removing the rex from the machine entirely. If you're installing *&
removing intermittently so it's only removed occasionally, then no
problem. months or weeks or even mere days is still way more useful
than 15 minutes. If you're just leaving the rexcpm installed all the
time and just want to cover when you leave it in a drawer for a year,
looks like that will be no problem either, because there is a good gnd
connection while installed, and (apparently, seemingly, so far) no
parasitical loss.
But I would really rather it *also* work fully well when uninstalled,
so that's why I'm bothering to add the gnd wire somehow.
The connector on the new board is a standard one that is available
these days cheap and pre-made in a few different lengths by searching
for "qwiic" cables. I don't yet know if the 2" or 50mm size is too
short or perfect, but the next size is 4" or 100mm and that should be
longer then needed but not too bad. For model 102 or 200 you want 12"
or 300mm. That's a little longer than needed but the next size down
might be too short. I'm not actually sure yet because the way the new
board for 102/200 positions the connector, that may actually save 3 or
more inches.
It's easy enough to solder the connector on the new board, easy to
source the pre-made cables (it would be a bear to manually crimp
them), and it's an upgrade in usability in the sense that the
connector is polarized. But one big problem is how to connect to the
REXCPM.
There are a couple different options.
The simplest from the user point of view is you can buy pre-made qwiic
cables that have female dupont pins on one end. google "qwiic dupont
female"
https://www.sparkfun.com/products/17261
The same or equivalent thing is also available from adafruit, and
resold by at least digikey and mouser, and they have their own stock
even when adafruit is out. I actually got one off the shelf retail at
a local micro-center a year or so ago.
https://www.amazon.com/dp/B09WLRBKWT
This will get you the exact same 3-wire connection as before. No GND
connection. No better but no worse. Though, the wire is there, you
could figure out any old hacky way to connect it you want. Like just
solder a single long stiff bent wire like a paper clip maybe to the
big cap and have it extend far enough forward to clear the other
dupont pins and just stick the female gnd wire on it.
Another idea is desolder the original pins and bodge-wire the new
connector to the original pin solder points and gnd on the back side
of the big cap, and glue it to the pcb to immobilize both the
connector and the bodge wires. Or just leave the connector end loose
on flexible wires and only glue down the solder end, and maybe put
some glue and heat-shrink on the connector end. I'm not sure how easy
this will be until I try it. The connector is a almsot 3mm tall and
has to lay on top of some existing components on the rexcpm, so, there
might be a little problem with height there interfering with the
compartment cover. I also expect almost no glue actually sticks to the
connector body, so it might need mounting tape or who knows what.
Maybe I just change the design again to use some other more convenient
type of connector that isn't quite so small but still small enough?
There are cheap male & female pigtail kits for JST-PH 2.0mm that have
a male connactor crimped on to wires. That would be dead easy to
solder the male side onto the rexcpm.
https://www.amazon.com/dp/B081CRLN8B
And I guess the other end could just be wires soldered to the bus
board too, so that one kit does everything, but I actually really
prefer the original arrangement with only fixed connectors (be they
male or female) on the boards and wires only in the cable between. I
would rather figure out some way no matter what it takes, to have just
fixed connectors on the boards.
Maybe I can desolder the original pins but only to slide them up
slightly so that they are as high in the air as they can go before
hitting the compartment cover, and maybe that leaves enough space
between the pins and the pcb to solder the connector to the underside
of the pins, and the pins provide the rigid mounting. Then the gnd
wire can be a loose bodge wire glued down. Maybe I can add a 4th rigid
pin extracted from some other generic header or connector, from the
rear of the cap over to the connector, to solder to one of the
mechanical mounting solder pads on the side of the connector too, as
well as the gnd pin.
The rexcpm side of things is now the unknown tricky part but hopefully
I figure out some plan that isn't too terribly hacky and is actually
doable and solid.