Tag: cad

  • CO2 Station: Conclusion

    To summarise this project, let’s make a list of features, as I did with my previous projects:

    • High-accuracy CO2, temperature, and relative humidity sensors
    • High-resolution, low-power 3.7″ E-Paper display
    • Built-in clock and calendar
    • Configuration and charging over USB
    • Two user buttons and status LED for easy interaction and self-calibration
    • Configurable timed standby mode
    • Very long battery runtime between charges (up to multiple weeks)

    In short, I achieved or exceeded all of the goals I set for this project – it was a complete success.
    And in addition to that, it taught me a lot about low-power designs, EPD technology, sensor technology, and building smaller devices.

    I’ve been using the CO2 station ever since, having a dedicated spot for it under one of my monitors, so that it’s always in view.
    I especially love how it ended up being a “set and forget” device most of the time – all it needs is an occasional charge and clock adjustment (about once every 3-4 weeks, with my settings and 8 hours of standby per day), as well as a quick calibration in outside air once every 3 weeks.

    What doesn’t feel great is having to continuously increase the calibration reference value over time, as the atmosphere’s CO2 concentration rises…

    So in conclusion, I am extremely happy with this project. This was the first time I completed a project and didn’t have the feeling that it was lacking something (compared to my initial imagination of it).
    Even multiple years later, at the time of writing, I feel like there aren’t too many things I’d change if I were to design another CO2 Station now.

    Thanks for reading, and until next time!

  • CO2 Station: Enclosure

    As mentioned, I designed the enclosure for this project to be CNC machined out of plywood – I won’t show the process of that here, since it’s essentially the same as I showed for the BlockBox v2.
    After some basic post-processing, I was left with six beautiful enclosure walls – only blemished by some delamination of the plywood near the top and bottom side countersinks, but that’s easy to fix with some small wooden chips (or just ignore where it’s not visible).

    Five of the walls (all except the back) were glued together using wood glue, forming a strong box, which fit the electronics assembly very nicely.
    Some matching screw holes in the side walls hold the PCB in place using its soldered screw terminals.
    For an easy USB connection, a USB Micro-B jack was glued into the the side and wired to the board, and the SCD30 module was installed on a long pin header.

    The back side of the enclosure received four small wooden blocks with threaded inserts, allowing it to be screwed in securely, while still being easily removable.

    And with that, the CO2 Station was fully assembled, and looking great, in my opinion!

    Let’s look back at this project and what I learned from it.

  • CO2 Station: Design

    The first design requirement I chose, using a true CO2 sensor, seemed like a good place to start. After a quick search, I found the Sensirion SCD30 module, which seemed like a perfect centrepiece for the CO2 Station design.
    It’s based on a high-performance infrared CO2 sensor and includes temperature and relative humidity sensors, all in a single device, with an easy-to-use serial interface (I2C).

    The next big question was the choice of display. I really wanted a high-quality display that could show the measurement values in a large font, looking as visually appealing as possible.
    The typical choice for that would be a backlit LCD screen – but here, its high power consumption would make the “long battery runtime” requirement impossible. Reflective segmented LCD displays, like in digital watches, are perfect for low-power use cases, but they’re not very accessible for single-piece projects like mine.

    Therefore, I decided to try out a new technology – an “E-ink” or “E-Paper” Display (EPD), as commonly seen in E-Book readers.
    My search led me to a Pervasive Displays 3.7″ display panel1, which I decided to use for this project, with its form factor and size being great for what I wanted here. Also, it offered an integrated display controller, which was very helpful – worrying about the intricacies of driving an EPD manually would not have been fun.

    The EPD needed a corresponding connector for its FFC (flat flexible cable), as well as some support components – essentially an entire external boost converter, controlled by the EPD.

    With that, I had the central components of the design. Next, I chose a low-power central system controller (PIC24F GU series), which would communicate with the sensor and EPD, allow user interaction through buttons and a signal LED, time periodic updates using its integrated real-time clock, and offer a USB interface for configuration.

    For powering the device, I decided on a single Li-Ion 18650 cell in a holder. It could be charged from USB using a battery charging controller (DIO5508), and would power the system through a voltage converter (boost-passthrough converter followed by a linear voltage regulator), to ensure the system voltage would always be at 3.3V, regardless of the battery’s state-of-charge. For this design, the Texas Instruments WEBENCH Power Designer was very useful, as in past projects.
    For additional protection of the battery against deep discharging, I also added a MAX6775 battery monitor, to shut down the system if the battery voltage drops too low.

    Designing the PCB was a little different this time, compared to my previous projects – I decided that the best way to mount the display would be on the PCB itself, so the majority of the front side area was reserved for that. All other components, aside from the user buttons and signal LED, had to go on the back side. Additionally, I needed some way to mount the PCB assembly in a enclosure later, so I added some right-angle screw terminals in the corners.

    Shown here from the back side, looking “through” the board.

    Now, the only missing part of the design was the enclosure. Using Fusion 360, I quickly designed a small wooden box for it (out of 5mm plywood).
    I could have designed it to be built by hand, it wouldn’t have been too much work – but after the BlockBox v2’s success with CNC machining, I decided I might as well do more of that – it’s fun and produces really good-looking results.

    With everything designed and planned out, it was time to order the parts, and build this thing!

    1. The exact EPD model I used is no longer available at the time of writing, but equivalent and improved successors exist. ↩︎
  • The CO2 Station

    The CO2 Station

    Living at home with my parents during the COVID-19 pandemic, there was one thing that started annoying me after a while.
    I’d be sitting in my room happily, then my mum comes in, and the first thing she says is “the air in here is awful, open the window”. But… the air feels fine to me, it’s nice and warm, and it’s cold outside… but there’s no point in arguing, I have no way to prove that.

    After a while, that annoyance turned into a project idea: What if I build a device to objectively measure the air quality in my room? That way, I would always know when I really need to open a window, and at the same time, have a convincing argument against any potential nagging. 😉

    Of course, as with any project, I wanted to get more out of it than just the finished item – I wanted to learn lots of new things while building it.
    After some research into existing solutions, I came up with the following project goals:

    • Use an actual CO2 sensor (no “CO2-equivalent” estimations)
    • Measure temperature too, optionally humidity
    • Display the measurement values in a clear and visually pleasing way
    • Powered by a small rechargeable battery
    • Maximise battery runtime between charges
    • Compact form factor

    The next step was, of course, choosing components and designing a fitting solution. Check out the full story, starting here.

    All Chapters
  • BlockBox v2: The Actual Conclusion

    After the completion of the BlockBox v1, I really thought for a while that I’d be done with this idea. And it only took a few months for me to prove myself wrong, with the BlockBox v2 project.

    But this time it felt different – I really was done, at least for now. The BlockBox v2 has its flaws, there are certainly ways to improve it further, but overall… I’m just really happy with it, and very proud of the results of my work – especially if I look at both speakers next to each other.

    Let’s look at the features of the final product:

    • Two-way cross-over speaker system with digital audio path
    • 100W 10″ low-frequency driver
    • 50W hi-fi tweeter
    • -3dB bass roll-off frequency around 38Hz
    • Theoretical maximum sound pressure level around 110-113dB (@ 1m)
    • Bluetooth audio playback (SBC or AAC), effective range ~10-15m
    • Touchscreen interface with lots of audio settings and playback control
    • EQ-optimised sound profile (to the best of my abilities)
    • (Roughly) music-synchronised LEDs
    • 166Wh battery (in practice, lasts for more than 10 hours of continuous playback)
    • Battery protection and fast charging
    • 2x External USB (5V 1.5A) for phone charging
    • Optional analog AUX input (not implemented due to lack of practical need)

    Looking back at this huge project of building two speakers, I can only say one thing: It was absolutely worth it.

    Now, are the speakers by themselves worth it? No, not really. Because I had to buy everything in single-piece quantities, restrict myself quite heavily in terms of what I could work with using the tools I had, and over-engineered many things “just to be safe”, they ended up being wayyyy too expensive to compete with commercially available speakers, at around 1500€ (for both combined) – and that’s if I ignore the cost of the months of work that went into them.

    But the main value of this project, for me, was not in the speakers themselves, but the incredible amount of learning and experience that I gained throughout this project, including audio engineering, mechanical design, CAD and manufacturing, electronics design and soldering of course, and microcontroller firmware development.

    This is where my speaker-building journey would end for now, but I had a feeling I would be back to it sooner rather than later, in another project.

  • BlockBox v2: The Build, feat. CNC machining

    Just like before, the build process started with the electronics. So it was time to order new circuit boards and components.

    Building the electronics for this second speaker followed the exact same procedure as I described for the BlockBox v1, so I won’t repeat it here. In the end, I had another nice circuit board that looks just slightly different from the first version (shown without the amplifier heat sink here).

    Then, it was time for firmware development. This would be a much bigger task than it was for the BlockBox v1, again, because I had to implement a central system controller, as well as touch display communication.
    I was able to find a community-made library/driver for the FT81X graphics processor in the display module, which certainly made the job easier, though I had to make quite a few modifications to make it work on the PIC32MZ microcontroller. Aside from that, I implemented my own serial communication drivers for controlling the digital audio processor, Bluetooth module, LEDs, and other peripherals, as well as some central system management logic connecting them together, and of course a user interface for the touchscreen. The firmware source code is available in the same GitHub repository as the electronics design files, though I cannot guarantee anything about its correctness, completeness, and especially code quality (I was quite careless sometimes back then).

    When it came to building the enclosure, however, I knew that my methods from the BlockBox v1 would not be viable any more. Making smaller and simpler shapes using my hand saws may have been possible (even if tedious), but the more complex and much bigger pieces needed for this project would just be too much to ask for. Especially considering the idea I had for LED-lit logos on the sides, which require quite significant precision.
    The translucent parts for the LEDs, as well as some black decoration and cover plates, were laser cut out of acrylic plastic, which I was able to order relatively inexpensively.

    As for the main enclosure walls, I decided to use CNC milling – thankfully, though a personal connection to a machine shop at my university, I was able to do so for free, as long as I brought the materials and my own CNC programs.
    Materials were easy, I just ordered some plain 12mm plywood panels, already cut to the sizes I needed, and got a small piece of aluminium plate stock for the connector panel.
    The CNC programs were more complicated – Fusion 360 has some great tools for CNC programming based on my CAD design, but as I’d never done anything like that before, it took me a while to research, understand, and learn the basics of machining and CNC programming.
    In the end, it was time for some machining.

    This could be milled much faster with a higher tool RPM, but this machine can’t do more, as it was mostly designed for hard materials. Anyway, I was not in a rush.

    With that, I had some rough-looking side panels, which would need quite a bit of post-processing to remove extra tabs and pieces, sand down sharp/rough edges, file away unwanted internal corner radii, and so on.

    After post-processing, they looked much better, and also fit the acrylic pieces nicely.

    Now it was time to assemble the speaker. I built the main wooden box by screwing the walls together using metal corner pieces, then hand-cut some extra plates with LED strips to go behind the acrylic inserts, installed the drivers, port resonator, display, circuit board, connector plate, battery, and some plastic wool for acoustic damping inside the enclosure.

    With everything connected and closed up, the BlockBox v2 was complete.

    However, since my circuit had a nice digital audio processor that I could control, I decided to improve the sound a little more, using some EQ optimisation.

  • BlockBox v2: New Speakers and Enclosure

    Since the main source of my “disappointment” with the first BlockBox was the lacking low bass frequency range, that exact point became the springboard for the design of the second version.

    Knowing that I wanted a lot more bass, I started looking into better speaker drivers for it. I found quite a few options that would offer a complete bass extension down to ~20-30Hz, but nearly all of them meant sacrificing quite a bit of efficiency. That would mean either increasing the maximum power, which is difficult on battery-powered systems and makes the circuit design harder, or making the speaker quieter.
    But come on, there’s no way I would allow the second version to be quieter than the first version – that would just make it feel inferior from the start.

    So high efficiency remained a very important consideration in my driver selection, and eventually I found a new low-frequency driver that looked great for my needs: The Beyma 10BR60V2.
    Since it had a lower effective frequency range than the BlockBox v1 driver, I also needed a new tweeter with the ability to pick up higher midrange frequencies. I ended up choosing the Monacor DT-28N, which was also just a higher-quality driver compared to the ones I used for the first version.

    There was, however, a very significant difference from the BlockBox v1, with this driver choice: Size.
    While the first speaker used a 6.5″ driver that could achieve good performance with an 8-9 litre enclosure, this new low-range driver was quite a lot larger at 10″, and according to SpeakerBoxLite, its optimal enclosure volume was somewhere around 61 litres. Yikes.

    This prompted me to take a step back and think about it for a moment. Would such a huge speaker even make sense for what I wanted? It’d certainly be much more difficult to carry around.
    However, I realised that with the right form factor, it may be possible to attach some straps to the speaker and carry it around like a giant backpack itself. The idea was certainly cool enough to make me want to try, so I continued with this choice of drivers.

    The enclosure size I ended up deciding on was 55 x 40 x 35 cm, with a 10 cm vent port (Monacor BR-100HP), and walls made of 12mm plywood:

    According to the SpeakerBoxLite calculations, with this design, I should be able to achieve a -3dB bass roll-off frequency of 38Hz – certainly a lot better than the first version. It wouldn’t be quite as “precise”, with a slight over-emphasis around 57Hz (+3dB), but I was willing to accept that, especially since audio pre-processing could fix that if it annoyed me later.

    Based on this, I once again created a CAD design in Fusion 360, allowing myself to be a bit more ambitious with the features this time. The BlockBox v2 would have some protective rubber corners, hooks for backpack straps, much better LED lighting (including lit logos on the sides), a nice aluminium connector panel on the side, and even a touchscreen display for user interaction (instead of the basic buttons of the first version).

    Of course, the electronics would need some changes to go along with these new features, as well as some upgrades to address some of the shortcomings I noticed with the first version. So, naturally, that was the next step of the design.

  • BlockBox v1: The Conclusion?

    With the end of the BlockBox v1 build, I had finally accomplished my long-time ambition of building my own Bluetooth speaker – it really felt like I had reached a new level in my electronics projects, with the ability to build more complex systems.

    Let’s summarise the features of the completed speaker:

    • Two-way cross-over speaker system
    • 100W 6.5″ bass/midrange driver
    • Two 15W tweeters
    • -3dB bass roll-off frequency around 72Hz
    • Theoretical maximum sound pressure level around 110-113dB (@ 1m)
    • Bluetooth audio playback (SBC or AAC), effective range ~10-15m
    • (Roughly) music-synchronised LEDs
    • 166Wh battery (in practice, lasts for more than 10 hours of continuous playback)
    • Battery protection and fast charging
    • External USB (5V 1.5A) for phone charging
    • Optional analog AUX input (not implemented due to lack of practical need)
    • Diagnostics LCD for showing battery and Bluetooth status

    Sure, there are many imperfections and mistakes in the design, as is expected for my level of experience at the time, and I tend to focus on these imperfections too much myself when looking back at it.

    But taking a step back, looking at the bigger picture of what I built in the BlockBox v1 – I’m very proud of it overall. It’s a powerful, functional, portable speaker, and while its audio quality isn’t “hi-fi” by any means, I would also never call it bad, it’s certainly good enough for most use cases.

    However, just being proud of it was apparently not quite enough for me. Yes, it was a good achievement for me, but I wasn’t quite satisfied. The bass roll-off was too high for my taste, the button control scheme was too basic, and the low-volume audio output was too noisy.

    And thus, just a few months later, the BlockBox v2 project was born.

  • BlockBox v1: Speakers and Enclosure

    As I started my research into designing the BlockBox, I realised one thing: Speakers are really complicated.
    So many speaker drivers to choose from, priced anywhere between affordable and astronomically expensive, with different sound profiles, efficiencies, features, and drawbacks.
    And what the hell are “Thiele/Small Parameters”?!

    Hours of research later, I figured out what most of these things mean, and found out that the final size (volume) of the speaker would play a major role in the low-frequency sound design. Since most commercial Bluetooth speakers are very small, I always imagined making one of a manageable size too – so that is what I decided on. It’d still be larger than the typical “handheld” mini-speakers, but small enough to fit in a backpack.

    Finally, I decided on a set of speaker drivers to use for this project. I wanted my speaker to be loud, so driver efficiency was very important, and my budget was quite limited, of course.
    Therefore, I went for a two-way crossover speaker, using the 6.5″ Monacor SP-6/108PRO as a bass/midrange driver, and the Monacor DT-74/8 tweeter (or, in fact, two of them – mostly for the sake of symmetry, as you will see later).

    In order to get the most out of these drivers, the design of the enclosure was quite important. Using SpeakerBoxLite, an incredibly useful free tool for speaker design, I determined that a vented enclosure with a volume of 8.7 litres would be perfect given these drivers and my size requirements.
    Combined with a port resonator of the correct size (Monacor BR-50HP), this results in a 33 x 26 x 13 cm speaker enclosure with 10mm plywood walls.

    According to the SpeakerBoxLite calculations, this should result in a flat frequency response down to 90Hz and a -3dB roll-off point of 72Hz. Not great, especially for fans of music with lots of bass (including myself), but not terrible either.
    I’m sure it’s possible to do better within the constraints of this project, but all better options I found back then were too expensive, too inefficient, or just too complicated for me, as a beginner.

    Based on this rough sketch, I created a more detailed enclosure design in Autodesk Fusion 360 – featuring all drivers, some translucent bars for LED lighting, a cutout for buttons to control the speaker, a side compartment to house a diagnostic display, the main power switch, and connectors for charging etc., and of course, enough space in the back for the battery and electronics.

    With that out of the way, it was time to move on to the electronics design.

  • The BlockBox Project

    The BlockBox Project

    Before I even started my first electronics project ever around 2017 (at age 16-17), I already had an idea on my mind: I wanted to build my own Bluetooth speaker someday.
    Why? I’m not sure myself. Maybe it was just a naive ambition of a curious teenager, maybe I just wanted to look cool at parties as “the guy who built his own speaker”, or maybe there was something else that interested me about them.

    As I was starting out with no real electronics experience and very limited knowledge, the idea of building an entire speaker by myself seemed nearly unattainable.
    I would have probably been able to make something by buying and chaining together pre-built modules (battery management, Bluetooth receiver, amplifier, etc.) – but this approach, while quite popular in beginner DIY/maker spaces, has never felt appealing to me. It just felt like it wouldn’t really be my project, but just an amalgamation of others’ (commercial) projects.
    Therefore, I put the idea aside, though it never left my head entirely.

    Eventually, in 2019, I felt ready to try my luck at actually building such a speaker, from the ground up. And thus, the BlockBox project was born.
    Looking back, I was still naive and clueless about a lot of the intricacies involved, but despite that, I feel it would be wrong to call the project anything but successful.

    Start here to read the full story of the BlockBox project.

    All chapters