Friday, 28 February 2025

Crimping large lugs

 I ordered a cheapo lug crimper to do a 50mm2 lug. The seller turned out to be a scammer. Got my money back, but I still needed to crimp the lugs. I looked at the tool and decided that my vice would give enough force. I ordered the jaws for 3€ and made a small jig


The small bit of 0.5mm sheet steel shrinks the die a bit, as it's a 50mm lug and 1 awg cable (43mm2)

Tuesday, 25 February 2025

Generic Tuya thermometer module

direct match https://www.elektroda.com/rtvforum/topic4098816.html

Desoldered the battery to get at the programming pads.

Flashed with open beken.

No voltage regulator. Chip BK7231N is rated 2.3 to 3.6V max





{

  "vendor": "Tuya",

  "bDetailed": "0",

  "name": "Full Device Name Here",

  "model": "enter short model name here",

  "chip": "BK7231N",

  "board": "TODO",

  "flags": "1024",

  "keywords": [

    "TODO",

    "TODO",

    "TODO"

  ],

  "pins": {

    "6": "CHT83XX_SCK;1;0",

    "9": "CHT83XX_SDA;1;2",

    "16": "dInput_n;0",

    "17": "BAT_Relay;5",

    "20": "dInput;43",

    "23": "BAT_ADC;40",

    "26": "WifiLED_n;37"

  },

  "command": "// start some drivers\r\nstartDriver CHT83XX\r\nstartDriver battery\r\n\r\n// hold button 20 to get into safe mode\r\naddEventHandler OnHold 20 SafeMode\r\n\r\n// battery\r\nBattery_Setup 2350 3000\r\nBattery_Measure\r\n\r\n//cal temp sensor, temp then humi\r\nCHT_calibrate -5 19\r\n\r\n// 20s timeout to deep sleep for 600s if following events never complete\r\naddRepeatingEventID 20 -1 1337 DeepSleep 600\r\n// wait until wifi is connected\r\n//waitFor WiFiState 4\r\n// wait for MQTT to connect\r\nwaitFor MQTTState 1\r\n\r\ncancelRepeatingEvent 1337\r\n\r\n// wait 5 seconds\r\ndelay_s 2\r\n\r\npublishChannels\r\ndelay_s 5\r\n\r\n// Deep sleep (shut down everything) and reboot automatically\r\n//DeepSleep 30s\r\n//temp diff, ignore humi, sample time, fault q\r\nCHT_Alert 0.5 0 60 2\r\n//20 min sleep. should wake up if large change as above\r\nPinDeepSleep 1200",

  "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",

  "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"

}

 

Monday, 24 February 2025

LSC wifi socket

Well, this would have been an easy convert from Tuya to esphome, but just as I was taking the programmed wb2s off the test rig I think it got fried. I had previously put the device in the scrap bin and replaced it with a ESP-05. However, this wouldn't play - I've had problems with all of these devices in that batch.

Aliexpress had a compatible looking ESP-02s for 1.65€ so that got my vote. Usual gp0 to 0v, reset, program with esphome.

button 14

relay 12

led 4

The pcb is marked with these numbers, even though a wb2s was fitted (wb2s IO was P26/P24/P7 respectively)