Contribute
Register

iMac G4 15" [Nickjf20]

Status
Not open for further replies.
Joined
Oct 24, 2011
Messages
77
Motherboard
PowerMac i7
CPU
i7-920
Graphics
7950
Mac
  1. MacBook Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. Android
Well, here goes another project: a mint condition iMac G4 15" 1Ghz, graciously donated by a family member ready to have an old Core Duo laptop sans screen transplanted inside

IMG_20150709_175033509.jpg


Now, I realise the 15" is rather small, it is a present for my sister to replace a POS VAIO laptop and I've also been given a less presentable 17" I'll be putting a NUC in at some point in the future once it's cleaned up nicely.

This Japanese site seems to be the only successful 15" documented conversion
http://hidekyan.cocolog-nifty.com/blog/2009/08/imac-g4-dvi-4-9.html
http://hidekyan.cocolog-nifty.com/blog/2009/07/imac-g4-windo-5.html
I'm hoping the dimming function is the same as its' larger siblings - MacTester's PICAXE work is fantastic!

The laptop in question does have a 'breathing' standby LED in a different colour (presumably colour is via switched polarity), I'll see if I can use this directly with the iMac LED.
The most important thing is for the screen backlight to turn off during sleep - reading through MacTester's HemiMac and Esterhand's build, it seems this has not been solved as of yet?

Speakers: use the original amplifier http://www.tonymacx86.com/imac-mods...arance-including-pro-speakers.html#post773156


I'm hoping to take the output to the original active LED indicator and run that as the 'on' trigger for the backlight.
The laptop is still in Birmingham, so this particular project will be going slowly for now.

----

If the laptop turns out to be far too slow, I'll just throw in one of the Celeron NUCs; the i3/5 NUCs are rather expensive over here and for little more than facebook and word seems overkill.
The Celeron iGPU isn't compatible with OSX ... don't want the faff anyway(!)
 
Joined
Jun 22, 2015
Messages
17
Motherboard
iMac G4 USB 2.0
CPU
i5 750
Graphics
GT 610
Mac
  1. iMac
  2. MacBook Pro
Classic Mac
  1. iBook
  2. iMac
  3. Power Mac
Mobile Phone
  1. iOS
