[Resolved] RPI 2B with Hifiberry DAC+ and IR ener314-ir

Tell us how you made up your Volumio powered Project

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

[Resolved] RPI 2B with Hifiberry DAC+ and IR ener314-ir

Postby Superparati » Mon Apr 18 2016 22:11

Hi,

A couple of month agi I decided to create my own mini Airplay station based on a Raspberry Pi with an additional functionality :). The RPi 2 B+ will also be able to control my amp Marantz through IR (ener314-ir)

I manage to build all in one piece and solder on the top of the Hifiberry Dac a support to plug the IR.
Image

Image

Before installing lirc it is important to update your linux distribution.
sudo apt-get update
sudo apt-get upgrade

Then I installed the lirc library
sudo apt-get install lirc

After having installed the lirc library I lost my time trying to setup and see if my IR was working but I found after that one file was missing and one way to solve that was to upgrade the RPI firmware.
I did it.
sudo apt-get install rpi-update

Once this last step is finished which could take a bit of time time you can easily setup your RPI.

Here is below my first configuration without the hifiberry DAC connected and it works. I manage to send some commands to my computer with success :)
I use the Apple remote configuration available here, Apple A1156
sudo irsend SEND_ONCE Apple_A1156 KEY_PLAY

As soon as I change the value of gpio_in_pin and gpio_out_pin it stops to work and I don't understand why. Do you have an idea?
With the below configuration it worked but only once. I rebooted and then nothing.
gpio_in_pin=11
gpio_out_pin=8

File: /boot/config.txt
Code: Select all
gpu_mem=16
hdmi_drive=2
dtoverlay=lirc-rpi,gpio_in_pull=up,gpio_in_pin=18,gpio_out_pin=17
dtoverlay=hifiberry-dacplus


File: /etc/modules
Code: Select all
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17


File: /etc/lirc/hardware.conf
Code: Select all
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="--uinput"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Don't start irexec, even if a good config file seems to exist.
#START_IREXEC=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/lirc0"
MODULES="lirc-rpi"

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""


Quick test to check if your library is properly installed.
Code: Select all
volumio@volumio:~$ dmesg | grep lirc_rpi
[    4.755171] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[    4.915277] pinctrl-bcm2835 3f200000.gpio: pin gpio18 already requested by lirc_rpi; cannot claim for 3f203000.i2s
[    5.764495] lirc_rpi: auto-detected active high receiver on GPIO pin 17
[    5.773851] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[    5.785751] lirc_rpi: driver registered!


A youtube video which help me to get it done this fun project.
[youtube]https://www.youtube.com/watch?v=QV_QmDKx0kQ[/youtube]
Last edited by Superparati on Thu May 12 2016 21:09, edited 1 time in total.
Raspberry Pi 2 b+ / Hifiberry Dac+ / ener314-ir
User avatar
Superparati
Sunday DIYer
Sunday DIYer
 
Posts: 20
Joined: Sat Apr 16 2016 11:06
Location: United Kingdom

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


RPI 2B with Hifiberry DAC+ and IR ener314-ir

Postby Superparati » Thu Apr 21 2016 22:08

Hi all,

For those who have played with a Hifiberry dac and an IR ENER314-IR how looks your config.txt and modules files?

Today I tried to use different GPIO but none of them were good.
I listed the GPIO which could work to setup the IR on the top of the dac
GPIO 4, 17, 27, 22, 23, 24 and 25 accordingly to the original documentation from the ENER314-IR and the RPi 2 with the dac pro.
Except the GPIO 17 the others don't work and the GPIO 17 work only for sending data.

According to the hifiberry website my dac pro used the GPIO 2,3 and 18.
On the other hand my infrared Energie is configured by default to use the GPIO 17 for sending data and the GPIO 18 to receive them.

I'm wondering if because everything is soldered together I don't have the choice.

What's your thoughts on that ?
Thanks !
Last edited by Superparati on Wed Apr 27 2016 20:44, edited 1 time in total.
Raspberry Pi 2 b+ / Hifiberry Dac+ / ener314-ir
User avatar
Superparati
Sunday DIYer
Sunday DIYer
 
Posts: 20
Joined: Sat Apr 16 2016 11:06
Location: United Kingdom


RPI 2B with Hifiberry DAC+ and IR ener314-ir

Postby Superparati » Sat Apr 23 2016 19:20

Hi All,

Finally, I received today my remote to control my Amp :)
The only wait to record and setup the lidcd.conf file when you have an Hifiberry DAC PRO is to remove it an instead plug the Ener314-IR.

Only then you can use the GPIO 18 to receive the ir data which is what I did.
Attached please find the lircd.conf file to control an Marantz PM6002. I've only recorded the basic keys such as power on/off, channels, volume and that all.

Once everything well configured and before to put back the Hifiberry DAC I've updated my modules and config.txt files and change the value of the GPIO_in_out_pin from 18 to 11 just to let the RPi boot properly otherwise he won't boot.

My boot/config file:
Code: Select all
gpu_mem=16
hdmi_drive=2
dtoverlay=lirc-rpi,gpio_in_pull=up,gpio_in_pin=11,gpio_out_pin=17
dtoverlay=hifiberry-dacplus


My /etc/modules file:
Code: Select all
lirc_dev
lirc_rpi gpio_in_pin=11 gpio_out_pin=17


My next actions will be to custom the current volumio web interface to control from there my amp.

Cheers,
Attachments
Marantz_lircd.zip
Marantz remote controller RC002PM
(2.09 KiB) Downloaded 188 times
Raspberry Pi 2 b+ / Hifiberry Dac+ / ener314-ir
User avatar
Superparati
Sunday DIYer
Sunday DIYer
 
Posts: 20
Joined: Sat Apr 16 2016 11:06
Location: United Kingdom


[Resolved] RPI 2B with Hifiberry DAC+ and IR ener314-ir

Postby Superparati » Mon May 02 2016 17:39

Hello,

End of the project !
I found the solution by using a native solution which is PHP.
The exec / shell_exec commands allow you via an web interface the execute some command line which is perfect in my case.

After creating a new page and a quick button / form I was able to control my HiFi system over my phone/computer :)

Easy and Happy 8-)
Raspberry Pi 2 b+ / Hifiberry Dac+ / ener314-ir
User avatar
Superparati
Sunday DIYer
Sunday DIYer
 
Posts: 20
Joined: Sat Apr 16 2016 11:06
Location: United Kingdom


Return to Diy Volumio Projects

Who is online

Users browsing this forum: No registered users and 0 guests