Coder Social home page Coder Social logo

Comments (14)

blinkzz avatar blinkzz commented on July 21, 2024 1

Would like to see the same for ZHA by exposing some number input or range slider, after upgrading from 1.0.1 to 1.0.2 some sensors fail to deliver their status now

from z03mmc.

zzz676 avatar zzz676 commented on July 21, 2024 1

No. Special switching from the program is required. After +3 dB, the chip switches the transmitter power directly to the battery, without the built-in DC-DC (1.8V). As a result, with an increase in power, the supply voltage drops sharply, and the return on the CR2032 becomes even less than at -10..-20 dB :)

A half-discharged CR2032 battery has an internal resistance of 100 ohms. The thermometer must operate from a 3 V source with a series resistance of 100 ohms, otherwise the battery will be used up by 50% (to the dumpster).

The optimal operating mode for Xiaomi LYWSD03MMC (without circuit additions) from CR2032 is +0 dB (<8mA p-p). Less or more will be worse, because Zigbee receivers have poor sensitivity compared to BLE(5.0+). And there is no point in less return due to the total consumption of the CPU itself. Use a gateway or ZigBee Direct. Telink Zigbee-Direct or Telink SDK 'Zigbee + Bluetooth LE Concurrent Mode'

А что если дать возможность снижать мощность передатчика, для экономии батареи. У меня, допустим, эти датчики стоят в 50 см от выключателей с зигби, работающих как роутер. И возможно и с меньшей мощностью антенны нормально бы передавали информацию.

from z03mmc.

pvvx avatar pvvx commented on July 21, 2024 1

Этот график не соответствует пиковому потреблению при передаче (работе передатчика).
В LYWSD03MMC расчетные разработчиками и рекомендуемые производителем чипов конденсаторы в питание Xiaomi не впаял - пожадничал милли-доллар - оставив пустые позиции на плате. Или им заплатили производители батареек :)

https://www.ti.com/lit/wp/swra349/swra349.pdf
...

для забаненных в google :)
https://disk.yandex.ru/i/FCI2cF02obUBdA
https://disk.yandex.ru/i/va5kSYfSVlCzpg
https://disk.yandex.ru/i/6dNf5Dgx86Bj9Q

image

Рисунок 1: Полная емкость батареи CR2032 мА·ч доступна только при номинальном токе 1 мА.

При RF TX 0 дБ ток 8+ мА (сумма с потреблением CPU), напряжение полу-разряженной CR2032 падает до
3-100*0.008=2.2В
Где:
3 - это 3B выдаваемое электрохимическое напряжение данного типа батареек при +20..25С (даже у полностью севшей)
100 - это 100 Ом внутреннего сопротивления у полу-разряженной батареи. Батарея CR2032 садится именно увеличивая внутреннее сопротивление:

image

0.008 - это ток в Амперах.

При +3дБ падение напряжения уже приводит к перезагрузке или зависанию чипа.
При резких бросках напряжения питания у TLSR825x первым сбрасывается-нарушается отсчет внутренних таймеров. Это влияет на распределение процессов обработки событий приема-передачи – временную диаграмму для обслуживания Zibee или BLE. Для корректной работы нарушения тайминга не должны достигать 1 us на пару сек.

И т.к. Zigbee использует запись в Flash, а рекомендация от Telink гласит – перед каждой работой с Flash проверять наличие напряжения питания на уровень не менее 2.0В. Сам чип работоспособен до 1.8В.

Т.е. при вылавливании падения напряжения ниже 2.0В чип должен проследовать в deep-sleep на несколько минут. Проснувшись – проверить, восстановилось или нет питание и действовать далее – опять спать или можно работать. Такой сценарий с CR2032 отрабатывает часто, когда температура падает в отрицательные значения или термометр работает от солнечной батареи с малым АКБ. Утром нагреется и заработает. Без реализации такой процедуры батарея будет высажена в ноль в первый раз при падении напряжения.

from z03mmc.

pvvx avatar pvvx commented on July 21, 2024

Without hardware improvements, it is impossible to increase the output of the transmitter. There is not enough CR2032 battery current. It will only work for the first few days on a fresh battery. Further, the internal resistance of the battery will increase and instead of increasing the recoil, there will be a decrease due to voltage drawdown during transmission.

Zigbee has a longer transmission time and requires the installation of a large capacitor in the power supply.

from z03mmc.

Mostalk avatar Mostalk commented on July 21, 2024

@pvvx, I assumed that it was possible to change the TX antenna power since the @devbis decreased it to 3 dBm in the latest release. I don’t know what the power was before, but my sensor, which I mentioned above, worked better at the previous power value

from z03mmc.

