Sending voltage to another micro controler

I've been at it for a while and just can't figure out what the problem is.

I've got a Koolance INC. ver 001 board running a pic16c72a-04/sp micro controller. I'm able to provide power to it and get it to read out and interact with me. What's happened is the old power board used to control 4 three pin fans has died and I'm now building a new one using the arduino UNO to control three 4 pin fans.

The issue I'm running in to is getting the arduino to send a variable voltage to the pic16c72a and have it work correctly. If I use the 50k ohm thermistor directly with the pic16c72a it works fine and reads the temps with a 4 degree variance. I can also get the thermistor to work with the arduino UNO board however I have to switch the ground/5v in order to get it to read correctly.

The whole reason I havent just taken the pic16c72a out of the picture is because it's controlling a 3 digit 7 segment display and with the arduino alone I don't have enough output pins to control, 2 buttons, 2 rgb LEDs and 4 PWM fans, while reading the temps of a themistor.

Basically I'm trying to get the arduino to read the themistor and output a voltage to the pic16c72a-04/sp so it will display the right temperature. however when I use the output on the arduino to the input of the pic16c72a the temperature fluctuates 20-50 degrees and I can only assume it's because the pic16c72a board is expecting a voltage in hz and is getting voltage in PWM.

Here's a link to the picture and short video of the project. arduino project - Album on Imgur
The schematic is as follows

[Ground] -- [50k-pad-resistor] -- | -- [ 50k-thermistor] --[Vcc (5v)]

  • |
  • Analog Pin 0

Digital pin 3 -> input pin [pic16c72a]

The code I'm using

#include <math.h>

#define ThermistorPIN 0                 // Analog Pin 0

int outputPin = 3;
int inputRead;
int mathone;
float mathtwo;

float vcc = 4.91;                       // only used for display purposes, if used
                                        // set to the measured Vcc.
float pad = 9850;                       // balance/pad resistor value, set this to
                                        // the measured resistance of your pad resistor
float thermr = 10000;                   // thermistor nominal resistance

float Thermistor(int RawADC) {
  long Resistance;  
  float Temp;  // Dual-Purpose variable to save space.

  Resistance=pad*((1024.0 / RawADC) - 1);
  Temp = log(Resistance); // Saving the Log(resistance) so not to calculate  it 4 times later
  Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
  Temp = Temp - 273.15;  // Convert Kelvin to Celsius                      

  // Uncomment this line for the function to return Fahrenheit instead.
  //temp = (Temp * 9.0)/ 5.0 + 32.0;                  // Convert to Fahrenheit
  return Temp;                                      // Return the Temperature

void setup() {
  pinMode(outputPin, OUTPUT);

void loop() {
  float temp;
  temp=Thermistor(analogRead(ThermistorPIN)); // read ADC and convert it to Celsius
  //Serial.print("Celsius: ");
  //Serial.print(temp,1);                     // display Celsius
  temp = (temp * 9.0)/ 5.0 + 32.0;            // converts to  Fahrenheit
  Serial.print("Fahrenheit: ");
  Serial.print(temp,1);                       // display  Fahrenheit
  inputRead = analogRead(ThermistorPIN);      // Reading the 0-1023 voltage from temp sensor
  mathone = map(inputRead, 0, 1023, 0, 255);  // Scales 0-1023 to 0-255 to use for output 
  mathone = mathone+50;                       // Removing 50 to simulate correct voltage
  mathtwo = map(mathone, 0, 255, 0, 500);     // Setting up the range for 5 volts
  mathtwo = mathtwo/100;                      // extra math bcause you cant map floats
  Serial.print("Output Voltage ");            // Troubleshooting 
  analogWrite(outputPin, mathone);            // applying output voltage to pic16c72a
  delay(1000);                                // Delay


any recommendations on the type of low pass filter i can get, or build? the internet doesn't give much on the kind of frequency I need to build in order to emulate a typical 5-3 volt dc connection.


I'll look in to that, thank you for your help.