Posts

Showing posts from February, 2025

Battery Capacity Monitor Using ADS1115

Image
ADS1115 is 4 channel 16 bit Analog to digital converter. Actually I only need 1 channel to measure the battery voltage but unfortunately ADS1013/ADS1113/ADS1014/ADS1114 module not available at AliExpress and ADS1115 cost about SGD1.80 which is quite reasonable 😁. The reason I'm looking into analog to digital converter is because the remote control transmitter that I made here , out of analog input to measure battery voltage. I'm not sure if I have enough memory space for it thoughπŸ˜•. I got the schematic below from internet, I posted here for reference. Take note the ADDR pin is pull to ground by 10K resistor, which mean by the default address is 0x48. ADDR = 0x48 if ADDR pin connected to GND ADDR = 0x49 if ADDR pin connected to VCC ADDR = 0x4A if ADDR pin connected to SDA ADDR = 0x4B if ADDR pin connected to SCL Nothing special on the Arduino Nano connection either. I used 10K potentiometer just for testing purpose. In real application it will be connected to Lithium Ion batte...

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...