Picaxe 08m2

Thread Starter

toyotaguy

Joined Jul 6, 2013
3
I want to duplicate the power/sleep LED functionality of an old Apple PowerMac G4 I have. The G4 has a two-color (green/yellow) LED that illuminates a steady green when the computer is on and a pulsing yellow when the computer is asleep. The Apple motherboard sends 3.3V to the LED, switching anode pins depending on the computer state. I now have a mATX motherboard with a 1.5V power LED (PLED) header in the PowerMac case. Below is a circuit I think will work with a PICAXE and the computer. The circuit switch simply illustrates the PLED voltage being on or off as sent by the motherboard. Though it is a rather simple circuit, I have a few questions.

1. In a simulation program, the 08M2 didn’t detect 1.5V on a digital input. I had to configure the pin as an analog input for it to detect the signal. Is that because the 5V (from a USB header) supplying the chip requires more than 2V to be considered HIGH (TTL) and the external 1.5V trigger isn’t high enough?

2. I added a pull-down resistor to the “switch.”

3. The output of the original Apple motherboard was 3.3V but the output of the 08M2 is 5V. Is adding the voltage dividers to get about 3.3V a good idea? Is there a better way to do it, maybe internally in the 08M2?

4. What am I missing that might make this a better circuit?

I have this working on an Arduino but I’m not familiar with the PICAXE. Any help is appreciated.

(I was unable to post a new thread without shortening the title to something rather uninformative. Would be great if a moderator could change it to "Picaxe 08m2 Circuit With 1.5V Trigger.")
 

Attachments

Last edited:

tracecom

Joined Apr 16, 2010
3,944

elec_mech

Joined Nov 12, 2008
1,500
1. In a simulation program, the 08M2 didn’t detect 1.5V on a digital input. I had to configure the pin as an analog input for it to detect the signal. Is that because the 5V (from a USB header) supplying the chip requires more than 2V to be considered HIGH (TTL) and the external 1.5V trigger isn’t high enough?
Yes.

There is some good information about low and high level input signals to the PICAXE here.

2. I added a pull-down resistor to the “switch.”
Always a good practice. If you determine the output of the "switch" is truly a low output - not floating - when off, such as the output of a 555, you can leave off the pull-down resistor. If you're unsure, keeping the resistor won't hurt anything.

3. The output of the original Apple motherboard was 3.3V but the output of the 08M2 is 5V. Is adding the voltage dividers to get about 3.3V a good idea? Is there a better way to do it, maybe internally in the 08M2?
You don't need a voltage divider, just limit the current accordingly.

(5V-V_LED)/I_LED = Resistor_LED

So if the LED has a forward voltage of 2.2V and a current rating of 20mA:

(5-2.2)/0.02 = 140Ω

Since 140Ω is not a common value, you can use a common 150Ω instead.

In the above example, you'd replace your 330Ω resistor with 150Ω and leave off the 1kΩ resistor.

4. What am I missing that might make this a better circuit?
Use a single current-limiting resistor between the PICAXE and each LED.

You can power the PICAXE with 3.0 or 3.3VDC instead of 5VDC. But this opens a whole other can of worms I won't go into right now. I suggest sticking with 5VDC.

You could use a transistor or opto-isolator to raise the 1.5V signal to 2V, but then you're adding parts when the ADC will work just fine.
 

Thread Starter

toyotaguy

Joined Jul 6, 2013
3
... replace your 330Ω resistor with 150Ω and leave off the 1kΩ resistor.
I read over most of the manual though I can't claim to understand everything I read! Thanks for the suggestions. I will replace the dividers with current-limiting resistors. I don't know how to determine the exact specs of the original LED in the case, but I would guess 150Ω would be a good starting place.
 
Top