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.

Weekly Update: May 27, 2017

So, this one’s a bit late. I apologize. It’s been a long weekend at my primary job and it’s worn me out.

On the plus side, that’s now over, AND I have three days off this week. Once my DigiKey order arrives, I’ll be able to hop into some more testing. And speaking of testing – A major landmark in this past week! I managed to upload code to the ESP-12 on the new board. It looks a bit funky, as I had to horridly cobble on some headers into places where they were never designed to be in order to bypass the CP2102 chip, but it worked.

Look at those horridly-cobbled-on headers!I also soldered on the SD card slot, and that worked mostly flawlessly too. The test program picked up the SD card and files just fine, and while a separate one didn’t I’m not too bothered. The SD card is also much easier to remove, unlike the first prototype where it was incredibly difficult. As you can see, it’ll have to be moved to the side some to allow for proper access to the mount hole, but that’s a minor issue.

However, I ran across two issues when attempting to put the rest of the devices on the badge: One, I forgot to order the 1% resistors for the buttons (Oops…), and two: It now isn’t uploading any more programming. I’m not entirely sure at which point the uploading failed, so I’ll have to go back through step by step and test things as I go to see where things went wrong.

Additionally, I discovered an issue in the way the voltage regulator(s) were set up. While they seemed to be functioning (I only managed to test the USB regulator), they wouldn’t stay on even when the ESP was programmed to keep them on. So I’ve begun looking at ways around this issue. Currently, I’m poking through a design that uses an ATTiny running directly off of the battery or USB power (Yay diodes!). The ATTiny can be run as an I2C slave, meaning no extra pin usage on the ESP-12 – In fact, what would have been the power line would now be a free GPIO line. I’ve done some testing with the ATTiny85V that I have and it looks good so far. The ATTiny85V has just barely the number of wires I would need, though, and for curiosity’s sake I looked into the ATTiny84. The 84A has 11 I/O pins to the 85V’s 5, and was actually slightly cheaper on DigiKey. I sent a request to the PCB Manufacturer to get the price of the 84 to see if they can acquire it at a similar price. Additionally, if I use the 84, I could potentially drop the digital potentiometer and drive the backlights from the 84. The digital potentiometer isn’t extremely expensive, but being able to offset the additional price of the 84 some would be great.

I have a DigiKey order that I’m waiting on that has a few 84s to experiment with along with the 1% resistors. I’ll be designing a new PCB to get prototypes of once I have a few more things figured out and adjusted, as there are a handful of things that didn’t line up on their footprints quite so nicely.

If you want to yell at me for being extremely late with this update, you can find me on Discord, on Twitter, and/or Facebook.

Weekly Update: May 20, 2017

So.

I did this:

My reflow oven isn’t the best, so running it on the automatic settings generally doesn’t work. Putting it on manual typically works like a charm. Unless you set it to heat, step out of the room, and get distracted. I think the thing was well over 300C, probably 350C, before I caught it. As you can see, that’s well beyond rated temperatures. Also, it smelled. Oh boy, did it smell.

Anyway, that was the first test of the V3 Prototype 2 board. Getting the CP2102 soldered on correctly is being a complete bear, so I’m likely to bypass it for the next test, just to make sure everything else is working correctly. I only have one more ESP8266 module not attached to something, so if I fry this one I’ll have to wait until Monday when more arrive.

Honestly, at this point, the biggest holdup is the CP2102. Getting it to solder properly has been a bear. I have a new, fine-point tip ordered for my soldering iron that may help with any bridges that form, but as long as I can get the device itself working, I’m less concerned about the UART bridge. Thankfully, the minimal equipment to test is, well, very minimal – A handful of resistors, two transistors, and the ESP12 module. That’s enough to make sure the ESP’s wired correctly, and once that is confirmed I can go from there.

Now that I have the boards, I’ll be back to prototyping and testing, and I expect a more substantial update next week. You can find me on Discord, on Twitter, and/or Facebook before then.

Weekly Update: May 13, 2017

Updates, updates, updates!

Last week I mentioned the project I was working on for the lightsaber interior. I can happily say that they are all assembled, tested, and working and will be shipped out soon. Look, I even have a picture!

I managed to impress myself with this one, as usually there’s at least one device that needs to be fixed or tweaked to make it work. These guys all worked like a charm, first time. Granted, they’re super simple, consisting of an ATTiny85, a 10k ohm resistor, and a MOSFET, but I’ve learned to never underestimate my ability to make some stupid mistake and put something in backwards.

The test PCBs for the V3 won’t be here until Monday, and given the way things are going that means I probably won’t be able to touch them until Wednesday. I’ve been busy at my regular job (I don’t recommend working in a grocery store during the holidays… and there are a lot more of them than you think), so haven’t had a chance to really fiddle with the code much either.

