Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for IPSTUBE clock - Model H401 #77

Closed
wants to merge 16 commits into from

Conversation

Martinius79
Copy link
Contributor

@Martinius79 Martinius79 commented Jul 14, 2024

Added support for IPSTUBE clock - Model H401

Just the minimum changes, to support the model with this branch.

The IPSTUBE clock has 8MB flash, so no default board from PIO is fitting. I created a JSON file with the modified values (esp32dev8MB.json) under the subfolder "boards" so it can be used in the PIO project.

I created a new "partition table file" (partition_noOta_1Mapp_7Mspiffs.csv) for the 8MB flash version.
1MB app partition, 7MB SPIFFS partition

I added a new environment in the platform.ini file (env:esp32dev8MB), to use the new board configuration file and the new partition table file.

Because each environment has its own target directory (PROJECTDIR.pio\build\ENVNAME), the helper scripts to copy and modify the libs files needs another target folder. So I created script_adjust_gesture_sensor_lib_8MB.py and script_configure_tft_lib_8MB.py and added it to the new env.

I added/copied a section to define the IPSTUBE clock configs in the GLOBAL_DEFINES.H file.
See section "#ifdef HARDWARE_IPSTUBE_H401_CLOCK" in the file.
Specials:
New defintion for a one button menu (#define ONE_BUTTON_ONLY_MENU), because only one hardware button is available for IPSTUBE.
Removed the shift register pin config definitions (CSSR_DATA_PIN,CSSR_CLOCK_PIN, CSSR_LATCH_PIN).
Removed defintion of "TFT_ENABLE_PIN", because the LCDs are always on for the IPSTUBE and then the exisitng logic can be used.
Added "#define TOUCH_CS -1" to get rid of a warning (also possible with #define DISABLE_ALL_LIBRARY_WARNINGS).
Set TFT_CS to -1

I modified the _USER_DEFINES - empty.h file
Added "#define HARDWARE_IPSTUBE_H401_CLOCK as "Type of clock"

I modified the ChipSelect class.
Moved inline defined methods from ChipSelect.H file to ChipSelect.CPP file.
Modified the existing "digit" select methods, that they work with IPSTUBE and other clocks. Normaly by keeping the existing logic and just switching or leaving out code where needed by checking, which hardware is defined.
Added the array for the CS pins of the IPSTUBE.
Added some IPSTUBE specific methods to select the right LCDs. enableDigitCSPinsH401, disableDigitCSPinsH401, enableAllCSPinsH401 and disableAllCSPinsH401.
So the existing logic for selecting and activating/disabling the LCDs from the TFTs class can be used without modification.

I modified the TFTs class.
Moved some inline defined methods from TFTs.H file to TFTs.CPP file (enableAllDisplays, disableAllDisplays, toggleAllDisplays).
Modified existing methods that they work with IPSTUBE and other clocks. Normaly by keeping the existing logic and just switching or leaving out code where needed by checking, which hardware is defined.

I renamed the Button.CPP file to Buttons.CPP and modified the header file as well to use the new file.
I modified the Button class.
I added some public helper methods, to be able to set button states from outside of the instance of the class (setDownLongEdgeState, setUpEdgeState, setUpLongEdgeState)

I modified the Buttons class.
Two constructors are needed now, depending on the definition of ONE_BUTTON_ONLY_MENU or not. Classic way, Buttons instance with four buttons is created, new, Buttons instance with only one button is created.
Moved some inline defined methods for Buttons class from Buttons.H file to Buttons.CPP file (loop, begin, stateChanged). Also for the one button menu implementation.

I modified the Menu class.
Two loop methods are now implemented. One for the one button menu (ONE_BUTTON_ONLY_MENU defined) ot the classic one, with four buttons.
The "edge" logic for the buttons is changed now, from "down_edge" to "up_edge". So the software (here the menu) only reacts, if a button is "released", not while it is pressed.
This makes "long pressed button" possible without having a "wrong" button state left.
So in the one button mode, a long press of the button, is interpreted as a "move to the right" (right button).
I added a method to print out the names of the menu states (getStateStr).

I modified the Clock class file.
IPSTUBE is using the DS1302 as RTC chip, so needs to be defined as well, to use another driver as for HARDWARE_SI_HAI_CLOCK.
Modified to "#if defined(HARDWARE_SI_HAI_CLOCK) || defined(HARDWARE_IPSTUBE_H401_CLOCK)"

Modified the main.cpp file.
Init TFTs first, before gesture in the setup function.

Working and Not-Working list for IPSTUBE H401:

Working:
All "normal" clock functions are working.
Possible to flash all needed partitions to the clock (button needs to be pressed while connecting USB-C cable and then released to go into download mode every time you want to flash)
Passing the setup() function with initalizing messages on the LCDs.
Connecting to Wifi network.
Getting time from NTP server.
Loading the images for the clock faces from the SPIFFS partition.
Showing the actual time on the LCDs with the loaded clock face images.
Running the main loop function.
Menu is working (see below for limitations with the one button menu). Able to go through all sub-menu points and select the functionalities (backlight pattern selection, backlight color if pattern is constant, backlight intensity, 24/12h clock, blank zero, time zone offset hours, time zone offset 15 min, clock face selection, WPS menu if activated).
Loading and storing config values from the config partition.
Connecting to the MQTT broker server for sending and receiving MQTT messages.
"Dimming" the images of the clock face.
"Normal" LED backlights on the bottom of each LCD are working. Turning on and off is possible. Dimming is possible. All patters working.
Night and Daytime mode is working.
LED stripe on the bottom of the clock, as a continuation of the normal 6 backlight LEDs.

Can't tell if working:
Geolocation broker based time zone selection -> no account, so not tested.
WPS connect -> never used, never tested.
Temperature sensor -> There is no connector/socket on the PCB for this, so no temp sensor support for this clock!

Limited working:
The PCB has only one button!
There is a special menu mode activated for the IPSTUBE hardware, that short pressing brings up the menu and long pressing changes the value of the actual selected menu then.
The value always changes "to the right", because the long button press is emulating a "rigth button" press in the menu only in the moment.
This limits the setup of the timezone values and makes the selection of the other menu values a bit "unhandy", because you have to pass all values, to be at first option again, but it works for now.

Not working:

LED stripe: On some versions there is a LED stripe on the bottom of the device installed. It is connected to a socket on the PCB between FPC5 and FPC6. So it can be retrofitted, if you find the right LED stripe. This LED stripe is not working in the moment, because no specific initialization is done for it. Sometimes, the LED stripe is turning on by accident, so it seems, as if this is somehow connected to same lines, as the "normal" LED backlights on the bottom of each LCD. Needs further investigation.

TFT LCD disable/enable:
TFT LCDs can not turned on/enabled or turned off/disabled on the device without modifing the hardware!
The pin 1 and pin 7 of each FPC for each TFT LCDs are connected together directly to the +V3.3 line of the PCB.
Pin 1 is the general VCC power (LED Anode) and pin 7 is the VDD (Power Supply for Analog).
So there is no way to control the VDD on pin 7 seperately or to turn on or turn off power to pin 1.
One possible solution would be disconnecting pin 1 and pin 7 and connecting pin 1 to the existing "switchable" power control lines, like the one from the backlights.
Connecting all pin 7 somehow to an unused pin on the ESP32 is really really tricky and I don't belive, the chip would survice this procedure (just my opinion).

Copy link

@eku eku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I suggest that you create a hardware folder like the one that exists for the other clocks and enter the corresponding pictures of the board and pin assignment there.

This would support further development by others.

EleksTubeHAX_pio/src/main.cpp Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
…he main.cpp, added photos and wiring schematics of the clock, added components list
@Martinius79
Copy link
Contributor Author

May I suggest that you create a hardware folder like the one that exists for the other clocks and enter the corresponding pictures of the board and pin assignment there.

This would support further development by others.

Done!
Added some photos, unfinished KiCAD wiring schematics and a list of identified components.

@Martinius79
Copy link
Contributor Author

I found out, how the LED stripe on the bottom of the clock is working.
It is just a continuation of the existing RGB LEDs with the same controlling pin. So I added a new definintion, for the numbers of the backlight LEDs (NUM_BACKLIGHT_LEDS) for each clock now and changed the backlights class, to use the new defintion, instead of NUM_DIGITS.

Copy link

@eku eku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! Still has potential for improvement.

The top-level README could do with a few words on IPSCLock, including what works and what doesn't.

Hardware IPSTUBE/Clock Components.txt Outdated Show resolved Hide resolved
Hardware IPSTUBE/1.jpg Outdated Show resolved Hide resolved
EleksTubeHAX_pio/src/GLOBAL_DEFINES.h Show resolved Hide resolved
EleksTubeHAX_pio/src/ChipSelect.cpp Show resolved Hide resolved
EleksTubeHAX_pio/src/ChipSelect.cpp Show resolved Hide resolved
@Martinius79
Copy link
Contributor Author

Good work! Still has potential for improvement.

Yes, a lot :)
But it is a spare time project, so one step after another...

The top-level README could do with a few words on IPSCLock, including what works and what doesn't.

I couldn't resist and doing an "refresh" of the README.MD file(s) in a seperated PR.
#80

Still working on it, because I noticed, I missed to tell, what is working ;(

@sozonnyk
Copy link

@Martinius79
I wonder if you can help me with your branch?
I have model H402: https://www.ipstube.com/en/product/IPStube-H402.html
I thought it may work with your branch AddedIPSTUBEH401-2
I managed to build and flash it - no errors, connects to WIFI, but screens are blank.
RGB Leds are on but no backlight or any other activity on screens.

I don't know how to disassemble the case without damaging it, so I can't really confirm the connections.
Could you think about a path forward for me to make it work?

@Walmtech
Copy link

I also have the H402 version as sozonnyk. I have managed to open it up without damage. I have not had chance to compare the circuit differences yet but a quick look I can see it is similar but not the same. A few photos for now.

H402 1
H402 2
H402 All

@Walmtech
Copy link

Here is a better Pic of main components seems we have the same memory chip, ESP, clock and serial chip so don't think there will be much difference to the HS401.
H402 4

@Martinius79
Copy link
Contributor Author

Hello,

thx @Walmtech for the pictures!

Yes, on this side of the board, it looks nearly all the same, except two places. But there seems to be no components soldered there (U6 left to the USB C connector and BT2 on the top right). So the LCD selection lines seems to be all the same and the code modification should work here.

@sozonnyk: Did you also flash the second (data) partition? It sounds, like you saw the "setup phase" on the displays, with the little text lines on the screen?
Please try to "Build" and the "Upload the Filesystem" for the esp32dev8MB env.

image

You can also watch the modified Readme.md file. See section: https://github.com/Martinius79/EleksTubeHAX/blob/OneDisplayTestH401/README.md#configure-build-and-upload-new-firmware
more precisley
https://github.com/Martinius79/EleksTubeHAX/blob/OneDisplayTestH401/README.md#2nd-fill-data-partition-spiffs-with-images

PS: I ordered a H402 now, but will take some time to be delievered from China.

Bye
Martinius

@sozonnyk
Copy link

sozonnyk commented Aug 12, 2024

Hi @Martinius79, thanks for your help.

Yes I uploaded both firmware and filesystem.

I updated _USER_DEFINES.h with the hardware version and wifi creds.
Then I booted in the bootloader and run:
pio run -e esp32dev8MB -t upload
Restart, boot to bootloader again, run:
pio run -e esp32dev8MB -t uploadfs
Restart normally - wifi connected, screens are dark, no backlight, so I can't see anything at all.
In the contrast, default firmware turns the backlight almost immediately and it is clearly visible.

Not sure what else I could try.

@Walmtech
How did you managed to remove the bottom plate after unscrewing screws? Looks like it is glued.
Also, did you try to flash Martinuse's branch?

@sozonnyk
Copy link

@Martinius79 Also, is AddedIPSTUBEH401-2 a correct branch?

@Walmtech
Copy link

@sozonnyk The bottom plate is a piece of thin black acrylic with double sided adhesive on it after you remove all the screws I just used a small flat screwdriver inside the screw hole to gently lever it up once it had risen enough to insert a second screwdriver between the outer edge and the plate I just gently removed the whole plate by hand. Came off with no scratches. I haven't flashed anything yet my visual studio code is setup for other things so will probably need to set up a VM so I can have a clean environment to work in. Not had the time yet :)

@Martinius79
Copy link
Contributor Author

@Martinius79 Also, is AddedIPSTUBEH401-2 a correct branch?

Yes, this is the branch, where this PR is coming from. So it is the right one.

@Martinius79
Copy link
Contributor Author

Not sure what else I could try.

You can use the serial monitor in VS Code, to watch the output from the clock!

Install the Serial Monitor Extension (if not present already)
image

Then you will have a new tab in the bottom panel (serial monitor). Set the COM port and hit "Start Monitoring"
image

Note: If the serial monitor is started, the COM port is allocated and the upload is not working!

If you now plug in the USB cable and power up the clock, it boots up and sends messages to the serial port.
The monitor has an auto detect, for the connected port if started monitoring, but it is a bit slow, so increasing the timeouts is sometimes usefull:

Change the delay in the setup() function in the main.cpp

delay(5000); // Waiting for serial monitor to catch up.

You should also uncomment the //#define DEBUG_OUTPUT line in your "_USER_DEFINE.h" file

Do you see something on the serial output? And what :)

If you want a lot more debug output, you can also use the "OneDisplayTestH401" branch from my fork and set uncomment all debug outputs, at least the //#define DEBUG_OUTPUT_TFT 1 and //#define DEBUG_OUTPUT_VERBOSE 1.

Bye
Martinius

@sozonnyk
Copy link

@Martinius79
So, this is the log from the OneDisplayTestH401 branch.
Everything looks fine, WiFi connected, NTP loaded, I can see the button being read too.
Blank displays though :(

Searching for clock face file sets...Checking for: /10.bmp
File FOUND: /10.bmp
Checking for: /20.bmp
File FOUND: /20.bmp
Checking for: /30.bmp
File FOUND: /30.bmp
Checking for: /40.bmp
File FOUND: /40.bmp
Checking for: /50.bmp
File FOUND: /50.bmp
Checking for: /60.bmp
File FOUND: /60.bmp
Checking for: /70.bmp
File FOUND: /70.bmp
Checking for: /80.bmp
File FOUND: /80.bmp
Checking for: /90.bmp
File FOUND: /90.bmp
9 clock faces found.
WiFi start
[  3389][D][WiFiGeneric.cpp:1040] _eventCallback(): Arduino Event: 0 - WIFI_READY
[  3482][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
[  3482][V][WiFiGeneric.cpp:341] _arduino_event_cb(): STA Started
[  3499][D][WiFiGeneric.cpp:1040] _eventCallback(): Arduino Event: 2 - STA_START
.[  4194][V][WiFiGeneric.cpp:356] _arduino_event_cb(): STA Connected: SSID: xxxx, BSSID: xxxx, Channel: 3, Auth: WPA2_PSK
[  4207][D][WiFiGeneric.cpp:1040] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
Connected to AP: xxxx
[  4289][V][WiFiGeneric.cpp:370] _arduino_event_cb(): STA Got New IP:xxx
[  4297][D][WiFiGeneric.cpp:1040] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[  4305][D][WiFiGeneric.cpp:1103] _eventCallback(): STA IP: xxx, MASK: 255.255.255.0, GW: xxx
Got IP: xxx
.
Connected to xxxx
IP address: xxxx
Clock start
Update from NTP Server...
NTP Data: 24 03 06 E7 00 00 01 6E 00 00 00 12 0A EB 08 04 EA 64 86 9F 91 F7 2E D7 00 00 00 00 00 00 00 00 EA 64 86 E8 8C 65 A2 CD EA 64 86 E8 8C 6B CD D4.
NTP time = 13:04:40
syncProvider()
1723467881
Getting NTP..NTP query done.
NTP time = 13:04:40
NTP, RTC, Diff:
1723467880
1723467881
-1
Updating RTC
Using NTP time.
Blank hours zero: 0
Twelve hour: 0
Timezone offset: 7200
MQTT start
HACK!!! Always use custom timezone offset defined in the CODE!
Used custom timezone offset: 2.00
Saving config, triggered by timezone change... Done.
Current active graphic index in uclock after init with config load: 1
Number of clock faces in tfts after init: 9
Current active graphic index in tfts after correction: 1
Done with initializing setup!
main::updateClockDisplay!
TFTs::setDigit! digit: 0; value: 2
TFTs::showDigit: 0

Drawing image: 12
Not preloaded; loading now...
Loading: /12.bmp
image W, H, BPP: 121, 225, 8
dimming: 255
offset x, y: 7, 7
img load time: 429
img transfer time: 453
TFTs::setDigit! digit: 1; value: 4
TFTs::showDigit: 1

Drawing image: 14
Not preloaded; loading now...
Loading: /14.bmp
image W, H, BPP: 121, 225, 8
dimming: 255
offset x, y: 7, 7
img load time: 328
img transfer time: 344
TFTs::setDigit! digit: 2; value: 4
TFTs::showDigit: 2

Drawing image: 14
img transfer time: 14
TFTs::setDigit! digit: 3; value: 0
TFTs::showDigit: 3

Drawing image: 10
Not preloaded; loading now...
Loading: /10.bmp
image W, H, BPP: 121, 225, 8
dimming: 255
offset x, y: 7, 7
img load time: 328
img transfer time: 342
TFTs::setDigit! digit: 4; value: 5
TFTs::showDigit: 4

Drawing image: 15
Not preloaded; loading now...
Loading: /15.bmp
image W, H, BPP: 121, 225, 8
dimming: 255
offset x, y: 7, 7
img load time: 283
img transfer time: 298
TFTs::setDigit! digit: 5; value: 1
TFTs::showDigit: 5

Drawing image: 11
Not preloaded; loading now...
Loading: /11.bmp
image W, H, BPP: 121, 225, 8
dimming: 255
offset x, y: 7, 7
img load time: 501
img transfer time: 516
Setup finished!
Backlights::loop!
Backlights::rainbowPattern!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
current hour = 15
Setting daytime mode (normal brightness)
main::updateClockDisplay!
TFTs::setDigit! digit: 0; value: 4
TFTs::showDigit: 0

Drawing image: 14
Not preloaded; loading now...
Loading: /14.bmp
image W, H, BPP: 121, 225, 8
dimming: 255
offset x, y: 7, 7
img load time: 453
img transfer time: 478
TFTs::setDigit! digit: 1; value: 4
TFTs::showDigit: 1

Drawing image: 14
img transfer time: 14
TFTs::setDigit! digit: 2; value: 4
TFTs::showDigit: 2

Drawing image: 14
img transfer time: 14
TFTs::setDigit! digit: 3; value: 0
TFTs::showDigit: 3

Drawing image: 10
Not preloaded; loading now...
Loading: /10.bmp
image W, H, BPP: 121, 225, 8
dimming: 255
offset x, y: 7, 7
img load time: 328
img transfer time: 342
TFTs::setDigit! digit: 4; value: 5
TFTs::showDigit: 4

Drawing image: 15
Not preloaded; loading now...
Loading: /15.bmp
image W, H, BPP: 121, 225, 8
dimming: 255
offset x, y: 7, 7
img load time: 285
img transfer time: 299
TFTs::setDigit! digit: 5; value: 1
TFTs::showDigit: 5

Drawing image: 11
Not preloaded; loading now...
Loading: /11.bmp
image W, H, BPP: 121, 225, 8
dimming: 255
offset x, y: 7, 7
img load time: 501
img transfer time: 516
main::updateClockDisplay!
TFTs::setDigit! digit: 0; value: 4
TFTs::setDigit! digit: 1; value: 4
TFTs::setDigit! digit: 2; value: 4
TFTs::setDigit! digit: 3; value: 0
TFTs::setDigit! digit: 4; value: 5
TFTs::setDigit! digit: 5; value: 1
time spent in loop (ms): 1761
Backlights::loop!
Backlights::rainbowPattern!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToColor!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
Backlights::phaseToIntensity!
main::updateClockDisplay!
TFTs::setDigit! digit: 0; value: 5
TFTs::showDigit: 0```

@Martinius79
Copy link
Contributor Author

Martinius79 commented Aug 12, 2024

Ok, the logs are looking good, so no idea, what is going wrong...

I watched the pictures again and noticed, that the SPI lines look a bit different then on the H401.
The D20 diode is missing on the H402 and over this diode, the chip select is done for the LCDs on the other board.
So the layout may vary a bit here.

image
image

I guess, only way to be sure, is measure the known pins on the ESP and the ones on the displays.

Bye
Martinius

@Martinius79
Copy link
Contributor Author

Also one more question:

Can the displays turned on and off on the H402 with the original firmware?

Bye
Martinius

@sozonnyk
Copy link

sozonnyk commented Aug 12, 2024

@Martinius79

I watched the pictures again and noticed, that the SPI lines look a bit different then on the H401.

Do I understand correctly that displays are connected to the SPI, and each display's CS is selected through a shirt register?

Ok, scratch that, I've found your kicad file and looked at the schematics.
I will open my clock and check the connections.

Can the displays turned on and off on the H402 with the original firmware?

Do you mean by using a default mobile app? I actually never tried it.

@sozonnyk
Copy link

@Martinius79
Ok, I've solved it.
Yes, there is a global display switch - transistor Q1, connected to GPIO4, controlling the ground of all displays.
I uncommented TFT_ENABLE_PIN and removed #ifndef HARDWARE_IPSTUBE_H401_CLOCK in TFTs.c so it works for me now!

Thanks for your help and contribution.

image

@Martinius79
Copy link
Contributor Author

Hello again!

I am happy to hear, that the H402 has a On and Off mechanism for the displays and you made it to activate it!

I am now wondering, if I missed something with the H401 :)

Do you mean by using a default mobile app? I actually never tried it.

Yes. If you believe it or not, I had the idea, that the transistor is in use for the H402, so that you can turn on and off the displays with the firmware somehow...

I will try to change the code, that the displays can be enabled if it is a model H402.

Do you see any other changes?
Like are the "backlight" LEDs working and the button?

Bye
Martinius

@Walmtech
Copy link

@Martinius79 there is no transistor in solder position Q1 one pin of the missing transitistor goes to GPIO4 (pin 24), One pin is connected to the ground plane and the other look like it goes through vias to a line on the other side of the board - but reads as connected to ground!

Hs402

@Walmtech
Copy link

I guess that if we want to mod these to control the display backlights at least we have a spare GPIO that soldering to would be easier than off the ESP.

@sozonnyk
Copy link

@Martinius79
RGB leds are working properly.
Button works as well.
Long click is a bit counterintuitive, though, because it only activates on release.
It is probably better to change the logic a bit and introduce a double click for +/forward and long click for -/back selection.

@Walmtech
You probably won't believe it, but I do have the Q1 transistor soldered.
Could you please check a continuity between pin 2 of displays and ground?
If it is connected, it means there are 2 revisions of hardware for H402 - with and without "display off" capability.
If it is not, I have no idea how it is functioning for you because displays must have ground from somewhere.

Regarding soldering directly to ESP, I honestly doubt it.
Maybe possible if you have a binocular microscope and a very steady hand, but definitely beyond my skills.
I actually did butcher several ICs in such small packages, trying to wire directly to the chip.

@Walmtech
Copy link

Interesting that they have the transitor on your version - is the board the same revision? Maybe get a nice picture of your board so we can compare?

Full Board HN-213X35 3-HG from H402

All pin 2 are connected to ground on my board. I would imagine that if it the same board we should have a jumper/0ohm link that does this. The central pin on the transistor is connect with two vias to the line that goes to all pin 2s but it looks to me like it is also on the ground plane?? Very hard to see without disolving the black varnish!
Q1

As for soldering the ESP I was not suggesting that! On my version of the board without the transistor the GPIO4 links to an easy spot where the transistor would be if that makes sense - I guess I would like to see if we can convert my version to the same as your but if is a different pcb it may be more trouble than it is worth!

@Martinius79
Copy link
Contributor Author

I finally received my version of a H402 and it also has a transistor soldered.
So I changed the code to make it always work with both versions of the boards and both models.
Just need to merge it with the newest changes in main and push it then. The H401 and H402 will be supported.

The transitor is marked "A19TF" and seems to be a model 3401 (like this one https://www.reichelt.de/de/de/mosfet-p-ch-30v-3a-1-25w-sot-23-tsm-3401-smd-p115912.html).

PXL_20240825_143057183
PXL_20240825_143057183-EDIT

The board is marked as "HN-213X31-HGSY-A"

PXL_20240825_110821551-EDIT

So there is a good chance, that the transistor can be soldered on the Q1 spot on boards where it is missing.
But I didn't tried it yet. Will order the component and try it one day ;)

Bye
Martinius

@sozonnyk
Copy link

sozonnyk commented Sep 6, 2024

Thanks @Martinius79 !
What is still stopping us from merging this?

@Martinius79
Copy link
Contributor Author

I created a new branch for the changes (https://github.com/Martinius79/EleksTubeHAX/tree/AddedIPSTUBEs).
So I will close this PR soon and open another one.

@Martinius79
Copy link
Contributor Author

I am creating a new PR with changes merged from main and improvments for the second IPSTUBE clock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants