I have a neat little Picaxe 8M unit driving a MOSFET-based LED constant current driver running a bank of 3 watt LEDS via the single PWM output to allow full PWM based dimming. The 8m simply translates the 1-10v output from my controller system (a GHL Profilux system, although it could be a Picaxe-based solution!) into a PWM output stream (where duty cycle is proportionate to the input voltage). No problems there, works really well and is drop dead simple. However, I actually run four separate LED banks (currently using 4 separate 8M's). Since the enclosed system can get quite warm from the power supply (a spare notebook switched PSU unit) I am adding a 12volt fan, but it would be cool (sorry for the pun!) to make the fan variable depending on the temperature - either using a thermistor/resistor voltage divider and the AD input or a DS 1-wire device to drive another PWM output to the fan - another 8M! It would also be useful to check the ambient light (LDR/resistor divider) to amend the PWM output on the LED drives to adjust for ambient light levels.
Checking through the specs it doesn't seem possible to drive more than 1 PWM output from any PICAXE. The HPWM output doesn't seem to do the trick. The pwm command might allow a pwm output on a pin but would need to cycle round fairly quickly across the pins - don't think that is going to work.
As an interesting aside, I actually had to UNDERCLOCK the chip down to 125kHz (there's a novelty, usually we are trying to speed things up) to get the PWM frequency on the 8M down below 200Hz which is the max PWM input frequency for the MOSFET driver.
Any suggestions, ideas, or do I just take the simple route of running multiple 8Ms, one for each LED bank and another for the fan?
I'll post the schematics and code (all 3 lines!) if anyone is interested. This is for driving LED lighting systems on aquariums but could be used in other applications.
Steve
Checking through the specs it doesn't seem possible to drive more than 1 PWM output from any PICAXE. The HPWM output doesn't seem to do the trick. The pwm command might allow a pwm output on a pin but would need to cycle round fairly quickly across the pins - don't think that is going to work.
As an interesting aside, I actually had to UNDERCLOCK the chip down to 125kHz (there's a novelty, usually we are trying to speed things up) to get the PWM frequency on the 8M down below 200Hz which is the max PWM input frequency for the MOSFET driver.
Any suggestions, ideas, or do I just take the simple route of running multiple 8Ms, one for each LED bank and another for the fan?
I'll post the schematics and code (all 3 lines!) if anyone is interested. This is for driving LED lighting systems on aquariums but could be used in other applications.
Steve