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

Notification

Icon
Error

Login


5 Pages<1234>»
Options
View
Go to last post Go to first unread
DQ828  
#21 Posted : Thursday, August 23, 2012 10:18:32 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)
Originally Posted by: Corpius Go to Quoted Post
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.




Thanks, I'm just trying to ensure I don't destroy something.

DQ828  
#22 Posted : Friday, August 24, 2012 9:19:03 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)
DISASTER

Well I thinks it's disaster, I connected the the yellow & purple wires, which where connected to pins 7&8 of the Mega & set as outputs, to pins 6 & 8 on the BIII I/O header, I also connected the low side level convertor ground to pin 4 on the BIII header, as per the photo below.

As soon as I turned the Arduino on the LED's came on, on the BIII, I turned it off & reconnected the selector switch but the signal no longer locks (stays on MUTE) and of course no music comes out.

I have no idea what to do know? have I cooked it & how?

Any help would be greatly appreciated.

HiFiduino

Edited by user Friday, August 24, 2012 9:41:46 AM(UTC)  | Reason: Not specified

joe102  
#23 Posted : Friday, August 24, 2012 10:54:47 AM(UTC)
joe102

Rank: Member

Groups: Member
Joined: 2/15/2009(UTC)
Posts: 2
Location: Austria

Originally Posted by: DQ828 Go to Quoted Post
DISASTER

Well I thinks it's disaster, I connected the the yellow & purple wires, which where connected to pins 7&8 of the Mega & set as outputs, to pins 6 & 8 on the BIII I/O header, I also connected the low side level convertor ground to pin 4 on the BIII header, as per the photo below.

As soon as I turned the Arduino on the LED's came on, on the BIII, I turned it off & reconnected the selector switch but the signal no longer locks (stays on MUTE) and of course no music comes out.

I have no idea what to do know? have I cooked it & how?

Any help would be greatly appreciated.

HiFiduino



Please read this:

http://arduino.cc/en/Main/ArduinoBoardMega2560

SDA und SDL are on different pins, on the mega2560:

TWI: 20 (SDA) and 21 (SCL)
DQ828  
#24 Posted : Friday, August 24, 2012 11:42:17 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)
All is not lost.

I did some testing after the disaster Whistle I tested across BIII Pin 6 to Grnd & 8 to Grnd with the BIII selection switch connected as before and I got:

Pins 6 & 8 on the BIII
Input 1: H & H (3.3v)
Input 2: L & H (3.3v)
Input 3: H & H (3.3v) ??? what the!
Input 4: L & H (3.3v) ??? what the!

This is not what I expected,

I had expected;

Input 1: H & H
Input 2: L & H
Input 3: H & L
Input 4: L & L

Given that I had been using Input 4 for my coaxial input this may explain why it was not working.

So I connected the Squeezebox via my Toslink cable which is on Input one & sure enough it worked & as you might expect by the reading I got it also worked when the selector was turned to Input 3!!!

The lock on the toslink is not perfect but I think it improves with time.

I seem to remember I had issues like this when I first put the BIII together.

Does anyone know what the hell might be going on?

I also suspect my understanding of how the input switch works is incorrect.

Any chance the makers could explain it to this carpenter?

Edited by user Friday, August 24, 2012 11:43:43 AM(UTC)  | Reason: Not specified

DQ828  
#25 Posted : Friday, August 24, 2012 11:56:46 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: joe102 Go to Quoted Post
Originally Posted by: DQ828 Go to Quoted Post
DISASTER

Well I thinks it's disaster, I connected the the yellow & purple wires, which where connected to pins 7&8 of the Mega & set as outputs, to pins 6 & 8 on the BIII I/O header, I also connected the low side level convertor ground to pin 4 on the BIII header, as per the photo below.

As soon as I turned the Arduino on the LED's came on, on the BIII, I turned it off & reconnected the selector switch but the signal no longer locks (stays on MUTE) and of course no music comes out.

I have no idea what to do know? have I cooked it & how?

Any help would be greatly appreciated.

HiFiduino



Please read this:

http://arduino.cc/en/Main/ArduinoBoardMega2560

