need: FR4 PCB with undersized hole, small file, C clamp
File the hole as close to the right shape for the nut. The mismatched FR4 hole will be expanded and provide grip.
Put it in a C-clamp or a vise or hammer
Apply extreme pressure
File/trim the FR4.
You get a captured nut! The FR4 provides a large surface area to be superglued behind a screw hole.
Here is what's what it is used for in a more refined manner. This is my 2nd try with the "captured nut". I cut a small piece of plexiglass with a saw blade attached to a Dremel tool. I used a hand drill to drilled 2 holes - one for the screw and a larger one the nut.
Note the edge of the plexiglass is flush with the module and this helps to prevent the PCB assembly from spinning.
The plexiglass is then superglued to the captured nut PCB to form a mount. I screwed in the PCB assembly to show how things fitted together. Notice the white stress points on the FR4 at the corner of the nut. That's what holding the nut in place (along with the superglue). FR4 can handle stress a lot better than plexiglass. The thickness is just right for the M3 screw and clears the PCB assembly. Luck or math? :)
The mount can then be superglued to the base of the controller. Mine has a label area.
The inside of the game controller case has a Li-ion batter pack pushed against it, so it is not safe to simply drill a hole to mount a standoff. Like they said "look before you drill!"
Here is what it looks like with everything in place. The PCB components are protected by the back side. The PCB assembly can be easily removed for easy access.
I made a USB HID game controller using a MPU6050 module. It was inspired by Cemu Gyro Joystick project that uses a dongle to supplement motion data for CEMUhook used in emulators.
Except mine is built with a STM8S003 with VUSB library. The STM8S003 is under the programming header. T he module is surface mounted without Castellated Edges.
There were some problems with I2C errata and interference from USB traffics, but that was all resolved by adding a delay.
It is a USB low speed device and as such limited to 7 byte HID reports (1 byte by Report ID). How to send 12 bytes of data? Group the Accelerometers and Gyroscopes under separate report ID and alternating their reports. Let the PC figure them out.
Windows recognizes the new device as a game controller with 6-axis (X/Y + 4).
Let's say I don't have a clue with setting up Node.JS and figure out how to compile stuff. I have to figure out what programs to use as an alternative.
STM8 version of LCD2USB (AVR) is available on github
It is a modification of a working STM8 VUSB library from STM8S-VUSB-KEYBOARD. The Russian comments are "google translated" to English.
I have done some additional changes in the USB stack for the Vendor Request packets needed by LCD2USB. I have changed the device library files to bare metal, refractor the code. etc. I have taken the packet processing core from AVR LCD2USB, but used my own code for the I/O.
A general purpose schematic and PCB for Eagle is available. The serial, I2C pins are broken out with spare footprints for a tiny crystal (available on aliexpress) and caps.
I am using 3.3V for the character LCD panel. See ELM's article for details. Contrast is controlled by PWM that drives the charge pump.
I am not sure if/how the buttons (S1 and S3) works with LCD Smarties. LCD2USB.dll doesn't seem to an entry for them.
LCD2USB works with LCD Smarties LCD2USB.dll plugin as a info display. It should work with lcdproc in Linux (not tested).
My STM8 LED clock project is also hosted here on HaD.io My timer was also updated with the latest features from the clock project. i.e. all the latest goodies such as NCO tolerance trimming, Daylight saving time and as part of the deal: Date, day of week, leap year. It would be interesting to see how temperature affects the accuracy clock on the timer as it is next to a window that leaks cold air and heated by a baseboard heater with a not so accurate bang-bang thermostat. Previously the timer was trimmed to about +/-0.6sec/day just by playing with the 16-bit divider.
I had to repair my very old Weller WESD51 soldering iron. Let's say I am not impressed at the overall build quality. It did last a very long time, but obviously not long enough for me. :P
They used a trimpot for the knob and a few corners were cut in this model and making it unreliable. More details on my blog.
I replaced it with a cheap chinese pot - I got a bag of 5 for less than $1. It may not be the greatest quality, but at least it has some metal parts in the bushing and shaft.
A bit of improvised molten hot glue casting, I modified the existing knob for the new pot.
This is a simple project: STM8S003 timer for watering plants and LED lighting It is essentially an clock project with a user interface for setting the alarms. The user interface is a missing piece in my microcontroller library and will be ported to my other projects.
Here is the UI for trimming the RTC by adjusting the values of the timer reload.
Doing some reverse engineering of the LCD as I don't trust unknown 3rd party source code without knowing where they came from and more important how they got it and what LCD are they for. Some of the low level settings are for a specific LCD type.
Anyway, this is a quick test without the proper timing delays modified from my own Nokia 5110 LCD code. That's a good start.
A couple of modules and some plastic knobs showed up in the last couple of days.
The C$ 2.58 buck-boost one has a possibly XL6019 (180kHz) relabelled as XL6009 (400kHz). I saw 180kHz switching waveforms on my scope.
Compare the texture of the one on the left vs the one on the right hand side (fake). The fake one has some fine scan lines vs the textured surface on the left
There are a couple of possibly fake or obsoleted ELNA labelled cap. The ripple (lol 200mV) does not match their claim of 30mV even at low load. They do have decent inductors.
The C$ 1.78 XL6015 (180kHz) buck module is probably using real part as I see 188kHz on my scope and the ripple is actually decent. The inductor is getting warm - they probably use the wrong type of core that is too lossy. Might move inductor from the buck boost module here.