Contribute
Register

MacTester57's iMac G5 17" (A1058 Model)

Status
Not open for further replies.
Apple Chime Test

Will be interested to see how you soldered a wire...

The GND wire, which I've mentioned in my previous post:
20150214-2144154.jpg


Working test setup with speaker connected to the internal WTV020 amp outputs:
20150214-2144152.jpg


Here is a PAM8403 amp connected and feeds the original Apple speakers:
20150215-2154155.jpg



The .ad4 files were encoded and stored to the SD card on my old Shuttle hack (Windows Vista). In order to do that, I took it out of the museum. The only thing I had to do was to add some water to the cooling system:
20150214-2144151.jpg


if I could have a copy that would be awesome.

It's attached. The grid was confirmed, using a 1:1 print.

Looks like you've adopted the 1N4148 circuit for triggering the chime. I guess, your relay triggering circuit will not work, because BUSY is low during the chime playback. Another issue is, that it is a 3.3v signal. I will do some tests. Ignore that, I was wrong. BUSY is hi (3.3V) during chime playback. So the single NPN transistor solution works fine for driving the TAKAMISAWA relay.

This is the complete test setup. Playing music from the iPod and then triggering the WTV020 works fine. The relay switches the amp input from the iPod to the WTV020 module and back, as soon as the Chime melody is finished:
20150215-2154159.jpg


MacTester
 

Attachments

  • 00_custom.lbr.zip
    3 KB · Views: 129
Last edited:
My Friend, this is Amazing work. It looks like you have confirmed (and tested) everything in this circuit.

- The coupling from Chime circuit to Amplifier is first through cap then resistor divider (2 x 1K).
- An NPN transistor can sink the negative side of the relay, small base resistor.

And it sounds absolutely great. Can you post your AD4 sound file ?

:thumbup:
Kiwi

PS On another note, in your last schematic you increased the values of output capacitors of the Fan drivers (C2 C3 C4), from 4.7uf to 10f. Was there a reason for this ?

EDIT: PPS What else is there to do? Where can I help?

EDIT 2: I just tried your library, and it only appears to have the package outlines, but not the circuit schematic diagram, or Device list which ties the first 2 together.

Is this easy for you to fix ?

EDIT 3: I also looked at your relay package outline, and had a double take, it was different to what I have already used. Assuming the "A5W-K" relay, Page 6 of the following PDF shows the relay switches on Pins 2-3-4 and 9-8-7, with pins 5-6 unused.

http://www.fujitsu.com/downloads/MICRO/fcai/relays/a.pdf

Your outline doesn't match this, the unused pins are 2-9 with the switching elements moved further along.

I used a standard part already in the Eagle software I downloaded. Search for "TQ2-5V", this part appears to match the outline in the PDF linked above.

Am I correct ?
 
Last edited:
My Friend, this is Amazing work.

Thanks, Kiwi. All that would not exist without your first Arduino SMC prototype.

It looks like you have confirmed (and tested) everything in this circuit.

Yes:
- DC decoupling cap 100nF
- Voltage divider 10k / 1k. I've replaced it with a 10k spindle trim pot (S64W in the library) in the meantime
- The BC 337 transistor is able to drive the relay without a problem. It's only drawing about 30mA. Also a 1N4148 diode is big enough for this relay.

And it sounds absolutely great. Can you post your AD4 sound file ?

Attached.

PS On another note, in your last schematic you increased the values of output capacitors of the Fan drivers (C2 C3 C4), from 4.7uf to 10f. Was there a reason for this ?