Good luck, yes fitting anything other than the tiniest of motherboards inside these things is a real problem. I have sleep (though it may be 'hibernate') allowing my backlight to switch off entirely on a similar (20" iMac) mod. I snuggled for a bit trying to realise this- until I found the problem I was diagnosing was software rather than hardware related.

Love the idea of a board to enable dimming, though happy enough using an app to simulate this. I'll need to take another look soon.

Keep us all posted!
 
Joined
Oct 24, 2011
Messages
77
Motherboard
PowerMac i7
CPU
i7-920
Graphics
7950
Mac
  1. MacBook Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. Android
Update:

The DVI Molex connector arrived - I've stripped the iMac only to find a completely different wiring colour scheme to before. The black LCD cable data channels are the same as the 17" 1/1.25GHz models, as are the Clock-EDID, Data-EDID and VEDID from the grey LCD cable.
The others, I am not so sure about. There appears to be a white, and off white (slightly purple I suppose) connected to the shielding, and then a green, blue, yellow and a reddy pink connected to the motherboard connector as can be seen below:

-- EDIT: A whole afternoon later and the green and blue are 3.3V, the yellow and pink are Gnd. Resistors arriving tomorrow to setup VEDID for first DVI test, wish me luck! --

IMG_20150715_163129358.jpg


As for using the PSU, I have ordered a Gigabyte BRIX J1900 (NUC clone) that runs from 12V, so I can reuse the original PSU.
The PSU outputs 12V only, but there are also mysterious blue and white wires - the blue is not marked on the PSU PCB, and the white is marked as l.p.m. (presumably low power mode).

IMG_20150715_163045535.jpg


When the iMac is powered on, the white cable is at 0v, during sleep and when the iMac is off, it is at 12v. What this actually does, I do not know as all the 12V wires stay hot. Perhaps it switches over to a secondary standby 12V supply from the PSU that pulls very few watts at idle?

The blue cable appears to stay at 3.6V regardless of state but only when the motherboard is plugged in. I'm guessing this is the 3.3V line generated by the G4 motherboard.
 
Joined
Oct 24, 2011
Messages
77
Motherboard
PowerMac i7
CPU
i7-920
Graphics
7950
Mac
  1. MacBook Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. Android
It lives! ... Well, it says "Grub." on the screen ...

IMG_20150716_175524263.jpg


Apologies for the photo quality but I left my camera at a family member's house ...

4 hours to work out that the 3.3V line to the screen required me to hold it tightly against the ATX connector to work ... I'll have to come up with a better solution for testing. Presumably interference or the like

Grounded the faraday cage as well as the two greyish shield wires described above and the backlight stays on for more than a matter of seconds now

----

On another note, a load of stuff arrived including the arduino and the Gigabyte BRIX PC

I've ordered a TA2024 board from eBay as well, I couldn't find the 2.2uF coupling capacitors on the original G4 motherboard to connect to sadly
 
Joined
Oct 24, 2011
Messages
77
Motherboard
PowerMac i7
CPU
i7-920
Graphics
7950
Mac
  1. MacBook Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. Android
SMC is now soldered up, just a few more headers to add. This is identical to MacTester's SMC, albeit with 1 fan header and no tach feedback. So of course, thanks to MacTester & Kiwi

IMG_20150724_190415944.jpg


Now the backlight won't start, it just occasionally flashes ... I'm hoping a switch to proper dupont connectors will solve it. Presumably proper contact isn't being made

-----

The BRIX is also setup, running Windows 10 with bootcamp for the Apple keyboard. The BRIX has no headers, so I'm going to have to solder directly to the board. The LED is on during S0, then flashes during S3/5. An average voltage reading from an analogue input using the 'smoothing' example from arduino should be able to distinguish between power states.

I don't know of a better way to implement reading 3 different states from one pin: HIGH (S0), Flashing (S3/5), LOW (Off)

-----

On another note, another project is progressing well: Paul Carmody's Tarkus if anyone is interested. Much less temperamental than this backlight...

IMG_20150723_210323951.jpg
 
Joined
May 27, 2012
Messages
767
Motherboard
DQ77KB
CPU
i7-3770S
Graphics
HD4000
Mac
  1. MacBook Air
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. iOS
SMC is now soldered up, just a few more headers to add. This is identical to MacTester's SMC, albeit with 1 fan header and no tach feedback. So of course, thanks to MacTester & Kiwi

IMG_20150724_190415944.jpg


Now the backlight won't start, it just occasionally flashes ... I'm hoping a switch to proper dupont connectors will solve it. Presumably proper contact isn't being made

-----

The BRIX is also setup, running Windows 10 with bootcamp for the Apple keyboard. The BRIX has no headers, so I'm going to have to solder directly to the board. The LED is on during S0, then flashes during S3/5. An average voltage reading from an analogue input using the 'smoothing' example from arduino should be able to distinguish between power states.

I don't know of a better way to implement reading 3 different states from one pin: HIGH (S0), Flashing (S3/5), LOW (Off)
Hi There Nickjf20, good luck with your project, looks like you are making progress.

RE power state detection; If it is supported (BIOS setting on Intel NUC) standby S3 mode can be indicated by a tri-colour LED (reverse polarity) which is easy to detect with a second Arduino PIN. If not then it would be easy to implement in software. e.g.

When the LED transitions from Lo->High or High->Lo, you would capture the current time into a variable and reset this variable every time there is a transition. If the time since the last transition has exceeded a threshold (1 second or so) you would consider a S0/S5 state based on the Value of the LED PIN, otherwise (before threshold exceeded) you would be in S3 state.

Are you intending to install OSX on this motherboard? I haven't seen any confirmation that this motherboard works. http://www.tonymacx86.com/buying-advice/130914-intel-bay-trail-d-motherboards.html

Regards
Kiwi
 
Joined
Oct 24, 2011
Messages
77
Motherboard
PowerMac i7
CPU
i7-920
Graphics
7950
Mac
  1. MacBook Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. Android
Hi There Nickjf20, good luck with your project, looks like you are making progress.

RE power state detection; If it is supported (BIOS setting on Intel NUC) standby S3 mode can be indicated by a tri-colour LED (reverse polarity) which is easy to detect with a second Arduino PIN. If not then it would be easy to implement in software. e.g.

When the LED transitions from Lo->High or High->Lo, you would capture the current time into a variable and reset this variable every time there is a transition. If the time since the last transition has exceeded a threshold (1 second or so) you would consider a S0/S5 state based on the Value of the LED PIN, otherwise (before threshold exceeded) you would be in S3 state.

Hi Kiwi, thanks for the reply!
Sadly the BRIX is very basic - no headers, and only a single blue LED. I'm stuck with the current behaviour.

This is the first time I've used an Arduino, so I'm still trying to get my head around the excellent sketches yourself and Mactester have written. I'll have a stab at integrating that into the truncated version (OSX integration removed for simplicity) of your code I'm currently running.

Are you intending to install OSX on this motherboard? I haven't seen any confirmation that this motherboard works. http://www.tonymacx86.com/buying-advice/130914-intel-bay-trail-d-motherboards.html

Regards
Kiwi

I would have bought a NUC and used OSX were I the recipient of the machine, but my sister would require a lot of support to keep a hackintosh going; all for light web browsing and MS Office use. For the sake of simplicity (and cost!) I've gone with the BRIX and Windows 10 (free from University)

----

The backlight is now working as it should, and with dimming.

Blue - 12V
Green - Dimmer PWM from Arduino (0-3.2V)
Red - 5V (Should this be via a limiting resistor?)
Black - 0V

The orange and purple wires are left floating.
Connecting Orange to +3.3v and/or Purple to 0v results in a dark screen - no idea why this is the case.
 
Joined
Oct 24, 2011
Messages
77
Motherboard
PowerMac i7
CPU
i7-920
Graphics
7950
Mac
  1. MacBook Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. Android
Looks like I'll have to scrap the internal DVD drive if I wish to reuse the original PSU
unhappy-079.gif

There just isn't the space for the BRIX

Or I could buy a new 12V supply like this: 12V 6A Amazon

------

On another note, I've written the code to detect the LED status. It works OK for the moment.

Code:
long lastLedChange = 0; //to store time of last LED change
int oldLED = 2; //setup with an impossible LED state
byte power // 0 = Off (S5), 1 = On (S0), 2 = Sleep (S3)


void powerstate() {
  unsigned long currentMillis = millis();
  currentLED = digitalRead(BRIX_LED_PIN);
  if (currentLED != oldLED) {
    lastLedChange = currentMillis;
    Serial.println("state change!");
    
    }
  if (currentMillis - lastLedChange > 1200) {
      power = currentLED;
      oldLED = currentLED;
    }
  if (currentMillis - lastLedChange < 1200) {
      power = 2;
      oldLED = currentLED;
  }
}
 
Joined
May 27, 2012
Messages
767
Motherboard
DQ77KB
CPU
i7-3770S
Graphics
HD4000
Mac
  1. MacBook Air
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. iOS
...

On another note, I've written the code to detect the LED status. It works OK for the moment.
Hi There, just thought I would give you a code tips. See Below.

You can move the three variables into the function, and by declaring them static makes them like a global variable, i.e. retain there values between calls to the function, the only difference is you can only use the variable in the function itself.

Of course this means the function needs to return the value of the power variable.

The advantage is it makes code easier to manage since everything is contained in the function(), and less error prone since you don't have to deal with conflicts in global variables, and because the function returns the power state you can't forget to call the function() before accessing the global variable.

Hope This helps
Kiwi.

Code:
byte powerstate() {
  static long lastLedChange = 0; //to store time of last LED change
  static int oldLED = 2; //setup with an impossible LED state
  static byte power // 0 = Off (S5), 1 = On (S0), 2 = Sleep (S3)
  unsigned long currentMillis = millis();
  currentLED = digitalRead(BRIX_LED_PIN);
  if (currentLED != oldLED) {
    lastLedChange = currentMillis;
    Serial.println("state change!");  
  }
  if (currentMillis - lastLedChange > 1200) {
      power = currentLED;
      oldLED = currentLED;
  }
  if (currentMillis - lastLedChange < 1200) {
      power = 2;
      oldLED = currentLED;
  }
  return power;
}
 
Status
Not open for further replies.
Top