cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture a signal coming from a 433MHz receiver using a STM32F103 ?

Pierre Brico
Associate II
Posted on November 27, 2017 at 17:30

Hi,

I'm quite new in the wonderful world of STM32. I have a personal project where I would like to simulate a Somfy remote emitter/receiver. If I connect the receiver to my logic analyzer, I can see the signal. The protocol has been reverse engineered so it's not the problem to understand it.

My question is: 'what's the best way to capture the signal coming from the receiver' ? I've read the STM32 documentation about TIMER feature but I'm not sure it's the more efficient way to proceed.

One the signal is captured, how can I emit it ? Using TIMER again ?

I've looked for simple code which records and plays back a signal but I didn't find anything for the STM32...

Thanks,

Pierre

PS: Just in case, I've attached a capture of the signal I want to process. Here is the description:

https://pushstack.wordpress.com/somfy-rts-protocol/

 

#input-capture #stm32-f1
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on November 27, 2017 at 21:16

STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\TIM\InputCapture\main.c

STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\TIM\OCToggle\main.c

The goal being to measure the pulse widths in a form you can decode, and to generate similar arbitrary waveforms. I've posted many examples over the years, some may address the requirements, none specifically SOMFY, not something I'm using or have reason to use.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

4 REPLIES 4
Posted on November 27, 2017 at 17:48

You can use Input Capture to place the signal edges with respect to an internal time line, ie time stamp the edges

In 2017 I'd probably use an STM32L4 part with a 32-bit TIM

Output could probably be don't using Toggle mode, where the edges were described in a pattern buffer feed by DMA triggered by the placement of the last edge.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pierre Brico
Associate II
Posted on November 27, 2017 at 17:59

Thanks Clive One for your advice.

As it's a personal project, I'm using a cheap STM32F103 development board. Of course, if in the future I produce a commercial product, I will migrate to a more recent MCU.

Don't you have a piece of code to share (or an URL) on how to do it ? It will simplify my life as the documentation is quite complex with a lot of registers to play with.

Pierre

Posted on November 27, 2017 at 21:16

STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\TIM\InputCapture\main.c

STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\TIM\OCToggle\main.c

The goal being to measure the pulse widths in a form you can decode, and to generate similar arbitrary waveforms. I've posted many examples over the years, some may address the requirements, none specifically SOMFY, not something I'm using or have reason to use.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on November 27, 2017 at 22:04

Hi Clive One,

Thanks for the references. I will try to modify the code to obtain what I need.

Cheers,

Pierre