So instead, I want to talk about the next product I want to develop, once I have the funds and the V3 is finished. It’ll take a significant amount of time to work out, but I’ll be able to work off of the V3 as a base to get it working a lot quicker. It’s also something that Michael (Who I made the ATTiny/MOSFET boards for) has been prodding me for a while to make.

What is it? Why, a tricorder! To be fair, it’s not actually a tricorder from Star Trek, but it is along similar lines. Simply put, I’m going to be taking as many sensors as I can get my hands on and jamming them into a single handheld device. An accelerometer, magnetometer (AKA, a compass), GPS unit, temperature and humidity, barometric pressure, a variety of gas detection sensors, distance measurements… While this list includes a number of things I want to include, it doesn’t include everything. And just because something is on this list doesn’t mean it’ll be on the final board. I do intend on having some designated expansion slots on the device as well, as there are some things that are simply too expensive to include in a base device. Take, for example, the LinkSprite JPEG Color Camera – It can output to an RCA display, and can also take JPEG pictures. Incidentally, the ESP8266 can display JPEG pictures, allowing it to display directly the images this camera takes. It’d be a cool addition, but not worthy of adding $50 to the pricetag. On the other hand, if someone wants to add it to their device, that’s  great!

I’ll be back to talking about the V3 next week. You can ask me questions about the V3, the ATTiny/MOSFET, the tricorder, or any number of things on Discord, on Twitter, and/or Facebook! See you next week!

Weekly Update: May 6, 2017

Greetings, everyone, and welcome back!

This week, we have a handful of things to talk about. I did the “last” testing required to get the V3 design to where I could send it off to get another set of prototypes printed. I also worked a little on the code, getting the badge code and Pride Flag code functioning. I still have to re-implement image and slideshow modes, along with rebuilding the menu system, but that can take some time to be done. I also am having issues with GPIO0 on this device, but even with those issues I can still upload code so I’m not terribly worried. Just annoyed. Hopefully those PCBs, along with the others, won’t take terribly long to get here so I can start testing them out.

On Sunday I mentioned a secondary project. This one requires a little bit of explanation, since while it’s a simple device, it’s incredibly specific in its purpose and design. My friend Michael is part of the Golden Gate Knights, a group of Star Wars Lightsaber enthusiasts who train in the proper methods of saber combat and stage choreography. Michael is working on a saber for a friend of his, and wants to introduce a slight flicker to the blade. These blades aren’t your typical saber blades, because as mentioned in their web page, blades with LEDs going their whole length tend to have LEDs die under repeated impact. Instead, they use high-powered LEDs at the hilt – Enough to require a heatsink and a significant power supply.

So, while the requirement was fairly straightforward – Apply PWM to the feed of one of the LEDs – the power required made it outside of almost all “Standard” approaches. To that end, he contacted me, seeing if I had any input. My design was fairly simple – As the LED uses close to 3v of power, I can hijack that to run an ATTiny85. The ATTiny then runs its PWM output to a MOSFET, which controls the LED. I ordered the parts to prototype it, confirmed the design worked, and then sent off for the PCBs. The device is super simple – ATTiny85, a 10k resistor, and a MOSFET, along with programming pins, power pins, and LED pins. This device won’t be on the store soon, as the V3 is taking priority funding, but it’ll be there eventually. I have a bunch of ideas for saber bits and bobs that I’ve tossed back and forth with Michael, so don’t be surprised if something else shows up, too. If you have any ideas, feel free to toss them out. And, if you want something custom built, I’m completely down for that as well. It’s not always cheap – Michael purchased the entire production run – but I’m willing to work with you to see what we can build. Especially if I can sell it later.

That’s all for now. As always, you can hit us up on Discord, on Twitter, and/or  Facebook!

Weekly Update: April 29, 2017

So, this one’s a bit late. It’s also going to be a bit short: Nothing happened. That’s condensing things a bit, but is generally true. I had a tooth out (Stupid wisdom tooth… Maybe the other three will stay in line now!), which ate up my days off. My primary job’s schedule didn’t leave me a lot of time, either, and spring has not played kindly with my head. A bunch of factors led to nothing happening, but oh well.

I have received more parts to test with – Some diodes will let me experiment with the power enable pin and make sure that works as intended. I’ve received pricing and availability on the regulators (High to low) that I sent off, so I’ve picked the one I want and I’ll be integrating that into the design as well. Beyond that, I’ll be chipping away at getting the code back to a functional state, as the new TFT library doesn’t like everything I had in the old one. And since I don’t know which part of the old one it didn’t like, and the code can definitely be improved a lot, I’m just re-writing it all.

End-goal by the end of the week is to have another prototype design ready to be sent off. I’ll also be updating you on a simple side-project I’ve got going for a friend. It’s specific and niche, but I’m sure some of you will love finding ways to bastardize it.

