Quantcast

Re: Is software demodulation of 455 kHz possible on a Raspberry Pi 3

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is software demodulation of 455 kHz possible on a Raspberry Pi 3

Software
Thanks, Bengt, for looking into this.

> > I analyzed the codes of my remote control (for a heating system) manually using a non-demodulating IR receiver (TSOP98200) and a a Raspberry Pi 3. I noted that the remote control uses a 455 kHz carrier signal. FYI below the predicted .conf file.
>
> Using lirc_rpi? Any modifications? Interesting. (Some years ago I once
> tried a QSE159 on a RPi 1B and did not get it to work reliably).
I did not use lirc but a self written low level c++ program that repeatedly stores the pin input as fast as possible in an array; writing to disk is afterwards, as too slow.

> > The ultimate goal is to blast (not to receive).
>
> This should be straightforward, or is there a problem?
Well, it does not work. Either the codes are wrong or the RPi is not fast enough for software pwm at 455 kHz or I made some other error. Thus, I ike to first test the codes.
>
> > Nevertheless, to test, I like to confirm the derived codes by receiving them with mode2. The only demodulating IR receiver I could purchase is a no name receiver shipped from China; claimed to be an original TSOP9000 which appears to be not correct.
>
> ??? Possibly you mean TSOP7000? There is a number of offers on EBay and
> Aliexpress.
It is(or should be) a TSOP7000, apologies. The outer shape/size is slightly different than published for a real, orig i na l TSOP7000 and it fires constantly even in the absence of an IR remote signal. I assume electrical noise or visible light. The non-demodulating IR receiver is clean, so my hardware setup should be correct.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is software demodulation of 455 kHz possible on a Raspberry Pi 3

Bengt Martensson-2
On 12/02/16 17:34, [hidden email] wrote:
...
>>> The ultimate goal is to blast (not to receive).
>>
>> This should be straightforward, or is there a problem?
> Well, it does not work. Either the codes are wrong or the RPi is not fast enough for software pwm at 455 kHz or I made some other error. Thus, I ike to first test the codes.

IMHO, using a general-purpose Linux system for generating software PWM
is like using a microscope to hammer in nails: A microscope does not
make a very good hammer, and you might damage the delicate instrument;
BUT --- you may get the work done, if the task was not too challenging :-).