SDA und SDL are on different pins, on the mega2560:

TWI: 20 (SDA) and 21 (SCL)


I was only using the photo as a reference to the fact that HiFiduino connected the Level changer Low side grnd to the BII, I am connecting to the selector switch input, not what is shown in the photo.

If your not confused now you never will be Angel

Edited by user Friday, August 24, 2012 12:16:13 PM(UTC)  | Reason: Not specified

Corpius  
#26 Posted : Friday, August 24, 2012 2:41:13 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
So I connected the Squeezebox via my Toslink cable which is on Input one & sure enough it worked & as you might expect by the reading I got it also worked when the selector was turned to Input 3!!!
Do you mean that when you use the input selection kit from TPA you can select the first input by setting the switch to position one and also to position three? This seems a bit odd to me.

DQ828  
#27 Posted : Friday, August 24, 2012 9:58:19 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)
Originally Posted by: Corpius Go to Quoted Post
Originally Posted by: DQ828 Go to Quoted Post
So I connected the Squeezebox via my Toslink cable which is on Input one & sure enough it worked & as you might expect by the reading I got it also worked when the selector was turned to Input 3!!!
Do you mean that when you use the input selection kit from TPA you can select the first input by setting the switch to position one and also to position three? This seems a bit odd to me.



That's exactly what I mean!

Also input positions 2 & 4 on the selector are both selecting input 2, which means I no longer have access to 3 & 4.

Input 4 was the one I was using for my squeezebox via a coaxial cable but now I cannot select it, it was very solid with no dropouts.

This whole dropout thing is very disappointing I assumed when I bought the BIII I would not have issues with things like this, but it has been an issue from the beginning, seems a bit flaky to me.

Input 1 which the toslink is on has always suffered from dropouts.

What I would really like to find out is, why did BIII light up when I connected the Arduino outputs to Pins 6 & 8, I think the Arduino outputs where high when I connected it, was it caused by both 6 & 8 Pins seeing 3.3v or was it caused by the Low side level converter Grnd being connected to Pin 4?

I'm going to remove the selector & do some testing.
Russ White  
#28 Posted : Friday, August 24, 2012 11:49:40 PM(UTC)
Russ White

Rank: Administration

Groups: Administration, Customer
Joined: 10/24/2006(UTC)
Posts: 3,979
Location: Nashville, TN

Thanks: 25 times
Was thanked: 89 time(s) in 83 post(s)
Certain setups have issues with drop-outs but they are not really directly related to the BIII except in that it uses the ES9018 which has a DPLL bandwidth setting which may need to be adjusted based on you particular source. This is DIY, and everyone's setup is a bit different. :)

Edited by user Friday, August 24, 2012 11:50:37 PM(UTC)  | Reason: Not specified

Amaro  
#29 Posted : Saturday, August 25, 2012 8:02:43 AM(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)
Originally Posted by: DQ828 Go to Quoted Post
All is not lost.

I did some testing after the disaster Whistle I tested across BIII Pin 6 to Grnd & 8 to Grnd with the BIII selection switch connected as before and I got:

Pins 6 & 8 on the BIII
Input 1: H & H (3.3v)
Input 2: L & H (3.3v)
Input 3: H & H (3.3v) ??? what the!
Input 4: L & H (3.3v) ??? what the!

This is not what I expected,

I had expected;

Input 1: H & H
Input 2: L & H
Input 3: H & L
Input 4: L & L



You have a false contact. So a terminal (6 or 8) is always high.

However, it is much easier to complete implementation HIFIDUINO with modifications you mentioned.

Regards

Corpius  
#30 Posted : Sunday, August 26, 2012 10:12:44 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 shall point you into to right direction regarding the volume control.

From the pictures I have seen, you are using a stereo motorpot. If you connected it just like Leon's integration guide, you connected only one channel of the stereo pot to the BIII. Now you can use the other (free) channel to read the volume.

What you must do is let Arduino read the resistance of the pot. You can do this by connecting connecting the free channel of the pot like this:
Potemntiometer hookup
You can use any of the free analog pins.

To read the resistance you need the following code (in blue):

