Weekly Update: June 17&24, 2017

Two weeks in one? What gives, Andon?

Well, last week I was waiting for circuit boards to arrive, and didn’t touch any coding. So there’s that update.

This week’s a little late (Note that I’m writing this on Sunday the 25th…), in part because I was doing a bunch of things early in the week and also in part because I didn’t get the circuit boards until about mid week.

It turns out, the ESP8266 is significantly more sensitive to things like trace interference and signal disruption than ATMega328s. I know, what a surprise. The ESP8266 is running at 160MHz, and the ATMega328s on the V2 run at 8MHz. A 20x increase in run speed affects a lot, and the boards had a few design things that, well, shouldn’t be done.

Between yesterday and today, I managed to, hopefully, isolate the problem, with GREAT thanks to MintShard on Discord. Mint ran me through several tests and questions, and I was able to figure out how to get the board to start reliably.

Prototype 4 has quite a few changes from Prototype 3. Primarily, the trace width has been increased from a hair above 0.2mm to 0.254mm, and spacing between traces has been increased from 0.1mm to 0.15mm. Wider traces mean clearer signals, and more spacing means that there’s less around the traces to cause noise on the lines. Additionally, several traces – Primarily, the backlight traces, the culprit for the issues I was having – have been re-routed and their components moved to avoid anything running parallel on both the top and bottom side of the boards. The Backlight traces were running parallel to the traces for SPI MOSI, MISO, and CLK along with GPIO0, and from what Mint and I could figure out, this was preventing the ESP module from reading its own flash reliably and thus, it wouldn’t boot up. The final change to P4 over P3 is that the single GPIO header has been split to two separate headers. This allows for fewer traces to make cross-board marathons, as the ESP pins are close to the ESP, and the ATTiny pins are close to the ATTiny. Two other changes were also made to the GPIO headers. First, as they are broken out in the ATTiny’s ICSP header, the I2C lines and ATTiny’s GPIO3 have been omitted from the other headers. If you want to use them, you’ll need to use the ICSP header for it, so plan accordingly. Additionally, the ESP8266’s TX and RX lines, along with the DTR and RTS pins for the CP2102, have been broken out. This is primarily for my own benefit, as my reflow oven (Or perhaps my solder paste) doesn’t like to reflow properly, making it next to impossible to solder the CP2102 onto the board. Instead, I’ve been using an external CP2102 board, but that requires a few things being hacked on in places that aren’t really a good idea. I’ve already pulled a pad off, but luckily it was still attached to the trace and soldering a new resistor on is holding it in place. For now.

In Non-DigiBadge related news, I’ve embarked on a bit of a personal project. It’s ended up being far more complicated than it really needs to be, but oh well, it’s been fun. I’ve purchased an RC tank off of Amazon, and am now completely gutting the thing and replacing everything. The original design had a super-weak airsoft “cannon” that wouldn’t be able to fire through wet toilet paper, so I pulled that out. I intend on replacing it with a laser of some kind – Maybe just a standard diode, but the potential for a higher powered, longer-range, and potentially baloon-popping/paper burning laser is there. I’m also working on making the turret rotate via a stepper motor, and I’m replacing the motors that drive the treads with motors that’ll allow me to put encoders on them. This will let me have better control of speed and steering.

Other modifications will include a longer-range transmitter/receiver, which can theoretically go up to 1-1.5 miles (In a straight line, nothing blocking, etc. You know how it works), along with a camera transmitter setup so I can see what the thing is doing a mile and a half away. I don’t actually expect to go that far, as there’s no sidewalks or other safely traversable things nearby and despite it being shaped like a tank, it’s tiny. It can’t go overland. Maybe in some recently mowed grassy areas, but it is most definitely an indoor toy.

Anyway, that’s all for these two weeks. I should be getting the updated PCBs later this week. We’ll see how terrible of a job I did on them as well. As always, you can catch me over on Discord, on Twitter, or on Facebook.

Weekly Update: June 10, 2017

One step forward, one step back, and maybe a step or two to the side.

No, we’re not dancing. I’m describing the power for the V3. With BronyCon approaching faster than I’d like – 9 weeks away from now – I can’t really take too much time to re-design things. I tried two things: One, a separate power supply board, and Two, using a single buck/boost regulator.

Neither of those are going to happen.

