For my first foray into microcontroller design/programming, I've apparantly chosen a project that is well beyond my limited EE experience. I am attempting to use an Arduino Duemilanova to regulate the voltage to a nichrome heating coil. The voltage must be maintained at a user-applied setpoint between 3.5V and 6V. I intend to measure the output voltage on an analog input pin (with a voltage divider to bring it into range) so that a constant voltage can be maintained regardless of battery charge. The power source is 7.4V (2 Li-Ion cells in series). Different heating elements will be used, which can have anywhere between 1.5 and 5 ohms of resistance.
I had two ideas for achieving this, both of which failed my initial attempts. At first, I tried to use the PWM output of the Arduino to switch a MOSFET, but it would appear I bought the wrong type. Using the 5V source from the Arduino and a 100k resistor as a dummy load to test the setup, the output of the FET is a steady 4.8V no matter what I set the PWM output to. If this method is feasible, what would be the appropriate part?
The other method I tried was to use a digital pot to set the voltage of a variable regulator. I didn't even get to the point of hooking up the regulator, because I was unable to send any commands to the digipot using the SPI example code. I hooked it up as recommended, but the wiper stayed firmly planted in the middle position. Can anyone either provide some code that will work with the part I linked, or suggest a part that will definitely work with existing code? The final device needs to be as small as possible, so I'd prefer not to have to use a big 6-pot DIP when I only need a single pot. I've gone cross-eyed staring at the data sheet, and I just don't have the capacity to figure out the protocol for sending commands.
Any help with getting either of these methods working, or even suggestions for a different method would be greatly appreciated.
Thank you.