Image

A Guide To Using Triacs For Switching AC

For switching high-powered loads from a microcontroller, or for switching AC loads in general, most of us will reach into the parts bin and pull out a generic relay of some sort. Relays are fundamental, proven technologies to safely switch all kinds of loads. They do have their downsides, though, so if you need silent operation, precise timing, or the ability to operate orders of magnitude more times you might want to look at a triac instead. These solid state devices can switch AC loads unlike other transistor-based devices and [Ray] at OpenSprinkler is here to give us an overview on how to use them.

The key to switching an AC load is bi-directional conductivity. A normal transistor or diode can only conduct in one direction, so if you try to switch an AC load with one of these you’ll end up with what essentially amounts to a bad rectifier. Triacs do have a “gate” analogous to the base of a bipolar junction transistor, but the gate will trigger the triac when current flows in either direction as well. The amount of current needed to trigger the triac does depend on the state of the switched waveform, so it can be more complex to configure than a relay or transistor in some situations.

After going through some of the theory around these devices, [Ray] demonstrates how to use them with an irrigation system, which are almost always operating on a 24VAC system thanks to various historical quirks. This involves providing the triacs with a low voltage source to provide gate current as well as a few other steps. But with that out of the way, switching AC loads with triacs can become second nature. If you prefer a DC setup for your sprinklers, though, [vinthewrench] has demonstrated how to convert these sprinkler systems instead.

Mockup of a printed copy of the Little OS Book

One Book To Boot Them All

Somewhere in the universe, there’s a place that lists every x86 operating system from scratch. Not just some bootloaders, or just a kernel stub, but documentation to build a fully functional, interrupt-handling, multitasking-capable OS. [Erik Helin and Adam Renberg] did just that by documenting every step in The Little Book About OS Development.

This is not your typical dry academic textbook. It’s a hands-on, step-by-step guide aimed at hackers, tinkerers, and developers who want to demystify kernel programming. The book walks you through setting up your environment, bootstrapping your OS, handling interrupts, implementing virtual memory, and even tackling system calls and multitasking. It provides just enough detail to get you started but leaves room for exploration – because, let’s be honest, half the fun is in figuring things out yourself.

Completeness and structure are two things that make this book stand out. Other OS dev guides may give you snippets and leave you to assemble the puzzle yourself. This book documents the entire process, including common pitfalls. If you’ve ever been lost in the weeds of segmentation, paging, or serial I/O, this is the map you need. You can read it online or fetch it as a single 75-page long PDF.

Mockup photo source: Matthieu Dixte

Image

Blinkenlights To Bootloader: A Guide To STM32 Development

While things like the Arduino platform certainly opened up the gates of microcontroller programming to a much wider audience, it can also be limiting in some ways. The Arduino IDE, for example, abstracts away plenty of the underlying machinations of the hardware, and the vast amount of libraries can contribute to this effect as well. It’s not a problem if you just need a project to get up and running, in fact, that’s one of its greatest strengths. But for understanding the underlying hardware we’d recommend taking a look at something like this video series on the STM32 platform.

The series comes to us from [Francis Stokes] of Low Byte Productions who has produced eighteen videos for working with the STM32 Cortex-M4 microcontroller. The videos start by getting a developer environment up and blinking LEDs, and then move on to using peripherals for more complex tasks. The project then moves on to more advanced topics and divides into two parts, the development of an application and also a bootloader. The bootloader begins relatively simply, and then goes on to get more and more features built into it. It eventually can validate and update firmware, and includes cryptographic signing (although [Francis] notes that you probably shouldn’t use this feature for production).

One of the primary goals for [Francis], apart from the actual coding and development, was to liven up a subject matter that is often seen as dry, which we think was accomplished quite well. A number of future videos are planned as well. But, if you’re not convinced that the STM32 platform is the correct choice for you, we did publish a feature a while back outlining a few other choices that might provide some other options to consider.

Continue reading “Blinkenlights To Bootloader: A Guide To STM32 Development”

Image

All About USB-C: Connector Mechanics

There’s two cases when hackers have to think about USB-C connector mechanics. The first is when a USB-C connector physically breaks, and the second is when we need to put a connector on our own board. Let’s go through both of them.

Clean That Connector

ImageWhat if a socket on your phone or laptop fails? First off, it could be due to dust or debris. There’s swabs you can buy to clean a USB-C connector; perhaps adding some isopropyl alcohol or other cleaning-suitable liquids, you can get to a “good enough” state. You can also reflow pins on your connector, equipped with hot air or a sharp soldering iron tip, as well as some flux – when it comes to mechanical failures, this tends to remedy them, even for a short period of time.

How could a connector fail, exactly? Well, one of the pins could break off inside the plastic, or just get too dirty to make contact. Consider a device with a USB-C charging and data socket, with USB 2.0 but without high-speed pairs – which is to say, sadly, the majority of the phones out there. Try plugging it into a USB-A charger using a USB-A to USB-C cable. Does it charge, even if slowly? Then, your VBUS pins are okay.

