Need help in project involving microcontroller
mrexp21
09-12-2013, 06:36 AM
Hi,
I'm currently working on a project which requires the usage of microcontroller and I need help.
The project's objective is to read current(ampere) from vehicle electrical system and activates relay under certain current(ampere) range. For example, if the system reads current(ampere) below 1A, it will activates the relay. If the system read the current(ampere) above 1A, it will deactivates the relay.
My idea is; The flow of the system will start from current(ampere) reading gauge. The current(ampere) reading from the gauge will received by microcontroller. The microcontroller acts to determine the current(ampere) range to activate and deactivates the relay. This system contains 3 device to operate, reading gauge, microcontroller, relay.
My question is; 1) Is the idea above possible ? 2) If the idea is possible, how microcontroller will read the current(ampere) value from the gauge (input for microcontroller) ? 3) Is there any product which contains all the function of these 3 devices and programmable ?
I'm currently working on a project which requires the usage of microcontroller and I need help.
The project's objective is to read current(ampere) from vehicle electrical system and activates relay under certain current(ampere) range. For example, if the system reads current(ampere) below 1A, it will activates the relay. If the system read the current(ampere) above 1A, it will deactivates the relay.
My idea is; The flow of the system will start from current(ampere) reading gauge. The current(ampere) reading from the gauge will received by microcontroller. The microcontroller acts to determine the current(ampere) range to activate and deactivates the relay. This system contains 3 device to operate, reading gauge, microcontroller, relay.
My question is; 1) Is the idea above possible ? 2) If the idea is possible, how microcontroller will read the current(ampere) value from the gauge (input for microcontroller) ? 3) Is there any product which contains all the function of these 3 devices and programmable ?
shorod
09-12-2013, 01:25 PM
To read the current using a microcontroller, you'll need a microcontroller with at least one analog input. If you can find one that will accept at least a 15V input that would be best to avoid catastrophic issues in the event you mis-wire something or have a part failure. You would then typically use a low value resistor (something like 0.1 ohm) and size it accordingly for the amount of power dissipated by the resistor under a worst-case current flow. This way, the voltage drop across the resistor can be read in by the microcontroller and, using Ohm's Law, calculate the current flowing through the resistor.
If you're looking to monitor total system current of an automotive charging system, the series resistor may not be practical. Instead, you'd want to use an inductive pickup to passively detect current draw. You can either purchase a DC inductive current probe that will provide a scaled DC output to the analog input of the microcontroller, or you can figure out how to make your own inductive pickup.
In recent years General Motors did field a smart charging system that essentially shut off the alternator load when the demand didn't require it. I'm not sure if the alternators in those systems had several wires coming from then with many of the signals you'd need, or if it was all internal. I want to say it was like a 2007 Saturn Vue where I first read about the smart charging system, but I'm not positive on that.
-Rod
If you're looking to monitor total system current of an automotive charging system, the series resistor may not be practical. Instead, you'd want to use an inductive pickup to passively detect current draw. You can either purchase a DC inductive current probe that will provide a scaled DC output to the analog input of the microcontroller, or you can figure out how to make your own inductive pickup.
In recent years General Motors did field a smart charging system that essentially shut off the alternator load when the demand didn't require it. I'm not sure if the alternators in those systems had several wires coming from then with many of the signals you'd need, or if it was all internal. I want to say it was like a 2007 Saturn Vue where I first read about the smart charging system, but I'm not positive on that.
-Rod
Bill Grissom
09-22-2013, 10:49 PM
1 A is not too hard to read, but what will the max current be that needs to be passed? That may restrict the design. For low currents, like 1 A, you can use a series resistor and measure the voltage drop. You could even use the natural resistance in a car's wiring, but that might need in-place calibration, since probably varies between cars and even the same car over time (corrosion). GM & Ford did that in the 60's & 70's for their in-dash "ammeter" (really a voltmeter).
You must size the resistor for the power dissipated (i^2)*R. The voltage signal will be dV = i*R. Kelvin connections are best. For high currents, a Hall-effect sensor is better, since it causes no voltage drop and heating, but they aren't cheap.
You must size the resistor for the power dissipated (i^2)*R. The voltage signal will be dV = i*R. Kelvin connections are best. For high currents, a Hall-effect sensor is better, since it causes no voltage drop and heating, but they aren't cheap.
Automotive Network, Inc., Copyright ©2025