#define potPin 2 // define the analog pin, pin 2 in this case

int val = 0; // variable to store the value coming from the potentiometer

void loop() {
val = analogRead(potPin); // read the value from the sensor
}

The value coming from the potentiometer will be somewhere between 0 and 1023, depending on the level of resitance. The value is proportional to the amount of voltage being applied to the used analoge pin.
When you turn the volume all the way up there will be no resistance and the value will be 1023 (=5 volt to the pin) while turning the volume all the way down there will be 10K resistance (depending on the pot you used) and the value would be 0 (= 0 volt to the pin).

Now you know that reading the resistance gives you a value between 0 and 1023 you can work out a way to show the correct volume. If you used a linear pot this is easy, especially if it doesn't matter if the scale is not a Db scale.

What I would suggest is is using a scale from 0 to 99 to display the volume, this way you would have 100 steps in volume (just like HiFiDUINO).
The easiest way is to devide 1023 by 100. (1023/100=10.23). Now you know that for every step up or down in volume the analogRead value goes roughly 10 points up or down. So lets say you turn the volume up about halfway and the analogRead function return a value of 480. The displayed volume would be 480/10=48.

#define potPin 2 // define the analog pin, pin 2 in this case

int val = 0; // variable to store the value coming from the potentiometer

int volumeToDisplay; // variable to store the volume to be displayed

void loop() {
val = analogRead(potPin); // read the value from the sensor
volumeToDisplay = (val / 10); // calculate the volume
}

Diving it by 10 is not fully accurate, but probably accurate enough. If not you can always change the code using floating point numbers, like this:

#define potPin 2 // define the analog pin, pin 2 in this case

float val = 0; // variable to store the value coming from the potentiometer

int volumeToDisplay; // variable to store the volume to be displayed

void loop() {
val = analogRead(potPin); // read the value from the sensor
volumeToDisplay = (val / 10.23) + 0.5; // calculate the volume
}

Using floating point numbers allow you to calculate it more accuratly, but the calculated volume now needs to be rounded in order to display a two number value. That's why the 0.5 needs to be added to the calculated value.

Knowing how to read and calculate the volume you just need to display it. This code can be found in the HifiDUINO code, but if you don't know where to find it, I can send the code to you if you like.

Edited by user Sunday, August 26, 2012 3:44:55 PM(UTC)  | Reason: Not specified

thanks 1 user thanked Corpius for this useful post.
DQ828 on 8/27/2012(UTC)
DQ828  
#31 Posted : Monday, August 27, 2012 7:15: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)
Great idea, I'd forgotten about the other channel Angel

Thank you thank you

I will try & integrate the code into my code & see how I go, this is the bit I find really challenging.

I did get the screen displaying some stuff late last night which put a smile on my face.

I'll see if I can get it to work if I cannot I'll call for help.

I have to make some hardware changes to get the screen into the system which may take a few days, work keeps getting in the way.

One thing I would like to know is; The screen uses a whole bunch of pins but the only ones that appear to be declared in the code are UTFT myGLCD(ITDB32WD,38,39,40,41)

Are the other pins declared in one of the .H files somewhere?

David

PS: With this entry " extern unsigned int TP_Logo_200[0x400]" I assume the "TP_Logo_200" is the name of the bitmap file?

What is the "[0x400]" all about?

Where do you put the bitmap file so the program can find it?

Does the file have to be a certain bit depth? The one I am trying to display is 8 bit depth.

So many questions Angel

Edited by user Monday, August 27, 2012 9:52:22 AM(UTC)  | Reason: Not specified

Corpius  
#32 Posted : Monday, August 27, 2012 11:52:07 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 David,

I have never worked with such a display. If you give me some more information about this display (where you bought it, which Arduino library it uses etc) I can try to answer some of you questions.

Keep in mind that when you are going for the HifiDuino approach your display is not compatible with the code. You need to re-write all code for the display. The display that is compatible is a “20×4 LCD HD44780″.

EDIT: I think that I'll such a display in the future because I like the colors Drool

Edited by user Monday, August 27, 2012 11:56:56 AM(UTC)  | Reason: Not specified

