Cross Origin Resource Sharing Woes (CORS)

Ever come across this situation? You want to pull an HTTP API into service on your website. You test it happily on your local machine with Python or Postman, but then when you convert the code into javascript and try to use it in the browser… boom. You get hit with error messages that look like this: preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. ...

December 7, 2019 · 2 min

Towards automatic generation of EAGLE parts

Library creation in Eagle is often a tedious affair, which is why I avoid it as much as possible, often going out of my way to find preexisting libraries to integrate into my own mylib.lbr. But searching for these libraries can be hit or miss, and the quality is variable. You can get some really good libraries from Sparkfun, Adafruit, or that excellent microbuilder.lbr, but you might just as likely not find any parts especially if you are using an uncommon part. So what do you do? Often I trudge back to EAGLE and reluctantly start to create my parts. I start have to overcome some activation energy before I can really get down to building the board. ...

November 26, 2019 · 8 min

STM32Cube IDE

The newest and best IDE for STM32 development. Why STM32? Since it is essentially a rebrand, my post on using Atollic and STM32 still stands. The STM32Cube IDE is ST Microelectronics first offering of an in-house IDE under the CubeMX branding. Having an IDE that is supported by the manufacturer has many benefits, including tighter integration with core products and better software documentation. Just see Simplicity Studio’s implementation The STM32Cube IDE is essentially a rebrand of Atollic Studio and brings the CubeMX perspective in as a default view instead of having it as an additional add-on. This is good because I really liked working with CubeMX, but it is horrible on HighDPI screens and so I was stuck with Atollic Studio’s add-on, which occasionally caused the IDE to crash. ...

October 12, 2019 · 2 min

Silicon Labs EFM8 'Bee' Series

Silicon Labs offers a series of 8-bit microcontrollers that specifically target certain use cases. They come with excellent documentation and a breathtaking amount of example code to get every feature and aspect of the microcontroller working. When you combine this with an affordable J-Link enabled development board and a gorgeous, cross-platform, Eclipse-based IDE, you practically have your next project built. Tldr; this should be your next 8-bit project. Who should care? If you are looking for the next step from Arduino, I strongly recommend Silicon Labs EFM8 series of microcontrollers for two reasons: ...

October 3, 2019 · 8 min

Padauk Microcontrollers: Exploration and Usage

Exploring and using the 3 cent microcontroller. Impression: A legitimate replacement for simple use-case projects. Idly I decided to research what is the cheapest microcontroller you can get and develop with, and I came across a Hackaday post regarding precisely this topic. Tim from [coldcpu] has put in a decent effort at categorizing the cheapest microcontrollers available, along with their associated pros and cons. In another separate Hackaday post, someone used a Padauk microcontroller to bit-bang the WS2812b protocol. ...

September 28, 2019 · 18 min

Design Analysis - Simple Clock

You see these clocks everywhere. They hang on walls of kitchens and offices, quietly ticking away, keeping count of the time left in the day. One of these clocks in my house recently failed so I decided to take a closer look at the inner mechanisms of a clock. If you think about it, a clock is not a simple task, especially with how it is presented: three rotating pointers on a single shaft, all turning at different speeds. If you directly drive one pointer, say with a motor, how would you put another axis of rotation through the same vector? The solution, as it turns out, is to just wrap shafts around each other. ...

September 22, 2019 · 4 min

Design Analysis - Bluetooth Button

Recently I got my hands on an intriguing device. It was described to me as a Bluetooth Button, but I couldn’t figure out how it worked because no instructions were provided. It was given out at an event, which meant that this was quite a low cost device. I decided to take it apart for analysis. Research There are several iterations of these devices floating on the market. One of them is the iTag device, or the camera shutter Bluetooth device. These devices are available from eBay or Aliexpress from $3 to $1. From some online chatter, it seems like dollar stores actually stock these devices. Because they are so cheap, some people have repurposed them as single purpose buttons, for example, to track inventory or to activate a device remotely. ...

August 31, 2019 · 5 min

OpenThread

What is Thread? Thread is a self-healing mesh network that uses the same radio as Bluetooth 5.0. It supports external commissioning, encrypted communications by default, and is simple to set up. The great thing about Thread is that a lot of the low level addressing and networking is already done for you, so you are free to implement your network quickly and easily instead of futzing around with configurations. How to get started My recommendation is to set up a Raspberry Pi Border Router. An alternative is to use the Raspi image that Nordic has already set up, but I ran into a few issues booting the Raspberry Pi with the image, so I decided to go with the docker image that Google has provided. ...

August 25, 2019 · 4 min

C005 Cheap Delay Timer

I recently got very interested in controlling the amount of power my boards use because between transmitting data and using battery powered devices, there isn’t a whole lot of energy to spare if you don’t want to be tied to a wall wart. Adafruit and Sparkfun both sell the TPL5110 breakout boards that essentially act as delay switches that start a timer when a switch closes. The system shuts off the power by sending a signal to the trigger pin, which opens the circuit. When the period is up, the switch will open again. However, because it is a little expensive for me, I was looking around for alternatives, and this little board caught my eye: ...

August 24, 2019 · 6 min

Design Analysis - Table Lamp

Lessons Learned Locating holes for PCBs and for standoffs Using traces to separate positive and negative tracks Hinge design with nuts and bolts This is a lamp that I bought a few years ago for my table. I have not used in awhile and I decided to open it up to take a peek at its innards. Luckily for me, this lamp was held together mostly with screws and tabs, so it was relatively non-destructive to take it apart. ...

August 16, 2019 · 4 min