XTW100 Mini Programmer Software and Tests

 Author:   Posted on:    No comments

I traced the schematic of a new SPI/I2C memory programmer based on STM32 microcontroller: the XTW100 Mini Programmer. I should now use it to program some EEPROM and flash memory chips. Unfortunately, I can't go that far. All tests with the only programming application available went wrong. Everything failed except I2C EEPROM erase. The programming utility is a simple Delphi application, with "Chinese user-friendly operation interface". Not at all user-friendly for someone whose computer does not have any support for Chinese language installed. Anyway, after I couldn't use the programmer at all, I tried debugging it. I put a logic analyzer on all the pins for I2C EEPROM and got some strange PWM-like signals on SCL and A0 lines. Then I thought I could extract the binary firmware from STM32 flash with ST-Link. Bad idea. The device seems to have entered "self-destruct" mode after I cleared the read protection bit and all I can read now is an empty flash.

My programmer is now completely useless (no LEDs, no USB activity). All it needs is a new firmware. Having the schematic and plenty of development options, including Arduino support, writing an alternate firmware for this device is not an impossible task. But it requires time, since a new PC programming utility is also needed. I decided to write this post anyway, maybe this programmer really works for somebody. You can get a partially translated programming tool at the end of this post.

CH341A and XTW100 Mini Programmer

CH341A and XTW100 Mini Programmer

XTW100 Mini Programmer Schematic and Driver

 Author:   Posted on:    No comments

I recently found a new serial programmer, the XTW100 Mini Programmer which is supposed to be an "upgraded" variant of the well-known CH341A Mini Programmer. Having a similar price to CH341A, I didn't wait any longer and ordered myself one. With a PCB slightly bigger (in length) than the PCB of CH341A, this new device is built around an STM32 ARM microcontroller. Having native USB port and hardware I2C and SPI, these microcontrollers with proper firmware could do a good job for this purpose.

Yet, there are some advertised features of this programmer that seem to good to be true (for a 4 USD programmer). Just as I did with the CH341A, I will try to draw the schematic and look for drivers and software for this XTW100 memory programmer. Because the STM32 is a 3.3 V device I can say for sure that this programmer will not have the 5 V bus levels issue. I got my XTW100 from AliExpress / WAVGAT store.

Product photo of XTW100 programmer

Product photo of XTW100 programmer

PID control for DC motor with optical encoder

 Author:   Posted on:    No comments

In the previous post I gathered information about a cartridge slide unit taken from an old inkjet printer. As I found out, the printer used a common DC motor to move the cartridges on X axis, however with the addition of an optical encoder with strip, the cartridges could perform precise movements. So, I want to interface this to Arduino. Original printer electronics such as motor drivers were of no use (proprietary ICs without public datasheets).

I had to drive the motor with a L298N H-bridge module and for the encoder I built a PCB which replaced the original one used in printer. The software is not as simple as you may think. I just can't turn on motor until the reading of encoder equals the desired position. Suddenly stopping the motor will not result in a sudden stop of the sliding block. Due to inertia, it continues to move a bit, even with the motor electrically shorted. The proper approach requires a PID (proportional-integral-derivative) control algorithm which adjusts motor speed using PWM.

The motor with optical encoder wired to Arduino

The motor with optical encoder wired to Arduino

Optical encoder motor control for printer slide unit

 Author:   Posted on:    No comments

I disassembled an old inkjet printer without working cartridges. Buying replacement ink cartridges was not worth because the price of both black and white and color ink cartridges equals the price of a new printer. I couldn't throw away the printer without taking any usable electronic and mechanic parts from it. To my surprise, the cartridge holder is placed on a metallic sliding unit that seemed interesting.

Cheap design though. Plastic block sliding on metal axis, but since it did its job in the printer, it may work elsewhere too. However, instead of using a stepper motor to control the sliding unit, the manufacturer has chosen a closed loop system with a regular DC motor and an optical encoder with a strip. That's the approach for most home-use printers. When looking for a way to control such a system with Arduino I didn't quite found something that worked.

Optical encoder motor control for printer slide unit

The printer slide unit with a custom encoder PCB

Fixing a broken rotor coil of 775 motor

 Author:   Posted on:    No comments

I powered a 775 motor and strange things happened. The motor was new, never used before. In less than 10 seconds while it was supplied with voltage, it looked as if something was attempting to block the axis from spinning, I heard crackling noise from the motor then smelled some smoke. Not good... yet it was still spinning. It's worth mentioning the context in which this happened. I was testing a power supply I'm building, and because something went bad the 12 V motor received 30 V with plenty of current (about 7 A). I would expect it to fail under these circumstances, but not in this way and not as fast. Overheated rotor coils and short-circuited windings is what should have happened.

Yet the motor was completely cold and still spinning when I powered it again (this time from 12 V). A short piece of copper wire came out of it - something bad has happened inside. So, I ended up with a partially broken motor. The next thing I did was to open up the case.

775 motor case opened

775 motor case opened

Compile SPLAT! RF coverage software on 64-bit Windows

 Author:   Posted on:    No comments

SPLAT! is a cross-platform, open-source software that can be used to analyse a radio link between two locations and to generate coverage maps of RF transmitters. Coverage maps are calculated using Longley-Rice Irregular Terrain Model (ITM) algorithm. SPLAT! can predict RF coverage for any frequencies between 20 MHz and 20 GHz. It is thus useful for ham radio, broadcast radio, terrestrial television and wireless networks. Although it is cross-platform, up-to-date binaries for Windows are hard to find. On the other hand, for Linux users, it is available in the repositories of the major distributions.

I wrote in a previous post about SPLAT! and how to compile it with MinGW. At that time, the compiler package I used was only available for 32-bit architecture. Since most systems are now 64-bit, I had to use a different compiler package to get 64-bit SPLAT! binaries. Here is the good news: you can either follow this tutorial or you can jump to the end of this post and grab the precompiled binaries (SPLAT! is licensed under GPL v2).

Compile SPLAT! RF coverage software on 64-bit Windows