Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beomote as sender #1

Open
Ion3 opened this issue Jan 30, 2014 · 15 comments
Open

Beomote as sender #1

Ion3 opened this issue Jan 30, 2014 · 15 comments

Comments

@Ion3
Copy link

Ion3 commented Jan 30, 2014

Hej,

is it possible to use your library for Arduino to control B&O devices via IR? I understand your example to receive commands from the BEO4, but do you also have an example where the Arduino controls B&O devices via IR? (e.g. turning on TV by pressing a button on the Arduino)

Mange tak,
Timo

@christianlykke9
Copy link
Owner

Hey

At the moment the library only supports receiving b&o commands but it should not be that hard to implement a transmitter as well.

I have no plans of implementing a transmitter though, but feel free to use my code for guidance and information of the b&o ir protocol.

Med venlig hilsen
Christian Lykke

On 30/01/2014, at 17.40, Ion3 [email protected] wrote:

Hej,

is it possible to use your library for Arduino to control B&O devices via IR? I understand your example to receive commands from the BEO4, but do you also have an example where the Arduino controls B&O devices via IR? (e.g. turning on TV by pressing a button on the Arduino)

Mange tak,
Timo


Reply to this email directly or view it on GitHub.

@Ion3
Copy link
Author

Ion3 commented Feb 25, 2014

Hej Christian,

kunne du hjælpe mig lidt? I am looking for the following four commands:

typedef enum beo_command
{
STANDBY = 0x0C,
TV = 0x80,
VOLUME_UP = 0x60,
VOLUME_DOWN = 0x64,
}

But I cannot understand how the modulation of the IR signal has to be done.

Med venlig hilsen,
Timo

@MarkusLange
Copy link

The Interrupt is fast enough for this may it's hard to set it to 455kHz

@Ion3
Copy link
Author

Ion3 commented Mar 25, 2014

Dear Christian

I am still struggling with the modulation and started the following topic:
http://forum.arduino.cc/index.php?topic=228399.0

Is my understanding of the protocol so far correct?

Hilsen,
Timo

@christianlykke9
Copy link
Owner

Hey Timo

Bang & Olufsen uses manchester biphase code which you can learn about on e.g. Wikipedia.

Your understanding of the protocol looks okay but there is a 8 bit address and 8 bit command instead of a 16 bit command.

Instead of using digital write I would start a timer pulsing on one of the pwm pins.

Where are you from?

On 25/03/2014, at 10.40, Ion3 [email protected] wrote:

Dear Christian

I am still struggling with the modulation and started the following topic:
http://forum.arduino.cc/index.php?topic=228399.0

Is my understanding of the protocol so far correct?

Hilsen,
Timo


Reply to this email directly or view it on GitHub.

@Ion3
Copy link
Author

Ion3 commented Mar 25, 2014

Hej Christian,

here is, where you are starting your timer, correct?

Beomote.cpp:

void Beomote::initialize(int pin) {
    irPin = pin;
    // Setting the pinmode of the IR pin and resetting the listener
    pinMode(irPin, INPUT);
    reset();

    // Clearing Control Register A
    TCCR1A = 0;
    // Setting the phase and frequency correct pwm, and stopping the timer
    TCCR1B = _BV(WGM13);

    long cycles = (F_CPU / 2000000) * TICK;
    ICR1 = cycles;

    TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12));

    // Setting the timer overflow interrupt enable bit
    TIMSK1 = _BV(TOIE1);

    // Resetting clock select register, and starts the clock with no prescale
    TCCR1B |= _BV(CS10);
}

This is really something I still not understand! Is the PWM pulsing with 455 kHz here? TICK has been defined as 625 in Beomote.h.

I still need to learn a lot...

I am actually from Flensburg - near to the Danish border. :-)

@christianlykke9
Copy link
Owner

Hi Timo

Yes that is where I start the timer. But I only listen every 625microsecond so you cannot use that.

I have been working a little on implementing the transmitter but I found out that the fastest arduino timer ticks every 62.5microsecond. So we need some kind of hardware modulation to send data modulated at 455kHz.

@Ion3
Copy link
Author

Ion3 commented Apr 4, 2014

Hi Christian,

hardware modulation might work with a NE555. Besides that, the PWM library (http://forum.arduino.cc/index.php?topic=117425.0) seems to work with up to 2 MHz. What do you think?

Shouldn’t it be possible to send out a frequency of 455 kHz out of one pin and then send it to the IR-LED using a transistor connected to a second pin?

@PolyPv
Copy link

PolyPv commented Sep 6, 2014

Hi all,

I had the same problem and was searching for a B&O IR transmitter library.
After studying the timer functions of the Arduino and the IR protocol (Christians collection of HEX codes helped a lot!) I was able to create a working library.

I am using Timer1 to create the modulation frequency. It is not possible to set it exactly to 455KHz but to 444KHz instead. Frequency is tested with oscilloscope. Works quite well for me.
Gives you a range of about one meter if you connect the IR LED without a transistor directly to the Arduino PIN 9 and GND.

See my repository here: https://github.com/PolyVection/PolyIR

Best regards,
Philip.

@Ion3
Copy link
Author

Ion3 commented Oct 21, 2014

Hey Philip

Thank you so much! Your repository was the solution for my challenge. You've made my day!

Greetings,
Timo

@monin
Copy link

monin commented Jan 30, 2016

Hi,
Does anybody still have the SendRepository for BEO4 accessible? It seems to be deleted from PolyVection github.
Thanks.
Daniel

@alow2004
Copy link

Hi Philip, i have the same problem as Daniel,can you please share your work with us? , the polyvection folder is not available to us anymore. For my part, i try to interface alexa (amazon echo dot) and an arduino to pilot a beosound device...

@frank-trampe
Copy link

@PolyPv or @lon3, does one of you still have the PolyIR code as described above?

@cdf1982
Copy link

cdf1982 commented Jan 3, 2020

Yes, @PolyPv or @lon3, I'd also be very thankful if you have the PolyIR code described above... I'm looking for a solution to control a B&O TV (quite old, it's a BeoSystem 3) and it looks like you were the only one on the whole internet who got somewhere...

@Ion3
Copy link
Author

Ion3 commented Jan 29, 2020

Dear @cdf1982,
dear @frank-trampe,

I hope the attached helps. I haven't progressed in this project. Do you think there might be a solution to implement the Bang & Olufsen IR Codes in one of this projects?

Greetings,
Timo

PolyIR-master.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants