Posts

Showing posts from February, 2025

OLED hang on Arduino Nano

Image
On my 6 Channel Remote Control project, I discovered it hang at random time within ~15 minutes. Accidentally I discovered that it will immediately hang when I touch the I2C line (SDA, SCK). Another observation is the OLED is glitching randomly. Initially I though it is separate issue but the solution for hang also solve the glitching. (1) At first I though maybe because of noisy power supply causing the microcontroller to hang. So I add 100uF capacitor on the 5V. It does help, still hang (2) Since it was immediately hang when I touch the SDA/SCK, maybe by touching I'm adding capacitive load, slowing down I2C signal and causing communication error to OLED. I add 4.7K pull-up resistor to increase rise time but it make it worst, the remote control hang immediately after displaying welcome message on OLED even without touching SDA/SCL 😱. Not a clue what going on, I hook up oscilloscope and see something interesting. There are 2 clocks frequency during communication, 99kHz on the left...

6 channel Remote Control (Part 2)

Image
I replace the LCD to the smaller 1.3" OLED, that way I can reduce the size of the transmitter 😉. More compact compare to the previous attempt here . I also completed the menu system. Initially I was thinking to make it customizable, meaning you can assign any channel to throttle or elevator or rudder. However after half way of coding, I realize the code become very complex 😵 and the worst part is out of memory space which I do not know how to reduce 😬. Back to drawing board, this time I design it in opposite direction. I define which channel use for which purpose. However, I still want to have some kind of flexibility. Thus I introduce transmitter mode selection where you can select the target device you want to control, such as car, plane, delta wing, quadcopter, etc. Address trimming setting and channel reverse setting This is the idle screen look like, in picture below the remote was set to PLANE-A which is single servo aileron. As you can see it is telling you to connect CH...