Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Login


5 Pages123>»
Options
View
Go to last post Go to first unread
DQ828  
#1 Posted : Wednesday, August 8, 2012 10:17:13 PM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
I have started implementing Arduino control in the my BIII/preamp, at the moment it is just turning the DAC, Crossover & amps on & off in sequence, there is also a sleep function.

At this point I am not brave enough to remove the BIII firmware chip & dive right in. I am planning on controlling a motorised pot with the arduino but the question for today is.

At the moment I have the 4-Input Selection Switch Kit to switch sources, is it possible to connect the arduino directly to the BIII via the 4-Input Selection Switch Kit input on the BIII, is so how :) or is there info out on the web that I have not been able to find re how.

Amaro  
#2 Posted : Thursday, August 9, 2012 5:35:10 PM(UTC)
Amaro

Rank: Member

Groups: Member
Joined: 8/19/2009(UTC)
Posts: 61
Location: Spain

Thanks: 2 times
Was thanked: 6 time(s) in 6 post(s)
You only must write register 18. This is the info

7- Reroute SPDIF input line to pin Data5 which is also connected to D1 (Not needed for BII)

Register 18 (0x12): Spdif Input line
|0|0|0|0|0|0|0|1| SDPIF Input: Data1 (D) (In BuffII, spdif is connected to this pin)
|0|0|0|0|0|0|1|0| SDPIF Input: Data2
|0|0|0|0|0|1|0|0| SDPIF Input: Data3
|0|0|0|0|1|0|0|0| SDPIF Input: Data4
|0|0|0|1|0|0|0|0| SDPIF Input: Data5 (In BuffII, spdif is also connected to this pin)
|0|0|1|0|0|0|0|0| SDPIF Input: Data6
|0|1|0|0|0|0|0|0| SDPIF Input: Data7
|1|0|0|0|0|0|0|0| SDPIF Input: Data8



For write register, add one of those line to select input.

writeSabreReg(0x12,0x01); // Write value into reg 18 Input: Data1
writeSabreReg(0x12,0x02); // Write value into reg 18 Input: Data2
writeSabreReg(0x12,0x04); // Write value into reg 18 Input: Data3
writeSabreReg(0x12,0x08); // Write value into reg 18 Input: Data4



Add selected line at input selection (lines 1036 to 1057 Hifiduino code b10b1)

Original version.

