Mp3 / bluetooth / fm tuner module IR remote standard

dr pepper

Advanced Member level 1
Joined
Mar 15, 2010
Messages
428
Helped
35
Reputation
70
Reaction score
41
Trophy points
1,308
Location
lancs
Activity points
4,171
Anyone know what standard one if these cheapo players uses.
I want to control the player from an arduino using infra red, pref using a IR library.
 

I don't think there is a standard but most I've seen use the NEC compatible system. The address and function codes depend on the individual device. If you are replicating an existing remote control, I suggest using a program to read it first. Press all the buttons and note the codes they produce.

Brian
 

I used irremote to show me the raw data from each key on the remote, and I wrote those down.
However on sending them things dont work, I wonder if theres stuff missing like key up, key down etc.
I'll try sendNEC(); and see if that'll work.
 

Hi,

if I´m not mistaken, NEC sends one code on key_down ... and does repeat a different code as long as the key is pressed.
So for each key you have to know both codes.

Klaus
 

Sussed it.
The spec for Nec says 8 bit data and 8 bit address, however the raw data has 32 bits. Turns out the remote sends the command inverted then again non inverted, same with the address.
I extrapolated from the raw data coming from the remote the actual data, and now using a lib that supports Nec I can control the mp3 player with an uno.
I tried a wired connection instead of Ir but it did not work, probably cause the remote for a logic 1 sends a 38kc toneburst not just a constant logic level.
Maybe it would work on an attiny.
My remote on keypress sends the keys command and device address, then keeping the button pressed it repeatedly sends command '0' to the same address.
 

I'm having weird things happen, probably phone software issues.
The bluetooth audio player powers up, so does the arduino, the latter waits 2 seconds for the player to boot, sends the mode command to put it in bluetooth mode, waits 5 seconds for bluetooth to connect then sends the play/pause command.
It works the bluetooth audio device powers up and the phone starts playing via bluetooth, but consistently only every other time, as if it interpreted as play one time and pause the next(even though the phone is in pause every time). The arduino sends the same play/puase command each time, and the remote always sends the same command every keypress, weird.
 

Well this method doesnt work, the ir remote works but the idea does not.
Android phones are inconsistent when playing bluetooth audio, sometimes on connection to bluetooth they'll auto play on connect, others they need pause sending once, others twice, I dont see a way an arduino can power up a bluetooth device connect and play audio reliably, you'd need audio feedback to ensure audio has started, and that wouldnt work with a quiet starting sound.
So I think I'll get a Bt401 bluetooth audio module, maybe that will work or maybe even the same, even if the latter if I can 'talk' to the player I'd be able to see if sounds being played or not.
 

I know this is starting to get off topic.
Looking at the github pschatzmann/ESP32-A2DP library, the esp32 can be used as a A2DP sink with metadata support, so I cam implement a bluetooth audio player that also has data such as playback time etc, and a flag for playing / not playing, so I can use this to send or resend the play command if audio is not automatically started upon connection.
If you want something doing right, do it the hard way, well with this lib maybe not so hard.
 

Cookies are required to use this site. You must accept them to continue using the site. Learn more…