Use Raspberry Pi CM4 for Motor Control

Recently, a customer asked me to design a testing machine used in his factory. The machine needs three motors and some peripherals. There should be a LCD display for operator to give commands and watch the progress. Finally, I decide to use three BLDC motors and Raspberry Pi CM4 as the main processor. A dedicated 7" LCD…

Read article →

How to Launch Multiple KiCad Instances in macOS?

KiCad 6.0 is going to be released within couple of months. Now, I am using KiCad 5.99 on real projects. The nightly build versions have shown the new KiCad is as useful as commercial schematic/layout packages. But due to the limitation of macOS, it is normally unable to launch two or more instances of an application. This is…

Read article →

CC3x20 Embedded Programming in macOS

To use TI SimpleLink Wi-Fi CC3x20, we have to program the serial flash. Tere are two ways to go: Use UniFlash to generate the image and program directly. Use Embedded Programming. UniFlash requires certain hardware to be used, for example, CC3220 launchpad. For devices such as CC3120, there isn't JTAG interface. So, UniFlash…

Read article →

Kenko NES Eq Mount Modification - Motor & Encoder

I have a Kenko NES equatorial mount for 15 years. It is quite old and have some shortages. I plan to enhance it. This first thing to modify is the stepping motor. The original stepping motor is unipolar type. Unipolar stepper requires at least 5 wires to control and the output torque is smaller than bipolar type since only…

Read article →

KiCad - Custom BOM Output

After experimenting various methods to create BOM in KiCad, I found the best method is to use the Python script plugins. KiCad has provided a netlist reader (kicad_netlist_reader.py) and several sample scripts. But none of the scripts meet my need. So, I decide to create one for myself. I have defined several custom fields…

Read article →

Redesign XDS110 JTAG Debugger

I have redesigned the XDS110 debugger with isolated pinout. The connector is also redesigned. Now a cable is used so that it is more flexible for different applications. Btw, instead of using the TI standard 14-pin header, a 10-pin 1.27mm pitch header is used. The smaller pin header is more easy to use for smaller PCB.

Read article →

My Experience with pocketVNA

If you are working with some IoT hardware projects then you probably need a VNA for antenna matching. In the past, VNA is so expensive that most small companies can't afford it. But we have better choice now due to some PC-based VNAs are available in recent years. So far, I am working on four IoT projects. One uses 915MHz…

Read article →

Fundamentals of Power Supply Design

Recently, I got a gift from Texas Instruments. It is the book "Fundamentals of Power Supply Design" by Robert A. Mammano. Every circuit needs well regulated power supply and every hardware engineer should be familiar with power circuit design. Though I am familiar with some power supply design issues/concepts. But,…

Read article →

Customized XDS110 Debugger

You may know that the standalone XDS110 debugger has just been released on March 2017. Before that, XDS110 is only provided as part of LaunchPad. So, many months ago, I had a plan to design a standalone XDS110 debugger. The major consideration is to have the smallest form factor. For this requirement, I designed a new…

Read article →

Replace Scilab with Julia?

As a programmer, I usually need to convert numbers between decimal and hexadecimal formats. Sometimes, I also need to define values in hexadecimal format. I have been using Scilab for 10 months. The format conversion issue still let me feel very inconvenient. In Scilab, I have to call dec2hex() and hex2dec() to convert…

Read article →

Useful Tools From KiCad

I always want to find replacements of commercial CAD tools. For example, I have used GIMP (instead of Photoshop) for many years. So, I also tried to use KiCad couple years ago. But it is not very matured at that time. Today, I download the latest version (4.0.6) and try it again. I have to say, it is very useful now. Many…

Read article →

New Gear Arriaval: Keysight DSOX3024T

A good oscilloscope is always the basic equipment for a system designer. I have been looking for a suitable oscilloscope for a long time. Keysight DSOX3024T is my final choice. Why DSOX3024T? The 200MHz bandwidth (and 5GSa/s) is suitable for most applications. I am not going to design IC, the target is circuit board. So,…

Read article →

Current Measurement for Low-Power Applications

For low-power applications, current consumption and measurement is very important to ensure the target board can run as expected. There are several tools to achieve this purpose. As a maker , I choose to design a current-to-voltage converter by using a shut-resistor and an OP-AMP. Low-power applications usually consume few…

Read article →

Upgrade Flash Programmer for MSP430