pvvx avatar pvvx commented on July 21, 2024

+3 dB is the limit for Xiaomi LYWSD03MMC with CR2032. This already requires the installation of a capacitor in the place provided by the developers on the printed circuit board. The manufacturer has not installed capacitors - they save on everything.
The following power steps (up to +10 dB) require a different battery... The peak current (TX) will be more than 25 mA, which will lead to a drawdown of the CR2032 below 2 volts.

from z03mmc.

Mostalk avatar Mostalk commented on July 21, 2024

Now I understand that this is why the battery was very drained on the previous firmware version. Judging by the file changes, the power was not specified at all. That is, the sensor tried to operate at a maximum of 10 dB?

from z03mmc.

pvvx avatar pvvx commented on July 21, 2024

No.
Special switching from the program is required. After +3 dB, the chip switches the transmitter power directly to the battery, without the built-in DC-DC (1.8V). As a result, with an increase in power, the supply voltage drops sharply, and the return on the CR2032 becomes even less than at -10..-20 dB :)

A half-discharged CR2032 battery has an internal resistance of 100 ohms. The thermometer must operate from a 3 V source with a series resistance of 100 ohms, otherwise the battery will be used up by 50% (to the dumpster).

The optimal operating mode for Xiaomi LYWSD03MMC (without circuit additions) from CR2032 is +0 dB (<8mA p-p). Less or more will be worse, because Zigbee receivers have poor sensitivity compared to BLE(5.0+). And there is no point in less return due to the total consumption of the CPU itself. Use a gateway or ZigBee Direct. Telink Zigbee-Direct or Telink SDK 'Zigbee + Bluetooth LE Concurrent Mode'

from z03mmc.

pvvx avatar pvvx commented on July 21, 2024

В текущей реализации передача (при +0 дБ) дает потребление на длительность посылки самой передачи где-то в 8 мА. При этом основное время в ZigBee уходит на прием ответа и обработку "стека". И CPU ещё разогнан на 48MHz, что дает потребление в этих режимах 5..6 мА. Т.е. вы хотите немного убрать короткий горбик передачи, вылезающий среди общей активности во время периода пробуждения SoC на пару мА? Т.е. ужать общее потребление на пару процентов?
См. текущие диаграммы.
#11 (comment)

from z03mmc.

devbis avatar devbis commented on July 21, 2024

В моей прошивке частота выставлена в 24 МГц.

telegram-cloud-photo-size-4-5893151316224621799-y

По графику зависимости мощности от тока видно что где-то после 2.5 dBm потребление начинает расти круче.

from z03mmc.

Mostalk avatar Mostalk commented on July 21, 2024

По графику зависимости мощности от тока видно что где-то после 2.5 dBm потребление начинает расти круче.

Хмм, интересно, почему между 2.5 и 3.5 такой сильный скачек, а потом идет более гладко

from z03mmc.

zzz676 avatar zzz676 commented on July 21, 2024

В моей прошивке частота выставлена в 24 МГц.

telegram-cloud-photo-size-4-5893151316224621799-y

По графику зависимости мощности от тока видно что где-то после 2.5 dBm потребление начинает расти круче.

Судя по графику может имеет место и сделать 2.5 (до редкого повышения)

from z03mmc.

devbis avatar devbis commented on July 21, 2024

Да, уже снизил до 2dBm, чтобы с небольшим запасом. В будущей версии будет так.

from z03mmc.

pvvx avatar pvvx commented on July 21, 2024

Хмм, интересно, почему между 2.5 и 3.5 такой сильный скачек, а потом идет более гладко

Потому, что на уровнях +3дБ производится переключение питания передатчика напрямую к внешнему питанию, минуя встроенный в чип DC-DC.
Уровень выходной мощности в SDK задается специальными значениями, в которых некоторые биты указывают к какому питанию будет подключен передатчик и возможны разные комбинации на уровнях 0..+3дБ.
График показывает потребление только части RF, без учета потребления CPU и остальной включенной периферии в чипе, да в каких-то идеальных условиях (например как это делает Ti - замер на максимально возможном напряжении питания с включенным DC-DC, или при какой-то скважности передачи указывают средний ток - что только не сделаешь ради рекламы :)).
Реальные показатели тока при передаче на уровне +10дБ уходят далеко за 25 мА.

Вы можете сами снять реальную диаграмму зависимости используя Telink SDK Driver с примерами RF_Demo. И купив самый дешевый, немного пригодный для таких измерений, измеритель - nRF Power-Profiler-Kit-2, но учтя, что он сильно искажает измерения импульсных сигналов из-за встроенного авто-переключения диапазонов :)

from z03mmc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.