Uncommon IR standards

Hi,

I have a SuperSwitch(r) IR-Remote-Control Mains Dimmer Switch
The remote has one button: Tap for On/Off; Hold for Dimmer
Nothing has ever been able to “learn” the IR signal (including the FZ).

Today I (finally) measured the output with a 'scope, and very simply:
For as long as the remote button is pressed, a PWM signal is transmitted @ 932Hz with a duty cycle of ~5…10% [more accurate measurements required] …I assert: There is NO “data” in this signal [which retrospectively explains a lot] …Reversing the remote control (PCB date 1974), shows that it is a super trivial CMOS NAND Gate timer, tuned to 932Hz (I suspect 1KHz +/- 10%) with an R/C pair …which, in turn, flashes an IR LED via a MOSFET …The button is a PtM SP/ST which merely completes the circuit.

I would like to write a plugin to perform this action.
I’m all good with GUI I/O …What I’m stuck at is this:

  • How do I directly set the PWM frequency and duty cycle for the GPIO pin to which the IR LED is attached, and then toggle it on and off?
  • Can I use the same answer to perform the same action with an (different) ‘exposed’ GPIO pin?

Any advice greatly appreciated,
BC

1 Like

I’m about to understand the schema of the .it files to put them in a database for ‘on the fly’ generation of command sets (mostly universal remote) … But this project is at the very beginning.

Your text reminds me of the layout from https://github.com/logickworkshop/Flipper-IRDB/blob/main/TVs/Panasonic/Panasonic_TC-P50S2.ir
Except there is a ‘data’ part. This could be equivalent to your 5-10% duty cycle?

I can’t say any further, but maybe this helps anyway.

Hi LupusE,

Thanks for your input but, sadly, the IR RCU feature on the FZ all seems to be done via a library which requires data encoding.

I believe your example file gives the PWM Frequency and Duty Cycle [fantastic], but also specifies a string of on/off times for the fixed data sequence triggered by a button press …Whereas what I need to simulate is, basically, a 1/High/On to be sent for as long as the button is being pressed - which (unless I am missing something) is simply not possible (with the current FZ IR API).

So. The plot thickens…

firmware/targets/furi_hal_include/furi_hal_infrared.h contains

  • void furi_hal_infrared_async_tx_start(uint32_t freq, float duty_cycle);
  • void furi_hal_infrared_async_tx_stop(void);

…although _start() never seems to return …probably some setup required somewhere!?

However, the .h file also contains:

  • #define INFRARED_MAX_FREQUENCY 56000
  • #define INFRARED_MIN_FREQUENCY 10000

…and I need about 1000Hz (1KHz) …so this is clearly the wrong path.

The journey continues…

Solved.

1 Like