SparkyDave
Member
Hello Everyone!
I am new to PICAXE and this is my first proper post. I have been been doing a lot of reading and have written one program so far. (only tested by simulation so far as I havent completed the hardware)
My overall goal is to build a digital dash for my old landcruiser. To do this (replacing all existing gauges) I need to have: Oil Pressure, Fuel Level, Engine Temperature, Charge Current and obviously vehicle speed and distance. I am planning on buying a small probe for the speedo cable which sends out pulses which I can then count with the count command to calculate vehicle speed and distance. I have the oil pressure and fuel level program done. Temperature will be just like the fuel and oil pressure but I am stumped on how to read the charge current simply because it has the possibility of being both positive and negative (I think the standard meter in dash goes between -50A and +50A from memory). I am planning on using a current shunt which is calibrated to 1mV/A. This way I can use the readadc command to read a voltage from it. The problem is that depending on the battery load / charge current, this voltage could be either positive or negative.
Can someone please give me an idea of how I can monitor this value and keep track of whether it is positive or negative? I have an idea of trying to convert negative values back to positive and then using a separate input as a polarity indicator.....
Thanks in advance.
I am new to PICAXE and this is my first proper post. I have been been doing a lot of reading and have written one program so far. (only tested by simulation so far as I havent completed the hardware)
My overall goal is to build a digital dash for my old landcruiser. To do this (replacing all existing gauges) I need to have: Oil Pressure, Fuel Level, Engine Temperature, Charge Current and obviously vehicle speed and distance. I am planning on buying a small probe for the speedo cable which sends out pulses which I can then count with the count command to calculate vehicle speed and distance. I have the oil pressure and fuel level program done. Temperature will be just like the fuel and oil pressure but I am stumped on how to read the charge current simply because it has the possibility of being both positive and negative (I think the standard meter in dash goes between -50A and +50A from memory). I am planning on using a current shunt which is calibrated to 1mV/A. This way I can use the readadc command to read a voltage from it. The problem is that depending on the battery load / charge current, this voltage could be either positive or negative.
Can someone please give me an idea of how I can monitor this value and keep track of whether it is positive or negative? I have an idea of trying to convert negative values back to positive and then using a separate input as a polarity indicator.....
Thanks in advance.
Last edited: