We have a solenoid which is rated to be controlled by PWM signal "Maximum 325 mA at 7.5 Vdc". The problem we have our controller sends in 12 V output voltage. There is a thought that we could still drive it using the the 12V PWM output. Is there any risk especially with power rating. At 325mA at 7.5 Vdc, the power rating could be 2.4 W. At 12 V if we restrict the max current to be 201 mA (0.201*12 = 2.4 W, can we still work with the same voltage. Is there any risk to the solenoid in doing so?
Driving a solenoid with PWM from a higher voltage to get a lower equivalent voltage is a valid thing to do.
The main thing to watch out for is to use a high enough PWM frequency so that the current ripple in the solenoid is small.
In some cases, there can be audible whine. Avoid that by using around 25 kHz or more. That's usually a good enough frequency so that the current changes little during the on and off phases of each pulse, but the period is still "long" for switching purposes.
ADDITION: As long as you do not exceed the power rating you can theoretically use any voltage up to the level that breaks through the insulation in the relay.. which is a couple of orders of magnitude higher than the rated voltage. However, when going over-voltage, even by a few volts, it is prudent to take extra precautions to ensure that a failure in the PWM can not leave the load at full voltage. This is especially true when driven from a micro that could "bug-out" or be "halted".