03/30/2016 at 18:11 •
I'm putting off destroying my existing CurrentCost IO board for a while (by soldering bodge wires to it whilst I test my ESP code). Therefore, I decided to do the first round of schematic capture.
It's a pretty simple board. I've mostly replicated the existing wiring but broken the TTL serial lines and put the ESP8266 in between. I've found that you can have "sort of" two UARTs on the ESP8266 by using the Serial.swap function which lets you mux the uart tx and rx pins between two sets of physical pins. Really it's only the RX pins that I care about (as far as I know, the CC doesn't do any receiving at all), which I want to be able to swap between the CC and the external terminal for bootstrapping and, indeed, reflashing. In this case, the external connector is going to be getting the default pins so that I can reflash it from the outside world without too much bother.
And there's an LED on it. Because, LEDs, dood.
Apparently you have to hold GPIO15 low. Hopefully that's not going to cause issues with the serial line from the CurrentCost driving that as well :-/ (there probably will be issues with that...)
I've stuck a "pin header" in that lets me put it into re-programming mode. Probably won't populate that, just hold something pressure-fit style whilst it boots to get into the right mode.
I tried to use those lovely RJ1x connectors I found before, but as it happens they're really quite fat and take up far too much room. So pin headers it is.
Here's the first attempt at a layout:
It looks like everything should fit - just. There's a fair bit of tolerance in the casing for moving things around ... so it looks fairly achievable.
(ignore the pointless groundplane to the right.... )
Now I know I'm not completely wasting my time, the next task will be butchering the existing board and hooking up some dev boards and see if I can put together some code that will work - at least as a proof of concept.
10/26/2015 at 14:12 •
After a long time of this not being an active project (I got a fun bit of commercial work that absorbed my time, and taught me lots about PRJC's Teensy 3.1! But for another project...) I was reminded of this by being given a "skull" by jlbrian7.
As it happens, I've recently ordered a bunch of ESP8266 dev kit (a nodeMcu board, and a couple of bare ESP-12E's), and had a hankering for more PCB design, so finishing this project seems like a natural choice.
One of the things which I picked up on earlier was the fact that the RJ11's in the middle couldn't be the same through hole components used on the original board, as the pads would get in the way of the ESP module sitting flat against the board. Fortunately, with a bit of parametric searching on Farnell, I've found some Molex RJ11 connectors that have both surface mount contacts AND mounting points, so they won't poke through to the other side of the board and interfere with the module.
Flat as a pancake
And they're not hideously expensive either at £0.775 on the UK Farnell site at the moment (Order code 1471565). The body of the connector is 18mm long, which, with the contacts, might make it a bit of a squeeze. But it should fit. True, I won't get the same mechanical strength I would with through-hole mounting posts, but these are for internal connections that will only be mated once or twice (I hope!) and won't have any oafish users (like me) plugging heavy cables in from the outside and pushing them about on a frequent basis.
The RJ45 and DC jack, on the other hand, are the vertical type, and I won't bother with surface mount as it'll simply take up more board space than it needs to (the contacts will have to point away from the connector, rather than straight down through the board). Also I'd like to retain the mechanical strength afforded by fixing them through the board, as this connector will be accessible from the big scary outside world, where there are ogres with TTL to USB cables and DC wallwarts who want to break my connectors.
01/29/2015 at 16:56 •
There's not a great deal to the existing I/O board. We can deduce from various documented pinouts for the RJ45 connector what the two RJ10 connectors do. And obviously we know what the DC jack does.
Cor blimey, those two power lines are awfully close! Not sure I'd trust a cheap high volume fab house with that sort of spacing (especially if they're the ones who soldered the DC socket on wonky...). Pins 3 and 4 of CON2 (middle left) are a bit mysterious - but I highly suspect they're RTS/CTS. We don't really need them - they may just be there for factory programming or debugging or testing or something. If you check out the main board, it doesn't look like they go anywhere...(photo purloined from Jack Kelly here). I guess the track might be on the other side, but I don't fancy dismantling my display if I don't need to!
Anyway, we can extract a schematic
Groundbreaking stuff, right?
The challenge will be finding a way to fit the ESP-12 onto the new board without it interfering with the required connectors. The internal RJ10 connections can be moved around a bit (possibly even off the board entirely with a breakout if needed, although that would require another board so I'd rather avoid that), and we might be able to get surface mount versions of these connectors to make a hole free space (although the retaining posts might be problematic).
Ideally, I want my board to be a drop in replacement - so I want to avoid changing the connectors if I can. Whilst it may be easier to change those RJ10's for pin headers, that makes it more difficult to install on a unmodded unit.
01/29/2015 at 01:08 •
Adding an extra thing to the device means we have to make sure there's enough power available to run it.
The power hungry ESP8266 can draw up to 220mA or so in 802.11b mode, CCK 1Mbps at max power. In my instance, since the EnviR is about 5cm away from my AP, we could certainly reduce the power by using a less power hungry mode. But since these ESP8266 chips seem to have an amazing range it would seem a shame not to be able to use it !
The power coming from the plugtop supply that comes with the EnviR is 3V unregulated rated to 80mA, and on the EnviR's main board we can see a little PSU section with a SOT-23 regulator (what's that, HFEK? looks like a linear regulator, probably a LDO 3.3V of some sort?) and a couple of decoupling caps for good measure (photo purloined from Jack Kelly's teardown here).
The PIC18F86J90 (see a photo of it here, from Jack Kelly (not me)) which runs the main board can run on anything from 2.0V to 3.6V, and the ESP8266 can run between 1.275V and 3.6V. So whatever voltage that regulator is outputting should be fine for the ESP.
If I replace the plugtop PSU with something a bit beefier that can deliver, say, 300mA, (like this one from Rapid, perhaps - 3.3v 1.5a Mini Plugtop Sw Mode Psu ) then the question then is whether that PSU section on the main board can provide enough current or not. Chances are the regulator is capable of at least a couple hundred mAs, but we'll have to test it. If it can't provide enough current , we'll have to add our own regulator circuit on the I/O board - something I'd like to avoid if at all possible.
Further measurement and poking is required.