One thing to try on the RPi is hardware PWM (cf.
https://github.com/bengtmartensson/lirc_rpi/issues/1). But it still does
not take all the timings load from the main CPU.

>>> Nevertheless, to test, I like to confirm the derived codes by receiving them with mode2. The only demodulating IR receiver I could purchase is a no name receiver shipped from China; claimed to be an original TSOP9000 which appears to be not correct.
>>
>> ??? Possibly you mean TSOP7000? There is a number of offers on EBay and
>> Aliexpress.
> It is(or should be) a TSOP7000, apologies. The outer shape/size is slightly different than published for a real, orig i na l TSOP7000 and it fires constantly even in the absence of an IR remote signal. I assume electrical noise or visible light.

For power supply disturbances, the standard method is to connect a small
capacitator between power and ground immediately at the sensor;  it is
even in the "Application circuit" on page 1 on the data sheet. (It also
contains a 1k pullup on the output; might be worth a try.) Try both 3.3V
and 5V as supply, may make a difference.

Ambient light can be turned off, at least for testing.

Greetz,

Bengt


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is software demodulation of 455 kHz possible on a Raspberry Pi 3

Software
Thanks, Bengt.

> >>> The ultimate goal is to blast (not to receive).
> >>
> >> This should be straightforward, or is there a problem?
> > Well, it does not work. Either the codes are wrong or the RPi is not fast enough for software pwm at 455 kHz or I made some other error. Thus, I ike to first test the codes.
>
> IMHO, using a general-purpose Linux system for generating software PWM
> is like using a microscope to hammer in nails: A microscope does not
> make a very good hammer, and you might damage the delicate instrument;
> BUT --- you may get the work done, if the task was not too challenging :-).
>
> One thing to try on the RPi is hardware PWM (cf.
> https://github.com/bengtmartensson/lirc_rpi/issues/1). But it still does
> not take all the timings load from the main CPU.
Agreed that software PWM is not suited for 455 kHz although the kernel module lirc_rpi accepts to blast carrier frequencies up to 500 kHz (defined in "case LIRC_SET_SEND_CARRIER" in function lirc_ioctl in file lirc_rpi.c). Also my experience when recording non-demodulated signals with my own low level code hints that 455 kHz is too fast for software PWM on the RPi. For this reason, and as you now also suggest, I started to modify lirc_rpi to support hardware PWM.

As I cannot confirm the .conf file of my zehnder heating remote control, I will instead use a 38 kHz DVD player and its remote control (where the .conf file is confirmed to be correct and where software PWM works) to debug my modified hardware-PWM lirc_rpi kernel module. Due to other commitments it might take a couple of months until I have code ready to share.
 

> >>> Nevertheless, to test, I like to confirm the derived codes by receiving them with mode2. The only demodulating IR receiver I could purchase is a no name receiver shipped from China; claimed to be an original TSOP9000 which appears to be not correct.
> >>
> >> ??? Possibly you mean TSOP7000? There is a number of offers on EBay and
> >> Aliexpress.
> > It is(or should be) a TSOP7000, apologies. The outer shape/size is slightly different than published for a real, orig i na l TSOP7000 and it fires constantly even in the absence of an IR remote signal. I assume electrical noise or visible light.
>
> For power supply disturbances, the standard method is to connect a small
> capacitator between power and ground immediately at the sensor;  it is
> even in the "Application circuit" on page 1 on the data sheet. (It also
> contains a 1k pullup on the output; might be worth a try.) Try both 3.3V
> and 5V as supply, may make a difference.
>
> Ambient light can be turned off, at least for testing.
I tried to put the IR receiver (without the RPi3 to even eliminate the light from the status LEDs of the RPi) into a card board box. It helped somewhat; it took in the absence of a remote control signal longer (over a minute or so) until mode2 started to report pulses and spaces. If I gave a renote control signal during this 1 minute or so, then mode2 immediately started to record pulses and spaces. Strangly, these were in general very short microsecond events; even pulse 2, space 3, pulse 2; this is IMO a very short stretch of 455 kHz carrier signal that IMo should have been demodulated by the TSOP7000. I still think, even more so now, that the part I received is not a true TSOP7000. I might anyhow try a capacitator at some point; currently I have none available.
I didn't dare to connect 5 V supply voltage as the TSOP7000 datasheet states an output voltage of Vs - 0.25 V which is above the 3.3 V tolerated by the GPIO pins.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is software demodulation of 455 kHz possible on a Raspberry Pi 3

Bengt Martensson-2
On 12/04/16 16:18, [hidden email] wrote:

> Thanks, Bengt.
>>>>> The ultimate goal is to blast (not to receive).
>>>>
>>>> This should be straightforward, or is there a problem?
>>> Well, it does not work. Either the codes are wrong or the RPi is not fast enough for software pwm at 455 kHz or I made some other error. Thus, I ike to first test the codes.
>>
>> IMHO, using a general-purpose Linux system for generating software PWM
>> is like using a microscope to hammer in nails: A microscope does not
>> make a very good hammer, and you might damage the delicate instrument;
>> BUT --- you may get the work done, if the task was not too challenging :-).
>>
>> One thing to try on the RPi is hardware PWM (cf.
>> https://github.com/bengtmartensson/lirc_rpi/issues/1). But it still does
>> not take all the timings load from the main CPU.
> Agreed that software PWM is not suited for 455 kHz although the kernel module lirc_rpi accepts to blast carrier frequencies up to 500 kHz (defined in "case LIRC_SET_SEND_CARRIER" in function lirc_ioctl in file lirc_rpi.c).

IMHO, there is no reason to believe that this means that someone has
verified that it works up to a half MHz...

> ...  For this reason, and as you now also suggest, I started to modify lirc_rpi to support hardware PWM.

Kewl! Please keep us posted.

> As I cannot confirm the .conf file of my zehnder heating remote control, I will instead use a 38 kHz DVD player and its remote control (where the .conf file is confirmed to be correct and where software PWM works) to debug my modified hardware-PWM lirc_rpi kernel module.

It is always wise to check that the standard stuff is working as
intended before starting any "reseach". Possibly you will likely find
IrScrutinizer useful.

> I didn't dare to connect 5 V supply voltage as the TSOP7000 datasheet states an output voltage of Vs - 0.25 V which is above the 3.3 V tolerated by the GPIO pins.

Valid point, you may consider a voltage divider.

Greetz,

Bengt

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
Loading...