Corpius  
#33 Posted : Monday, August 27, 2012 6:22:58 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)
I did some research and found a lot of information on your display. Now I'm sure that I will buy one in the future, but not so sure if I want to use it for my BIII.

I don't know which library you are using but I also found a nice library: http://henningkarlsen.co...ronics/library.php?id=51
The webpage shows you exactly how the library should or could be used. He also offers a library for the touch function.
The guy that wrote it is also active on the arduino forum. He seems to know quite a lot regarding the use of tft displays.
His nickname on the arduino forum is doc_norway.

I'm not sure about all the pins you did not declare in the code, but I think they are used for the touch and sd card function. If so you have to include the corresponding libraries to to use them. At least for the touch functions.

The 0x400 looks like it has something to do with the size of the image, not sure about this. Could also be the address of the SD card. Who knows?

I must say that I find you really brave to use such a display without have much knowledge of programming. Think well, nothing is impossible. Angel

EDIT: one for thing. You can check the volume functions even without the display conected, by using the serial monitor function in the arduino software. With this you can let Arduino send data to your computer screen. This allows you to check of the code is returning the right values for the volume.

Edited by user Monday, August 27, 2012 7:13:02 PM(UTC)  | Reason: Not specified

DQ828  
#34 Posted : Tuesday, August 28, 2012 12:27:21 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)
Corpius

Sorry I got confused about who was who, I should have asked bigpandahk as he has added the same screen to his BIII, poor old bigpandahk is living the nightmare at the moment " When a project goes bad"

Thanks for your help.
DQ828  
#35 Posted : Wednesday, August 29, 2012 2:22:45 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)
Iv'e managed to get part way there, I can display text, & images supplied by the library writer, but when I try & display my own converted images I run into issues. I did make headway last night & got one of my images to display although not 100/% as it should have, hopefully will have time to work on it tonight.
DQ828  
#36 Posted : Wednesday, August 29, 2012 1:18:49 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)
After MANY frustrating hours I have concluded;

It appears the UTFT doesn't like images exported from CorelDraw no matter what file type you export them as. They will convert & they will compile but they wont load.

I printed the image I wanted, took a photo of it, reduced it's size, converted, compiled, loaded & displayed it, bit of a pain really.

If anyone can tell me why I would greatly appreciate it as I do want to use some images I have created in CorelDraw.
Corpius  
#37 Posted : Wednesday, August 29, 2012 2:36:34 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)
Hi david,

I have also read some articles about convertung pictures for the UTFT library. It does certainly not take any picture, but you can use the ImageConverter 565 from Henning Karlsen to convert them for the UTFT library.
DQ828  
#38 Posted : Thursday, August 30, 2012 3:15:26 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
Hi david,

I have also read some articles about convertung pictures for the UTFT library. It does certainly not take any picture, but you can use the ImageConverter 565 from Henning Karlsen to convert them for the UTFT library.


I have been using the Henning Karlsen Converter, the files convert ok & compile ok when placed in the code, but they wont load to the Mega. I'm not sure what CorelDraw is doing to the file when I save it, I have tried saving them in the 3 suggested formats. I will just have to make do with my other approach for the moment.

It's time to move on & try and integrate the rest of the screen display functions, vol etc.

If you work out a way I can get to the sample rate (without removing the firmware) let me know Angel It's the only thing I would like to see on the screen that I probably wont be able to implement using my approach.
Corpius  
#39 Posted : Thursday, August 30, 2012 1:52:30 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
Originally Posted by: Corpius Go to Quoted Post
If you work out a way I can get to the sample rate (without removing the firmware) let me know Angel It's the only thing I would like to see on the screen that I probably wont be able to implement using my approach.
You are right, it's not possible.

DQ828  
#40 Posted : Friday, August 31, 2012 11:54:58 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)
After many more hours of frustration I have finally got on top of the image display problem, I can highly recommend using the SD card feature. the size of the images is very limited without the SD card.

Still got a long way to go with the coding to get everything as it should be.

[img=UserPostedImage]screen[/img]
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 Pages<1234>»
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.