And that’s it for this, ah, last week. See you on Saturday! Or, if you’re impatient, hit us up on Discord, on Twitter, and/or  Facebook!

Weekly Update: April 22, 2017

Oh man, another “late” one!

I’ve done a lot of things this past week. The prototype parts came in on Sunday, and I started fiddling with them on Tuesday and Wednesday. As of now, my prototype consists of a dual-breadboard setup with loads and loads of wires and about 90% of the prototype parts. I’m not using the NodeMCU ESP8266 breakout any more, as I have the ESP12-E module on a straight breakout, connected to all of the other components.

I figured out that the digital inverter I was using for the card detection on the SD card wasn’t quite up to spec – Instead of pushing a high signal with a low input, it went into high impedance mode. Thankfully, there’s an inverter that does exactly what I want to do, made by the same manufacturer and with the same footprint and pinout, so it was an easy replacement.

I also discovered that with the way the digital potentiometer works, I have to hook it up to the cathode(s) of the backlight LEDs, instead of the anodes. This meant a bit of re-wiring for the PCB, but that’s not a terribly big deal. I did make sure the device itself worked, so I don’t necessarily need to have it hooked in to the prototype just yet.

In additional news, I’ve decided to put a simple linear regulator on the board, to drop 5v down to 3.3v, either from a USB or outside source. The device is inexpensive, so it shouldn’t have a significant effect on the price of the device.

Speaking of price of the device, I’ve done some research into packaging! I was originally going to try to be extra cheap and try to get a simple box with a cardboard wrap around it that had the art/design/whatever printed on it. Then that was a bit pricey, so I though using stickers would work. Then that was also a bit pricey, so I looked into full printed boxes, and they’re a little more expensive – But totally worth it.

As far as expenses are going, the V3 badge is a bit pricier than I hoped, but ultimately this helps me a lot. Once the design is worked out, I can simply e-mail the manufacturer and have them produce a bunch. And with a printed box, packaging, shipping, and storing is a lot easier for everyone involved. Overall, it saves me a ton of time – And as they say, time is money. It’ll mean the turnaround time for conventions and the like will be a lot lower, allowing me to go to a lot more – And the more conventions I go to, the more sales I have, which means I can build up money reserves, which means I can build up stock, making me able to go to more conventions… You get the picture.

That wraps up this week. As always, you can join us on Discord, on Twitter, and  Facebook. Until next week!

Weekly Update: April 15, 2017

It’s time for another round of Good News, Bad News!

Let’s jump right into things. The first set of Good News is that soldering the QFN chips was actually pretty easy with my reflow oven. I just made the board look a bit nasty with the flux. That, combined with a bunch of hand-soldered parts, had me connected to the chip fairly quickly.

It went downhill from there, however. There’s an issue with the circuit board design, and the result is that the ESP module can’t be programmed. That is more than a bit unfortunate. I’m still tracking down the exact problem, and the prototype parts for that have been ordered and should be here on Sunday. Hopefully, I’ll have it squared away fairly quickly and will be able to put in the modifications I need to get the board working. I also noticed a few other issues that will need to be addressed with the board, so those will be fixed from there.

In more Good News, MintShard on Discord mentioned a speedy TFT driver for the ESP8266. Testing it out showed some great improvement to the programmed badges – The Adafruit libraries took about 750ms, give or take, to display a badge. After a few tweaks to the eSPI driver, it was displaying those at about 45ms.  That’s something like a 94% improvement in speed. It wasn’t perfect, though, as BMPs didn’t load well at all. They weren’t positioned correctly, and the colors were several types of wrong. And they weren’t any faster, either, taking about 1600ms instead of 1780.

I poked around a bit, and found the author of the driver also had a JPEG Decoder. And boy, is it great. The V2/V1 aren’t capable of running the code to do it, but the ESP8266 on the V3 is, and that’s one of the reasons I chose it. Testing showed it was much, much faster as well. Two JPEG images I tested it with displayed at 509ms and 265ms. As JPEG images are compressed, the speed will vary from image to image, but that’s still about a 70-85% improvement in speed. Additionally, being JPEG compatible makes it a lot easier for end-users to put their own images on the device. I haven’t checked to see if there are restrictions on JPEG image types like there are on the V1/V2 BMP restrictions, but I haven’t seen anything indicating such.

I’ll still be looking in to seeing if I can fix the BMP display with the new driver, but that’s honestly a low priority. Right now, I’m mostly concerned with figuring out the issues with the board and resolving those as quickly as possible.

As always, you can join us on Discord, on Twitter, and  Facebook. Hopefully, next week will have some updates on figuring out the board issues, but I’m not going to guarantee anything.