The fan runs a bit smoother and the waveform looks better on the oscilloscope with 10uF. The capacity depends on the used PWM frequency (10uF for 123Hz, about 100nF or no cap for 31.5kHz. Note, that the power transistor will overheat, if you have a too big cap for the desired PWM frequency!

PPS What else is there to do? Where can I help?

My biggest concern @ the moment is, if we really should use interrupts for the fan rotation detection, as long as the serial commands from the slider app are affected?? Maybe the slider app should repeat the commands until the Arduino sends a confirmation signal? Your thoughts?

I just tried your library, and it only appears to have the package outlines, but not the circuit schematic diagram, or Device list which ties the first 2 together.

Is this easy for you to fix ?

Fixed in my previous post.

I also looked at your relay package outline, and had a double take, it was different to what I have already used. Assuming the "A5W-K" relay, Page 6 of the following PDF shows the relay switches on Pins 2-3-4 and 9-8-7, with pins 5-6 unused.

I'm using a different relay. NA5W-K (search for NA* in the relay lib). Reason: smaller footprint, but it's thicker. This doesn't matter because it's fitting nicely below the amplifier board.

Finally, here is a short video which demonstrates the amplifier input switching with the relay:

MacTester
 

Attachments

  • 0000.ad4.zip
    21.9 KB · Views: 110
Last edited:
My biggest concern @ the moment is, if we really should use interrupts for the fan rotation detection, as long as the serial commands from the slider app are affected?? Maybe the slider app should repeat the commands until the Arduino sends a confirmation signal? Your thoughts?
I already did some basic testing and didn't see an issue, but didn't test fully.

However I am in progress of updating my Arduino Sketch (firmware) to fit the new fan speed control mechanism (LM317 control based on RPM Input). My current strip board has wired two of my fans to two interrupts, so once updated I can test it more fully (assuming of course third interrupt doesn't cause major issue).
 
Hi Kiwi

I've tested again with one fan tach signal connected to all 3 interrupt pins (same result with only one interrupt pin connected). The inverter activating / deactivating commands are definitely erratic (tested with screen sleep, triggered via “active corners"), because those commands are only sent 1 times. If an interrupt happens @ the same time as the slider applet sends a serial command it doesn't arrive on the Arduino.

Adjusting the brightness with the slider is not affected. I assume it's because the signal is sent multiple times during slider movement.

Maybe I will go back to my former fan rotation detection circuit. Do you think this issue can be fixed with software optimization? Maybe the slider applet should repeat all commands until the Arduino reports back that it arrived??

MacTester
 
Hi Kiwi

I've tested again with one fan tach signal connected to all 3 interrupt pins (same result with only one interrupt pin connected). The inverter activating / deactivating commands are definitely erratic (tested with screen sleep, triggered via “active corners"), because those commands are only sent 1 times. If an interrupt happens @ the same time as the slider applet sends a serial command it doesn't arrive on the Arduino.
...
Maybe I will go back to my former fan rotation detection circuit. Do you think this issue can be fixed with software optimization? Maybe the slider applet should repeat all commands until the Arduino reports back that it arrived??

MacTester
yes it should be fairly easy to introduce a confirmation message sent back to the brightness menu let, and to resend, in fact a good enhancement anyway.

I did some testing using sleep from active corner, over 40-50 samples I had the issue once. This is with two fans connected, to two interrupts.

Your test of one fan to three interrupts is artificial. I know interrupts can be queued ( not sure if queue length) basically three interrupts could be being executed one after the other. A better test would be two interrupts one on rising, one falling edges.

Currently I am running with capacitive library disabled, remember it is normal practice for code to disable interrupts during critical exclusive sections of code, or where precise timing is required.

I am still working at on enhancing my code to support this on my current an future smc board.
 
Hi MacTester and Kiwi, not to interrupt an important dialogue between you two, but I wanted to make you aware that iMessage is back up. All my builds working flawlessly.

Instructions here were successful for me.

Ok, now carry on with this amazing SMC you are developing...


Cheers!
 
Your test of one fan to three interrupts is artificial

You're right. But it doesn't matter, if all 3 or just one fan is connected. I've also tested with disabled capacitive library - it's still erratic.

Hi MacTester and Kiwi, not to interrupt an important dialogue between you two, but I wanted to make you aware that iMessage is back up. All my builds working flawlessly.

Good to know, ersterhernd, thanks!

Ok, now carry on with this amazing SMC you are developing...

Yes, my board design is now more or less ready to order the PCB. Actualized pics are in post #57: http://www.tonymacx86.com/imac-mods/130197-mactester57s-imac-g5-17-a1058-model-6.html#post983758

MacTester
 
You're right. But it doesn't matter, if all 3 or just one fan is connected. I've also tested with disabled capacitive library - it's still erratic.

MacTester
the issue I describedis with connecting one fan to multiple interrupts, just confirming you are not doing this.

I have posted a code fragment (my thread) from my working two rpm fan controller. Have you compared with yours ? Can you post your code I can take a look.

Have you chosen a board supplier?

Kiwi
 
Hi kiwi

I have posted a code fragment (my thread) from my working two rpm fan controller. Have you compared with yours ? Can you post your code I can take a look.

Not yet. Did not have any time for the SW part this week. My current code is attached. Note, that the fan rotation detection is not yet changed to the new system in this code. The touch sensors work fine, as long as the fans are driven @ 123Hz.

Have you chosen a board supplier?
Not yet. OSH park looks good, but is a bit expensive. This is how it would look like:
SMC_OSH_Park1.png


ITEADStudio could be an alternative: http://imall.iteadstudio.com/open-pcb/pcb-prototyping.html

Edit:
It's ordered...
OSH Park Order.png
 

Attachments

  • iMac_G5_SMC_0.9.6_Tach_new_Pinout.zip
    12.3 KB · Views: 118
Last edited:
Status
Not open for further replies.
Back
Top