Search found 78 matches

by pidou46
Fri Sep 11, 2020 6:23 am
Forum: Development of MicroPython
Topic: Native C module: accessing objects. [SOLVED]
Replies: 27
Views: 1270

Re: Native C module: accessing objects

Would this "magic" could be used to bring unsupported esp32 periferics like "pcnt" without building a specific firmware ?
by pidou46
Mon Aug 17, 2020 8:59 am
Forum: Drivers for External Components
Topic: PZEM-004t_V3.0
Replies: 0
Views: 246

PZEM-004t_V3.0

Here is my simple but yet working PZEM-004t script to read AC measured parameters and reset energy counter.

https://github.com/pidou46/uPZEM-004t

I hope it could help.

Note: it's the first repository I publish, please warn me if there is something wrong. (license, ect...)
by pidou46
Wed Jul 29, 2020 1:55 pm
Forum: ESP32 boards
Topic: [SOLVED] Polling pin at 13_us rate ?
Replies: 11
Views: 503

Re: Polling pin at 13_us rate ?

Thanks for your help.

I hope the digital dial gauge I ordered will work with theses timmings. I will post an update then.

If not I will follow pythoncoder advice and go for a pyboard

Or maybe RMT receive or PCNT will come to esp32 since then (somewhere close to Christmas)
by pidou46
Wed Jul 29, 2020 9:29 am
Forum: ESP32 boards
Topic: [SOLVED] Polling pin at 13_us rate ?
Replies: 11
Views: 503

Re: Polling pin at 13_us rate ?

I've tried to disable IRQ: from machine import Pin import machine import time data=[] pin=Pin(12) state=machine.disable_irq() for _ in range(10): #time.sleep_us(1500) pin.value() data.append(time.ticks_us()) machine.enable_irq(state) print(data) It doesn't really help, I get result from 29 to 158_us...
by pidou46
Wed Jul 29, 2020 9:13 am
Forum: ESP32 boards
Topic: [SOLVED] Polling pin at 13_us rate ?
Replies: 11
Views: 503

Re: Polling pin at 13_us rate ?

good point Robethh ! With a modified version of the test script: from machine import Pin import time data=[] pin=Pin(12) for _ in range(10): #time.sleep_us(1500) pin.value() data.append(time.ticks_us()) print(data) I get: [code][395274683, 395274763, 395274800, 395274837, 395274873, 395275040, 39527...
by pidou46
Wed Jul 29, 2020 7:15 am
Forum: ESP32 boards
Topic: [SOLVED] Polling pin at 13_us rate ?
Replies: 11
Views: 503

Re: Polling pin at 13_us rate ?

pcnt support would help a lot in this case. There have been some attempt to implement it, but what I have understand is that it's not wanted to add it to the firmware like it have been done with RMT to avoid bloating it. https://github.com/micropython/micropython/pull/5496 On an other hand, it have ...
by pidou46
Wed Jul 29, 2020 6:47 am
Forum: ESP32 boards
Topic: [SOLVED] Polling pin at 13_us rate ?
Replies: 11
Views: 503

Re: Polling pin at 13_us rate ?

Thanks for your answers, I've made a typo, the clock is rated at 13_us (77_kHz) But it's quite different from one device to another. I've made some test to check if I would be able to manage the dial gauge case (400_us) from machine import Pin import time pin=Pin(12) while True: pin.value() print(ti...
by pidou46
Tue Jul 28, 2020 3:24 pm
Forum: ESP32 boards
Topic: [SOLVED] Polling pin at 13_us rate ?
Replies: 11
Views: 503

[SOLVED] Polling pin at 13_us rate ?

Hi, I'm willing to read data from Chinese digital dial gauge. This have been successfully been done with arduino microcontroller. Here are some references: https://www.davidpilling.com/wiki/index.php/DialGauge http://www.shumatech.com/support/chinese_scales.htm https://web.archive.org/web/2018073019...
by pidou46
Wed Jul 15, 2020 8:03 am
Forum: ESP32 boards
Topic: ESP32 - TXS0108E - PZEM-004T
Replies: 0
Views: 381

ESP32 - TXS0108E - PZEM-004T

Hello, I try to get data from PZEM-004T (V4) AC multimeter from a ESP32 with latest MP firmware. It looks like there I face an issue with UART at the hardware level, because the red led on the PZEM-004T doesn't behave the same when I plug it to my computeur. To adapt UART voltage level I use a level...