void setAndPrintInput(byte value){
setAndPrintInputFormat(settings[input][FORMATVAL]%FORMATCHO); // Setup input format value
setAndPrintFirFilter(settings[input][FIRVAL]%FIRCHO); // Setup FIR filter value
setAndPrintIirFilter(settings[input][IIRVAL]%IIRCHO); // Setup IIR filter value
setAndPrintDPLL(settings[input][DPLLVAL]%DPLLCHO); // Setup the DPLL value
setAndPrintQuantizer(settings[input][QUANVAL]%QUANCHO); // Setup quantizer value
setAndPrintNotch(settings[input][NOTCHVAL]%NOTCHCHO); // Setup notch delay value
setAndPrintDPLLMode(settings[input][PLMVAL]%PLMCHO); // Setup dpll mode value
lcd.setCursor(1,0);
//lcd.print("IN");
//lcd.write(0xA5);
switch (value){
case 0:
lcd.print(no0);
break;
case 1:
lcd.print(no1);
break;
case 2:
lcd.print(no2);
break;
case 3:
lcd.print(no3);
break;
case 4:
lcd.print(no4);
break;
case 5:
lcd.print(no5);
break;


Modified version


void setAndPrintInput(byte value){
setAndPrintInputFormat(settings[input][FORMATVAL]%FORMATCHO); // Setup input format value
setAndPrintFirFilter(settings[input][FIRVAL]%FIRCHO); // Setup FIR filter value
setAndPrintIirFilter(settings[input][IIRVAL]%IIRCHO); // Setup IIR filter value
setAndPrintDPLL(settings[input][DPLLVAL]%DPLLCHO); // Setup the DPLL value
setAndPrintQuantizer(settings[input][QUANVAL]%QUANCHO); // Setup quantizer value
setAndPrintNotch(settings[input][NOTCHVAL]%NOTCHCHO); // Setup notch delay value
setAndPrintDPLLMode(settings[input][PLMVAL]%PLMCHO); // Setup dpll mode value
lcd.setCursor(1,0);
//lcd.print("IN");
//lcd.write(0xA5);
switch (value){
case 0:
lcd.print(no0);
writeSabreReg(0x12,0x01); // Write value into reg 18 Input: Data1
break;
case 1:
lcd.print(no1);
writeSabreReg(0x12,0x02); // Write value into reg 18 Input: Data2
break;
case 2:
lcd.print(no2);
writeSabreReg(0x12,0x04); // Write value into reg 18 Input: Data3
break;
case 3:
lcd.print(no3);
writeSabreReg(0x12,0x08); // Write value into reg 18 Input: Data4
break;
case 4:
lcd.print(no4);
break;
case 5:
lcd.print(no5);
break;

Regards

Edited by user Thursday, August 9, 2012 5:40:21 PM(UTC)  | Reason: Not specified

Amaro  
#3 Posted : Thursday, August 9, 2012 5:45:41 PM(UTC)
Amaro

Rank: Member

Groups: Member
Joined: 8/19/2009(UTC)
Posts: 61
Location: Spain

Thanks: 2 times
Was thanked: 6 time(s) in 6 post(s)
To rename inputs, see lines 360 to 374

/* Optionally choose the number of inputs. 6 is the max without
modifying the code. You could lower the number of input choices
here */

#define ICHO 6

/* Optionally change the name of the inputs. Keep 6 characters
Use blanks if necessary */

char no0[] = "PC-BST";
char no1[] = "PC-LOW";
char no2[] = "SPDIF1";
char no3[] = "SPDIF2";
char no4[] = "SACD-1";
char no5[] = "CDROM1";

DQ828  
#4 Posted : Thursday, August 9, 2012 11:26:31 PM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
Amaro

Doesn't that mean I would need to remove the firmware chip or do I just write to register 18 via the pins on the I/O connector that the switch now connect to IE

Pin 2 = 3.3v I assume this is to run the LEDS on the switch
Pin 4 = Grnd
Pin 6 = B0
Pin 8 = B1

Do I write to pins B0 & B1 to make the changes?
Amaro  
#5 Posted : Friday, August 10, 2012 3:30:48 PM(UTC)
Amaro

Rank: Member

Groups: Member
Joined: 8/19/2009(UTC)
Posts: 61
Location: Spain

Thanks: 2 times
Was thanked: 6 time(s) in 6 post(s)
You must remove the firmware, and plug the Arduino as explained on hifiduino web. And of course, modify the code.

http://hifiduino.wordpre...troduction-to-hifiduino/

Using Hifiduino not anything needs to be attached to the Ext I / O connector.

Chers
DQ828  
#6 Posted : Friday, August 10, 2012 11:26:15 PM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
Given that a simple switch can change the channels I would have thought the arduino could manage it as well by just connecting to the same input terminal.

Bearing in mind I am a carpenter & not an electronics guy, my guess to what is happening with the external switch is as follows.

Inputs B0 & B1 is where the switching is happening and the following is what the switch is doing

* B0 = High (seeing 3.3v) B1 = Low (seeing Grnd)

* B1 = High (seeing 3.3v) B0 = Low (seeing Grnd)

* B0 = High (seeing 3.3v) B1 = High (seeing 3.3v)

* B0 = Low (seeing Grnd) B1 = Low (seeing Grnd)

Should I stick to carpentry Angel

Edited by user Friday, August 10, 2012 11:28:08 PM(UTC)  | Reason: Not specified

DQ828  
#7 Posted : Sunday, August 12, 2012 8:55:41 AM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
Surely somebody knows the answer Angel
DQ828  
#8 Posted : Monday, August 13, 2012 6:24:07 AM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
Ok, my plan is to connect 2 arduino digital outputs to BIII, B0 & B1 and send them High & Low to see what happens, the arduino outputs will be sourcing 5v to the BIII inputs, will that be an issue?, should they be 3.3v when High?

Will it work.

Come on Brian or Russ you must know :)

Edited by user Monday, August 13, 2012 8:30:09 AM(UTC)  | Reason: Not specified

DQ828  
#9 Posted : Thursday, August 16, 2012 2:52:01 AM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
Hmm, no answer, wonder why?
Corpius  
#10 Posted : Thursday, August 16, 2012 6:22:08 AM(UTC)
Corpius

Rank: Member

Groups: Member
Joined: 2/1/2012(UTC)
Posts: 332
Location: The Netherlands

Thanks: 4 times
Was thanked: 18 time(s) in 18 post(s)
Hi Dq828
It is for sure posible using Arduino, but keep in mind that when using arduino you use 5v instead of 3.3v!! I Have to go to work right now, but I can help you with it as soon as I find the time.
Corpius  
#11 Posted : Thursday, August 16, 2012 8:23:57 AM(UTC)
Corpius

Rank: Member

Groups: Member
Joined: 2/1/2012(UTC)
Posts: 332
Location: The Netherlands

Thanks: 4 times
Was thanked: 18 time(s) in 18 post(s)
I have never used the input selection switch because I use Arduino to control the DAC, but you should try to determine which pins go HIGH or LOW when selecting the inputs.

Just connect Pin 2 from the switch board to Pin 2 (Ext_IO) at the DAC board and also Pin 4 from the switch board to Pin 4 (Ext_IO) at the DAC. Do not connect Pin 6 and 8 to the DAC, but use a digital multimeter (DMM) to determine when Pin 6 and 8 go HIGH or LOW.

I'm not entirely sure but I think you would measure something like this:

Input 1 selected: Pin 6 and 8 are both LOW (gnd)
Input 2 selected: Pin 6 and 8 are both HIGH (3.3v)
Input 3 selected: Pin 6 is HIGH (3.3v) and Pin 8 is LOW (gnd)
Input 4 selected: Pin 6 is LOW (gnd) and Pin 8 is HIGH (3.3v)

Note that this is just a example, please measure it to determine which pins go HIGH or LOW!!

When you figured out which Pins go HIGH or LOW when a certain input is selected you can do the same using Arduino setting Pin 6 and/or 8 HIGH or LOW at the EXT_IO connector, but make sure you use a Logic Level Converter (5v to 3.3v) to protect the DAC chip. Something like this or this will do fine. The last one would be a bit overkill.

EDIT: Not sure if you also need to connect the gnd(Pin 4 EXT_IO) to Arduino's gnd

Edited by user Thursday, August 16, 2012 12:44:14 PM(UTC)  | Reason: Not specified

DQ828  
#12 Posted : Thursday, August 16, 2012 10:09:27 AM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
Thank you, I think I can work out the High & Low from the schematic.

I will get a converter & give it a go, thanks very much.

David
Corpius  
#13 Posted : Thursday, August 16, 2012 2:09:19 PM(UTC)
Corpius

Rank: Member

Groups: Member
Joined: 2/1/2012(UTC)
Posts: 332
Location: The Netherlands

Thanks: 4 times
Was thanked: 18 time(s) in 18 post(s)
@Amaro

That is excactly how I switch between my four spdif inputs Angel . For switching between I2s/DSD and spdif I added some code to the SetAndPrintInputFormat function to switch the sidecar

DQ828  
#14 Posted : Thursday, August 16, 2012 10:06:45 PM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
I have ordered a level converter, now I just have to wait, I hate waiting Angel

Edited by user Thursday, August 16, 2012 10:16:43 PM(UTC)  | Reason: Not specified

Corpius  
#15 Posted : Friday, August 17, 2012 7:19:52 AM(UTC)
Corpius

Rank: Member

Groups: Member
Joined: 2/1/2012(UTC)
Posts: 332
Location: The Netherlands

Thanks: 4 times
Was thanked: 18 time(s) in 18 post(s)
To be honest I do not see why you want you use this approach for controlling the DAC instead of using the HifiDUINO. In my opinion hifiDUINO is easier than your approach because the code is fully written and you just have to change some of it just like Amaro posted.

Just connect the dac like this, IR receiver like this and LCD display like this. The rotary encoder is optional and can be left out if you don't want it.

If you are using Arduino Uno with HifiDUINO you will probably not have enough IO's to switch your DAC/cross-over/pre-Amp ON or OFF or to stand-by. Leaving the rotary encoder out will probably solve this. Another approach to free up IO's at the Arduino is using something like this to connect the LCD display. With this all digital IO's normally used for the display are now free to use for other functions.

It is all up to you, I do not want to push you into something when your are not feeling confident about it.
If you need some help with the code, just let me know.. wether you are going for HifiDUINO or not.
DQ828  
#16 Posted : Friday, August 17, 2012 11:26:43 AM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
Originally Posted by: Corpius Go to Quoted Post
To be honest I do not see why you want you use this approach for controlling the DAC instead of using the HifiDUINO. In my opinion hifiDUINO is easier than your approach because the code is fully written and you just have to change some of it just like Amaro posted.

Just connect the dac like this, IR receiver like this and LCD display like this. The rotary encoder is optional and can be left out if you don't want it.

If you are using Arduino Uno with HifiDUINO you will probably not have enough IO's to switch your DAC/cross-over/pre-Amp ON or OFF or to stand-by. Leaving the rotary encoder out will probably solve this. Another approach to free up IO's at the Arduino is using something like this to connect the LCD display. With this all digital IO's normally used for the display are now free to use for other functions.

It is all up to you, I do not want to push you into something when your are not feeling confident about it.
If you need some help with the code, just let me know.. wether you are going for HifiDUINO or not.


I can totally understand why you think I should follow the hifiDUINO approach and in fact you are probably right. I will more than likely revert to that approach in the end. There are a couple of reasons I am not taking that approach at the moment.

I have looked at the code & it scares me to death, I know nothing about programming (am learning though) and am getting help from a friend who has limited time. I'm concerned that I may get terribly lost if I try & change that code, so for the moment I am keeping it as simple as I can.

By following my approach I am learning little bits (excuse the pun) at a time and building my way up to it. I also don't really have any interest (at this stage) in changing any of the settings I have in the firmware at the moment & don't really want the screen to display all the extra information.

Where I will fall short is I would like to be able to display the sample rate, which I expect I wont be able to do unless I remove the firmware chip & take the hifiDUINO approach.

I appreciate your assistance very much.

Many thanks
DQ

One thing I haven't been able to work out is why use the Rotary Encoder, couldn't the remote be programmed to do the same thing?

Edited by user Friday, August 17, 2012 11:29:59 AM(UTC)  | Reason: Not specified

Corpius  
#17 Posted : Saturday, August 18, 2012 11:19:15 AM(UTC)
Corpius

Rank: Member

Groups: Member
Joined: 2/1/2012(UTC)
Posts: 332
Location: The Netherlands

Thanks: 4 times
Was thanked: 18 time(s) in 18 post(s)
When you know almost nothing about programming it is indeed easy to get lost in the code. By playing with the code you'll learn quickly so I can understand why you choose to do it this way.

Quote:
I also don't really have any interest (at this stage) in changing any of the settings I have in the firmware at the moment & don't really want the screen to display all the extra information.
I changed the code so that all extra information is hidden. There where to many settings to be seen on the display in my opinion. when sitting in my chair I couldn't even read them. That's why I only display the selected source (1 to 5) and its name, volume and sample rate. By pressing the menu button all setting are showed again so they can be changed. Gwikse from Norway also used my version of the code. He posted a picture of it on his build thread.

Quote:
One thing I haven't been able to work out is why use the Rotary Encoder, couldn't the remote be programmed to do the same thing?
That is exactly what I did. It can be used to switch sources (left or right keys), set the volume (up & down keys), show and set all setting etc etc. I do also have the rotary encoder connected and changed the code so it has the same functions like the remote.
DQ828  
#18 Posted : Sunday, August 19, 2012 12:34:58 PM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
thanks for the help, I follow with interest.
DQ828  
#19 Posted : Thursday, August 23, 2012 11:47:41 AM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
I have managed to get the motorised pot working, watching the volume knob turn when I press the remote control is very satisfying :)

I do have a question about the source selection before I connect it to the TP DAC.

At the moment the purple & yellow wires (see photo) are going high (3.3V) & low depending on which source is selected. I just want to double check the following;

1) I connect the Purple & Yellow wires to B0 & B1?
2) Should I connect the TP Grnd & 3.3v terminals to the Low side of the Logic level converter or leave the Arduino Grnd & 3.3v connected to the Low side of the Logic Level Converter as it is in the picture.