My MSP430FR6820 project is almost finished and ready for production. It is time to upgrade my CC26xx Flash Programmer for it. For this, the programmer is also redesigned so that 4 sockets are put in a line. It will be more convenient for operator to use. Though there are many other options to program MSP430. There is…

Read article →

New Approach to Implement MSP430 Battery Monitor

As we know, MSP430 doesn't have builtin battery monitor. Though the ADC module does have a dedicated channel to measure 1/2 VCC. But there is a critical issue with this approach. The ADC module is usually used by other signal conversion task. It is difficult to switch ADC for channels with different sampling rate. In…

Read article →

CC26xx Flash Programmer

My CC2640 project is finished and going to mass production, it is necessary to design a flash programmer to program the internal flash of CC2640. For this requirement, I spent some time to design a dedicated flash programmer. In order to make it both easy to use and general for other SoC, I decide to use PC and "USB to UART"…

Read article →

Why I Switch to Scilab?

Most engineers know about Matlab . Some engineers know about Octave . People treat Octave as a free replacement of Matlab. Only few people know about Scilab . I have been using Octave for many years. As a programmer, I used to analyse problem before starting programming. Octave is also very useful for analysing massive data…

Read article →

C++ Reference Type

Compared to C, the new reference type in C++ make more efficient memory usage. A reference of a variable/object is just like an alias name of the variable/object. Some newbies from C to C++ usually get confused because they used to think it as a pointer. So, they may ask questions like "Can I initialize a reference to NULL…

Read article →

How Microsoft Make the World a Worse Place

"Microsoft has no taste" - Steve Jobs, 1995. The computer world began from Unix. BSD, Linux and Mac can be considered as Unix-like. The opposite side is Windows, created by M$. Yes, money is major stuff Microsoft care about, instead of making the world a better place. Originally, the computer operating environment is simple…

Read article →

UTF-8 Character in C

Talking about UNICODE, UTF-8 format is widely used. But there is not native supporting in C language. So, how to deal with it? For C programming, we usually use one byte as a character (type char ). UTF-8 is variable-length encoding, it also includes the ASCII characters from 0x00 to 0x7F. This feature makes it the best…

Read article →

uCRobotics Bubblegum-96

One of my friends gives me a uCRobotics Bubblegum-96 EVM board today. Bubblegum-96 is based on Actions Semi S900 processor and positioned as "smart open platform" for maker market. I never use products from Actions. But I am pretty curious about the integrated Cortex-A53 CPU. ARM claims A53 as the smallest 64-bits CPU in the…

Read article →

There Was an Old Man Who Swallowed a Microcontroller

This song was created by old_cow_yellow based on "There Was an Old Lady Who Swallowed a Fly" which was created by Rose Bonne in 1953. There was an old man who swallowed a microcontroller, I don't know why he swallowed a microcontroller, Perhaps he'll die. There was an old man who swallowed an assembler, That wriggled and…

Read article →

Integer Data Types in C/C++

You may have the same experience, programmers usually define different type names for the same data type. For example, a 16 bits unsigned integer could be defined as UINT16 , UINT16_T or uint16 . This is confusing and making things complicated. After struggling for so many years, I decide to use the standard types defined in…

Read article →

Add Syntax Highlighting

Sometimes, it is necessary to share code on this website, so I add syntax highlighting capability by using SyntaxHighlighter . SyntaxHighlighter is capable of dealing with lots of programming languages, including my favourites C and C++. Here is an example of C++ code snippet with line 27 highlighted. #include &ltpos.h>…

Read article →

CC2650 SensorTag and LaunchPad

Got the CC2650 SensorTag, DevPack and LaunchPad from TI. Thank you TIer. Both DevPack and LaunchPad have built-in XDS110 debugger. No extra debugger is required to start development. CC2650 is a multi-standard 2.4GHz ultra-low power MCU. It supports BLE, IEEE 802.15.4 and proprietary radio. It contains a 48MHz Cortex-M3 as…

Read article →

MSP430 Boxing Robot Mug

Got the mug today, it is nice.

Read article →

New Arrival - LAUNCHXL-F28069M

Just got my new LaunchPad, LAUNCHXL-F28069M and BOOSTXL-DRV8305EVM. More details can be found at TI website . This LaunchPad would be my first step to implement real motor-control products. I learned lots of control algorithms in NCTU when I was a college student, it's time to go further.

Read article →