The separate power supply board is simply too expensive to start off with. If I was getting 500 of them, that wouldn’t be an issue, but with a production run of around 100 units, it’s about 3x more expensive than it should be. That said, an updated V3, when I have the opportunities to purchase in larger quantities, may feature a separate power supply board. Additionally, such a power supply board would be available separately for whatever sort of crazy contraptions you can think up. I AM going to be integrating most of the power supply board’s design into the V3 – That is, the ATTiny84 for control and additional GPIO and battery monitoring.

The voltage regulators, on the other hand, are going back to the ones that have been tested and I know work. The single buck/boost one I simply could not get functioning. If that was an issue with the soldering, or board design, or something else, I don’t know – And I don’t really have the time to figure that out. Both of the other regulators I have tested and work fine. Thankfully, there isn’t much of a price difference, it’s just a matter of squeezing them onto the board. Which I’ve already done.

In other news, it seems unlikely that there will be a case ready for BronyCon. While I really hope this next design will be the one I get a fully functioning prototype out of, I’ve said that for the other ones, too. I’ll be honest – There is entirely a possibility that the V3 will not be ready before BronyCon. I really doubt that will happen – Especially with having someone else manufacture them – but it IS possible that things just don’t work out. That said, there’s still about six weeks to work with, so I’m not terribly worried yet. I’ve already placed an order for more prototypes, so right now I’m just waiting for them.

At this point, I’m sure you know the drill. DiscordTwitterFacebook.

Weekly Update: June 3, 2017

Hey guys!

I’m late again. Was working on the latest V3 prototype last night and suddenly it was 3 in the morning. Oops. At least I grabbed a shiny picture:

So, what makes this different from the previous versions? Well, pretty much everything. It’s largely the same circuitry, but everything’s been moved around and reorganized to fit better and have fewer traces having to go entirely across the PCB just to go back to where they started. There are a few changes, though.

First and foremost, I’ve decided to try and make a separate “PowerBoard” for the device. This consists of a boost-buck regulator instead of two separate regulators, plus an ATTiny84 to control it. The ATTiny84 has 11 GPIO pins, of which two are being used for I2C communication with the ESP8266, one is being used for monitoring battery voltage, and the last one is being used to control the voltage regulator. This leaves seven GPIO pins free to use for the device the PowerBoard is attached to. The V3 ties one of them to a button, to turn the power back on when that button is pressed. The ATTiny84 runs directly off of the battery power – or USB power if it’s available – so is, essentially, always on and monitoring the inputs. Its power consumption is fairly minimal, and will be minimized as much as possible. It’ll likely be put into a sleep state when the regulator is off, turning it back on when it’s awoken.

The PowerBoard being an I2C device does a few good things for the V3 board. First, as it monitors the battery voltage, the I2C ADC can be removed. That ADC was, roughly about the price of the ATTiny84. The single voltage regulator instead of two is also about even in terms of price. Additionally, since the PowerBoard is an I2C device and we’re not controlling the voltage regulator directly from the ESP8266, we’ve freed up a GPIO pin on the ESP. That has now been tied in to a transistor which controls the backlight, removing the need for the I2C Digital Potentiometer.

In addition to that, there’s the six unused GPIO pins from the ATTiny84 that are broken out, in addition to an ICSP header for programming said ATTiny84. In all, the 18-pin breakout header has pins for all three voltages: +5v USB power, +3.3V Regulated power, and the Battery raw voltage. The regulator can handle anything from 1.8 to 5.5v, making a LiPo battery perfectly suitable (Although I’d recommend adjusting the ATTiny84’s programming to not discharge it too much. And there’s no charging circuit). There’s also two ground pins, the ESP’s three SPI pins, the two I2C lines, the ESP’s ADC line (Which is linked to the buttons, but with the right resistors you can add more. Or you can read them from something else), and all seven of the PowerBoard’s GPIO pins. One of them is linked to the power button, but this can allow for an external wakeup from another device.

The PowerBoard also allows for a great deal of versatility in V3 design. If I wanted to make a LiPo powered V3, it would only require changing the battery and a different PowerBoard with a charging circuit included. If I decided to redesign with a more robust and powerful regulator, it would only require changing the PowerBoard.

I’ve ordered some prototype PCBs for the PowerBoard, which will let me test the voltage regulator circuit independent of the V3, and I’ve inquired into what would be necessary for manufacturing it. It may turn out to be too expensive to do in this fashion, but at the very least I’ll have the circuit tested and not have to worry about that on the V3.

Until next week, you can find me on Discord, on Twitter, and/or Facebook.