03/04/2019 at 20:34 •
Whew, it's ... Been a month already?
Oh boy, I better update you guys. I don't want people starting a mutany D:
In any case, progress has been going steadily and nicely! The last month did have a rather tough exam phase in it that kept my productive hours at bay, but I was able to tweak a number of systems!
More precisely, the current state is:
- WiFi and MQTT work (the data still needs to be interpreted, but that's a trivial task)
- The IR system is starting to take shape - TX already works, I still need to solder up a receiver to test RX.
- Sounds and weapon systems have been tuned a little to fit a new speaker I got.
- The battery readout and status indicators now do what they're supposed to, but ...
The most important change of the last few weeks is the completion of the first revision of my brand new casing!
Just have a look at this gorgeous render:
And, of course, the whole thing has been test-printed and assembled already!
Yes, it looks as good as in the computer <3
Oh yeah and the actual lighting? Looks freaking awesome!
The viewing angle is a bit disturbed at the moment, since the printer I was working with didn't have a fitting multi-material setup. In the second version of the print the slots will have some clear filament filling it, creating a bit of a better light diffusion. However, the whole thing is still quite impressive!
In the gif above the test idle pattern is flashing, with a few "I WAS HIT!" markers flickering in between.
Oh yeah, and of course the gun also reacts to shooting:
All in all I'm super happy with the progress this project is making, but I do feel like taking a small break.
There's a different project (called the DYSKorder >:3) I wanted to work on for a while, and I got a bit veeeeryy into this ...
But yeah, this is still alive and kicking some serious ass at this point!
01/27/2019 at 11:24 •
My PCB materials finally arrived! A week later than expected, sure (gee thanks Aisler for no explanation), but the PCB's quality is impeccable!
Traces are clean cut, the enig-finish is wonderfully shiny, and I think they even chose a thicker kind of copper than what you get from LCSC.
Just look at that gorgeous chip:
Now, I didn't want to post an update until I had something interesting to show you guys, so I took a few days to solder up and program the chip.
Just as I expected the ESP32 was an absolute pleasure to work with, and apart from a small reversed diode that caused one of the PMBT2222A to blow up, everything worked out really well!
The fully finished piece looks fantastic, and has tons of new features, so I am incredibly happy about it!
The only thing I'd like to change would be the audio amplifier chip. I discovered that the ESP32's DAC can only handle up to 10kHz of updates - after I had ordered the chip. Luckily the MAX98357A, a proper audio I2S DAC with up to 32 bits at 44.1kHz, is available on a breakout for just 5€, so I got one of those and wired it up.
The next revision will obviously have the chip on-board, but for now, it works great!
Have some pics of the current revision:
Just look at those lights in action! This set has a proper connection status indicator (blue), battery charge indicator (red/green dual LED), and four WS2812 spread out over the body to provide lighting inside the casing. Hell yeah <3
And a few quick videos of the audio system in action. It's really impressive what a few cheap but well-chosen components can do!
I'll be working on completing the software for now, and will be ordering a second revision of the PCB with a few fixes, the new audio chip, etc.
I suppose I could also already get started on designing a new casing for this PCB, but that's a secondary concern.
Besides, the huge speaker of this current version will be hard to fit into ... Anywhere :P
The later versions will probably use a 3cm diameter speaker, but I just had this one laying around, and it seems to work fine!
01/05/2019 at 22:38 •
After a few days of intense number-crunching, I've finally wrapped up the PCB design. The new chips do everything I want them to on a small 35x50mm board.
They'll be ordered from Aisler, and if you wanna grab a hold of a few of your own, the project's public! Find it here!
All the necessary PCB Schematic files are on GitHub, and I'll be writing a code library soon.
I will be getting the boards after a good night's sleep. Aisler supposedly delivers within a week, and shipping from and to Germany won't take more than two days, so we'll be getting results very soon!
I encourage you guys to go through my PCBs, found on GitHub. If you spot anything odd, or have an improvement, feel free to open an issue or leave a comment!
01/02/2019 at 20:30 •
I don't know about you guys, but I certainly always get a bit antsy when I got free time and nothing to do.
Luckily, that's not the case!
I might have mentioned that I wanted to rework the hardware to use the ESP32. After multiple very positive experiences, I am happy to say that I officially started working on the next version with said controller!
The improvement will be noticeable, in a lot of aspects:
- The RGB LEDs will be replaced by WS2812, which are going to make for MUCH better visual effects than before.
- Using only one powerful MCU instead of an ESP8266 and an AVR will make developing and maintaining code easier.
- The WiFi will be much better! (NodeMCU + MQTT loves to swallow up packets :c)
- There'll be real sound! Instead of a piezo buzzer, I've decided to use the ESP32 I2S + a small audio amp chip (the TDA301) to be able to play back much nicer sound effects. I might even be buying myself a small unity asset for that ... Hehe
- There'll be proper power filtering, 3.3V LDO, and a built-in charger + USB<->UART bridge. Again, all making developing and maintaining devices easier. Heck, maybe I'll even throw a charge indicator LED in there!
I've got a small request: If any one of you guys knows a bit more than me (i.e. "nothing") about audio systems, I'd love a pair of second eyes on the amplifier, just to make sure it doesn't blow up.
With a bit of luck those PCBs will be ready to go by the end of this week. I'll be ordering them from Aisler too, so expect assembled and beeping chips by the end of January!
10/02/2018 at 18:41 •
Finally, I got this lazy butt moving on something I've been wanting to have for my Lasertag project (or actually, anything that has the tiniest bit of WiFi capability) - a proper App!
Thanks to my student helper job making me learn Qt, I recently found myself possessing that last tool I needed to make an appealing, responsive UI, without worrying about the graphics and the "how" behind it too much.
QML is just too good in that regard.
Enough of this though, let's have some pictures!
The whole thing is still in the works, but thanks to the Qt MQTT library, it was easy to integrate in the running system - it'll receive game data as quickly as the sets itself!
As an added bonus, the "Material Style" was used to get a unified, sleek look, and some of the theme colors are adjusted live to match your current theme color. Pretty neat, huh?
In the future I'll fine-tune the front page to be easy to read, while still holding the important information, and add other gimmicks like an enemy proximity radar, but ... That's still a while off.
09/05/2018 at 16:36 •
The lasertag MCU board, in its curent state, is powered by an AVR microcontroller, which is in control of all vital functions. It blinks the LEDs, creates the sounds and vibration patterns, and much more. To add Wi-Fi, an ESP-01 was added in the later versions, communicating via UART.
Both are simple chips to use and program, and have always been my go-to device for projects that need a small but powerful processor, or need a little bit of Wi-Fi capability.
Slowly though I am starting to feel like a device with more "juice" to it would provide more flexibility and more interesting features, as well as reduce some of the problems I am getting with for example the ESP<->AVR communication, the fairly slow Wi-Fi speed of the ESP-01, and the hardware limitations of the AVR.
For this reason, over the next few weeks I will be working my way into the ESP32, programmed in C++
If all goes well it will have enough power as well as hardware features to take over the job of both the ESP-01 AND the AVR, reducing the complexity of the main board and code!
Additionally, it'll bring in juicy new features like Bluetooth, capacitive touch support, high-speed 16bit LED PWM, faster WiFi, and potentially even proper sound playback.
Let's see how this goes, shall we!