UserPostedImage
DQ828 attached the following image(s):
12-08-21 Arduino Source Select01_2.JPG (105kb) downloaded 32 time(s).

You cannot view/download attachments. Try to login or register.
Corpius  
#20 Posted : Thursday, August 23, 2012 2:54:22 PM(UTC)
Corpius

Rank: Member

Groups: Member
Joined: 2/1/2012(UTC)
Posts: 332
Location: The Netherlands

Thanks: 4 times
Was thanked: 18 time(s) in 18 post(s)
Originally Posted by: DQ828 Go to Quoted Post
1) I connect the Purple & Yellow wires to B0 & B1?
connect them to Buffalo Pins 6 and 8 (Ext_IO)

Originally Posted by: DQ828 Go to Quoted Post
2) Should I connect the TP Grnd & 3.3v terminals to the Low side of the Logic level converter or leave the Arduino Grnd & 3.3v connected to the Low side of the Logic Level Converter as it is in the picture.
Leave it as in the picture.
I don't know for sure, but you might also need to connect the Buffalo gnd pin (Ext_IO) to Arduino gnd.


Rss Feed  Atom Feed
Users browsing this topic
GuestUser
Similar Topics
Buffalo III and arduino control (Buffalo DAC)
by ipa4me 8/26/2012 8:45:36 PM(UTC)
5 Pages123>»
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.