Plug it into a Type-C charger using a Type-C cable, and now the CC pins are involved. Does it charge in both orientations? Then both of your CC pins are okay. Does it charge in only one orientation? One of the CC pins has to be busted. Then, you can check USB 2.0 pins, used for data transfer and legacy charging. Plug the phone into a computer using a USB-A to USB-C cable. Does it enumerate as a device? Does it enumerate in both orientations? If not, you might want to clean D- and D+ pins specifically, maybe even both sets. Continue reading “All About USB-C: Connector Mechanics”

Image

A Handy Guide To The Humble BBS

Some of us who’ve been online since the early days fondly remember the web of yore — with its flashing banners, wildly distracting backgrounds, and automatic side-scrolling text. But there was a time before the worldwide web and the Internet as we recognize it today, and the way of communicating in this before-time was through Bulletin Board Systems, or BBS. There are still some who can cite this deep magic today, and this page is perhaps the definitive guide to this style of retrocomputing.

This how-to is managed by [Blake.Patterson] who is using a wide variety of antique machines and some modern hardware in order to access the BBSes still in service. He notes in this guide that it’s possible to use telnet and a modern computer to access them, but using something like an Amiga or Atari will give you the full experience. There are some tools that convert the telephone modem signals from that original hardware to something that modern networking equipment can understand, and while the experience might be slightly faster as a result, it does seem to preserve the nostalgia factor quite well.

For those looking for more specific guides, we’ve featured [Blake]’s work a few times in the past, once with an antique Epson PX-8 laptop and again with a modern ESP8266. It doesn’t take much computing power to get connected to these old services, so grab whatever you can and start BBSing!

Image

A Builders Guide For The Perfect Solid-State Tesla Coil

[Zach Armstrong] presents for your viewing pleasure a simple guide to building a solid-state Tesla coil. The design is based around a self-resonant setup using the UCC2742x gate driver IC, which is used in a transformer-coupled full-wave configuration for delivering maximum power from the line input. The self-resonant bit is implemented by using a small antenna nearby the coil to pick up the EM field, and by suitably clamping and squaring it up, it is fed back into the gate driver to close the feedback loop. Such a setup within reason allows the circuit to oscillate with a wide range of Tesla coil designs, and track any small changes, minimizing the need for fiddly manual tuning that is the usual path you follow building these things.

Since the primary is driven with IGBTs, bigger is better. If the coil is too small, the resonant frequency would surpass the recommended 400 kHz, which could damage the IGBTs since they can’t switch much faster with the relatively large currents needed. An important part of designing Tesla coil driver circuits is matching the primary coil to the driver. You could do worse than checkout JavaTC to help with the calculations, as this is an area of the design where mistakes often result in destructive failure. The secondary coil design is simpler, where a little experimentation is needed to get the appropriate degree of coil coupling. Too much coupling is unhelpful, as you’ll just get breakdown between the two sides. Too little coupling and efficiency is compromised. This is why you often see a Tesla coil with a sizeable gap between the primary and secondary coils. There is a science to this magic!

Image
Pretty Lithium Carbonate plasma

A 555 timer wired to produce adjustable pulses feeds into the driver enable to allow easily changing the discharge properties. This enables it to produce discharges that look a bit like a Van De Graaff discharge at one extreme, and produce some lovely plasma ‘fire’ at the other.

We’ve covered Tesla coils from many angles over the years, recently this plasma tweeter made sweet sounds, and somehow we missed an insanely dangerous Tesla build by [StyroPyro] just checkout that rotary spark gap – from a distance.

Continue reading “A Builders Guide For The Perfect Solid-State Tesla Coil”

Image

Four Years Of Learning ESP8266 Development Went Into This Guide

The ESP8266 is a great processor for a lot of projects needing a small microcontroller and Wi-Fi, all for a reasonable price and in some pretty small form factors. [Simon] used one to build a garage door opener. This project isn’t really about his garage door opener based on a cheap WiFi-enabled chip, though. It’s about the four year process he went through to learn how to develop on these chips, and luckily he wrote a guide that anyone can use so that we don’t make the same mistakes he did.

The guide starts by suggesting which specific products are the easiest to use, and then moves on to some “best practices” for using these devices (with which we can’t argue much), before going through some example code. The most valuable parts of this guide especially for anyone starting out with these chips are the section which details how to get the web server up and running, and the best practices for developing HTML code for the tiny device (hint: develop somewhere else).

[Simon] also makes extensive use of the Chrome developers tools when building the HTML for the ESP. This is a handy trick even outside of ESP8266 development which might be useful for other tasks as well. Even though most of the guide won’t be new to anyone with experience with these boards, there are a few gems within it like this one that might help in other unrelated projects. It’s a good read and goes into a lot of detail about more than just the ESP chips. If you just want to open your garage door, though, you have lots of options.