| Electronics > Beginners |
| Circuit to determine whether vehicle is running based on battery voltage level |
| << < (3/4) > >> |
| Nusa:
You could probably tune the input resistor to an optocoupler such that it only triggers above your specified voltage. You get your signal and signal isolation in the same step. Previous comments about alternator activity being a valid indicator of engine status apply, of course. |
| spec:
+ HwAoRrDk interesting requirement and a good solution. Presumably you need to turn the MCU off only to save power. You asked if there were any suggestions for improvements. These are my thoughts: Suggest that you take a look at comparator chips with built-in hysteresis (like the MCP6541 that you mentioned) and a built in voltage reference. That way you will improve accuracy, reduce component count, and potentially minimize power consumption. One of the LT6703 family looks ideal for your application. All you would need would be the chip, two resistors and one integrating/filter capacitor. Below is a list of comparators with built-in voltage references for you to consider. To get around the problem of the alternator being turned off while the engine is running, would it be acceptable to have the MCU stay on, by software control, for a fairly long time after the comparator detects a no-charge battery voltage? |
| HwAoRrDk:
--- Quote from: Gyro on October 18, 2018, 06:39:34 pm --- --- Quote from: maginnovision on October 18, 2018, 05:22:41 pm ---You need to consider vehicles shutting the alternator off for economy reasons. A lot of Hondas since the 90's do this. Some BMW's do it at times, and I would bet others do it too. --- End quote --- Agreed, many cars manufactured in the past 10 years shut down the alternator when the engine is at idle, [Edit: at least while the battery has a 'safe' level of charge]. --- End quote --- Ah, I hadn't thought of that possibility. Thanks for pointing that out. --- Quote from: spec on October 19, 2018, 12:31:11 am ---To get around the problem of the alternator being turned off while the engine is running, would it be acceptable to have the MCU stay on, by software control, for a fairly long time after the comparator detects a no-charge battery voltage? --- End quote --- Yes, I suppose I could do that. It should be acceptable to have my device 'on' for a while even though the engine's not running, it just won't have anything particular to do. I've no idea what would be a good 'time-out' period before sleeping, though. How long is a vehicle going to spend running with the alternator shut off? 5, 10, 30 minutes, an hour? :-// --- Quote from: spec on October 19, 2018, 12:31:11 am ---Suggest that you take a look at comparator chips with built-in hysteresis (like the MCP6541 that you mentioned) and a built in voltage reference. That way you will improve accuracy, reduce component count, and potentially minimize power consumption. One of the LT6703 family looks ideal for your application. All you would need would be the chip, two resistors and one integrating/filter capacitor. --- End quote --- Neat, that looks like a very nice chip. But... oof, how much? :o Very expensive, although I don't know why I'm surprised, it's Linear. ;D --- Quote from: Nusa on October 18, 2018, 08:48:19 pm ---You could probably tune the input resistor to an optocoupler such that it only triggers above your specified voltage. You get your signal and signal isolation in the same step. --- End quote --- So you mean configure a voltage divider on Vbat so that the threshold level (13V) produces a voltage equal to the forward voltage of the optocoupler's LED? Interesting idea, although won't the Vf be fairly variable from one part to the next? A quick look at the first optocoupler datasheet I had to hand (FOD817) specifies typical of 1.2V up to a max of 1.4V. I suspect such a solution would need to be individually adjusted by a trimmer pot on the divider on a unit-by-unit basis, which isn't appealing. |
| HwAoRrDk:
A thought I just had about an alternative approach: could there perhaps be some way of using the CAN bus? I don't mean data-wise, but electrically. I recall when looking at CAN transceivers for a previous project a while back, that there were ones with some sort of 'wake up' functionality - for example, the NXP TJA1042. Datasheet says that when set in standby mode, if the transceiver detects CAN bus traffic, it pulls the RXD pin low to signal a wake-up condition. Perhaps, I could connect the transceiver STB pin to an I/O on the MCU, together with an external pull-up resistor. When asleep (and by default at power-on) that micro pin would be set as an input, and thus floating, so the pull-up will bring STB high, putting the transceiver in standby mode. A pin-change interrupt could be set on the micro's RXCAN pin to wake it up upon RXD going low. At wake-up, the STB line would be changed to an output with low state, bringing the transceiver out of standby, and the RXCAN interrupt disabled. Does that sound workable, or am I mis-interpreting the CAN transceiver datasheets? This would of course not be a solution for recognising when to sleep, but I could probably just look at CAN bus data to determine when to do that (e.g. engine RPM has been zero for a certain period). |
| spec:
--- Quote from: HwAoRrDk on October 19, 2018, 03:42:47 pm --- --- Quote from: spec on October 19, 2018, 12:31:11 am ---Suggest that you take a look at comparator chips with built-in hysteresis (like the MCP6541 that you mentioned) and a built in voltage reference. That way you will improve accuracy, reduce component count, and potentially minimize power consumption. One of the LT6703 family looks ideal for your application. All you would need would be the chip, two resistors and one integrating/filter capacitor. --- End quote --- Neat, that looks like a very nice chip. But... oof, how much? :o Very expensive, although I don't know why I'm surprised, it's Linear. ;D --- End quote --- LT6703 chips are around £1.80 in one of quantities from Digikey and Mouser- is that expensive to you? |
| Navigation |
| Message Index |
| Next page |
| Previous page |