Honda Insight Forum banner

1 - 10 of 10 Posts

·
Registered
Joined
·
6,201 Posts
Discussion Starter #1 (Edited)
Introduction
12V system voltage has been an issue for me trying to run different 12V battery types. With my 12V NiMH setup, normal DCDC output voltage is a tad on the low side, and wanting to try a lithium-titanate based battery (LTO), output voltage is on the high side. So some weeks ago I dug into settling this DCDC output business once and for all - and I think I'm there. I posed some questions in other threads over those weeks - I've linked to those at the bottom of this post.

Here I think it's worthwhile to briefly document what I came up with, a few different options, the output range, etc. This should be useful for people who want to try different battery types, but also, a lot of folks report 12V battery issues at IC, so being able to adjust DCDC output voltage a little higher might be useful to them as well. Doing so is pretty easy and cheap, especially if you're not having to spend the time figuring out how to do it...

In a nut shell, normal DCDC output voltage is 13.8V when the car's warmed up, with switching into 'low power mode' at various times, such as minimal accessory usage, down to about 12.2V. The "WHT/GRN" "DVC" wire controls automatic toggling into low power mode; Mudder has advocated snipping that wire if you don't like that behavior. With my NiMH cells I've kept that in-tact because some cycling is better for my cells.

The RED/YEL "DVCT" wire adjusts DCDC voltage supposedly based on engine coolant temp (ECT). Not sure to what extent that's true, as I didn't see an obvious one-to-one relationship between ECT and the PWM signal (pulse-width modulation) at DVCT - but I wasn't watching very closely. In general, it doesn't make a whole lot of sense to adjust output voltage based on engine coolant temp, as the correlation between ECT and battery temperature is... not very tight. In the end, at least in a temperate climate, DCDC output voltage is a tad higher at cold start, but once the engine is warmed up, output voltage is as low as it can go via DVCT. And that's the end of DVCT's usefulness. There's a standard voltage adjustment scheme for lead acid batteries vs. temperature; it seems like DVCT is some kind of proxy for implementing that scheme.

'Methods' and 'Results'
My mods here involve DVCT. As Mudder first pointed out, DVCT is a 10Hz 0-5V PWM signal, with a duty cycle ranging between 10% and 90%. When duty is low, DCDC output voltage is high, and when duty is high, output voltage is low. Here are voltages I measured at 12V battery vs. PWM duties:

100, 13.85V
90, 13.85V
80, 13.91
70, 14.02
60, 14.12
50, 14.21
40, 14.30
30, 14.38
20, 14.45
10, 14.51
0, 15.13


A duty of zero is equivalent to grounding the DVCT wire coming out of the DCDC. Mudder described this as something like faulting out of range, and the DCDC output voltage goes to its max output.

Unfortunately, I discovered that the lowest output voltage is still on the high side for my LTO 12V battery. I'll try one anyway, but I may have to figure out something else. As far as DVCT is concerned vis-a-vis my LTO 12V, the only thing I can do and should do is detach the wire at either the DCDC connector or the ECM. This will limit DCDC output voltage to a max of 13.85V (DVCT is pulled high to 5V in the DCDC converter).

So, as you can probably see, the basic thing we're trying to do is bypass the PWM signal going from the ECM to the DCDC, instead sending our own programmable/adjustable PWM signal. If you wanted to keep the OEM putated engine coolant temp-based adjustments, you could do that, too, say on top of whatever overall voltage level adjustment you want. But I didn't explore that. You'd have to use an Arduino or similar and create a program that uses the ECM signal as input, alters it based on your programming, then sends your altered values to the DCDC. This is more or less the original idea Mudder posed like a year or two ago [edit: more like 3 years ago, how time flies]...

I tried two different devices for the simple bypass: I bought an inexpensive PWM signal generator ($6.50 at Amazon) and I bought some Arduino Pro Minis (clones, 5 for $17). I also needed wire and header pins and stuff. I hooked-up the signal generator in the IMA compartment and in the cabin by the ECM, both locations worked fine. I really like the signal generator because it has buttons on it that allowed me to adjust the duty cycle right there. Made it easy to change duty and record DCDC voltage output. I tried the Pro Mini only in the cabin by the ECM and thus far I've only checked that a 40% duty cycle corresponds to the same voltage that 40% with PWM device produced. This was my first foray into Arduino and, I gotta say, it took a lot of work to figure out how to make it do something that in the end is asinine simple.

PWM Signal Generator in IMA Compartment
At first I powered the PWM signal generator with a buck converter running off of car 12V power, 'bucked' to 5V (the output voltage of this PWM device is the same as input voltage), but that turned out to be unnecessary. In the IMA compartment I simply tapped into the same power and ground that the BCM Interceptor uses (thanks to Jime for that suggestion). Rather than at the MCM, though, I tapped into those wires at the 'Junction Board 16 - Lt BLU' connector, across from the DCDC, GRN/WHT Pin 3 VCC7 +5V, and RED/YEL Pin 11 SG4 (signal ground 4). It's easy to pull out the metal terminal for DVCT RED/YEL at DCDC connector, disconnecting DVCT from the ECM. You then connect the + PWM output to the DVCT pin that leads to the DCDC and tape-up the ECM side. The - PWM output goes to WHT/BLU SG10 on that same connector.

Here's an image of that setup. The PWM device has two PWM outputs, but we only need one here. The buttons on the bottom allow you to set the frequency and duty cycle.
83112


PWM Signal Generator in cabin, by ECM
The same setup - but in the cabin, by the ECM - relies on ECM Connector C (BLUE) C28 YEL/BLU VCC2 for +5V and C18 GRN/BLK (SG2) for both the power ground and the signal ground. I'm not sure about the wisdom of having both the device power and signal using the same ground, but it works. DVCT RED/YEL is on Connector A (GREY), A7. As with the DCDC connector, here it's very easy to pull the DVCT terminal out of the ECM connector and unwind some of the wire from the rest of the loom, so you have a decent amount of slack in the DVCT wire plus a small female terminal that actually fits pretty well on the standard header pins you'd solder to a PCB... In my car, I had already tapped into C28 and C18 when I installed one of Peter's 'boost boxes' - so I have a pigtail with a Molex connector accessing those pins, and here I tapped into that connector.

Here's an image of that setup, PWM device in cabin by ECM. Sorry it's not the greatest quality. You can see that 90% duty shows up as 13.9V on my OBDIIC&C '12v' parameter.
83113


Arduino Pro Mini clone in cabin, by ECM
Using an Arduino Pro Mini, or similar Arduino devices, turned out to be very simple in the end. Some of the hardest parts for me included just figuring out how to program, the conventions, figuring out how to change the default PWM frequency, plus the Pro Mini doesn't come with a built-in USB connection to upload programs, you have to add that. But, I only had to solder header pins to connect a USB break-out module plus one pin for the PWM output. I chose the Pro Mini mainly because I like its small size and the idea that you only install the pins you need... Plus they're so inexpensive.

I installed Pro Mini in the cabin by the ECM, using the same power connections and DVCT wire as the PWM setup. Here are a couple images. DVCT RED/YEL is connected on pin 10, behind the board.
83114



This image shows the setup when you're uploading a program to Pro Mini. The red thing is a "TinySine Micro USB FTDI Basic Breakout Module for Arduino," connected to a micro USB cable, which is connected to my PC.
83115


Here's the 'code' I used to program Pro Mini to do the PWM thing:
Code:
#include <TimerOne.h>
    // Makes TimerOne library functionality available to Arduino IDE

void setup() {
  Timer1.initialize(100000);
    // Initializes Timer1 to overflow in 100000 microsecond periods, 1/period=frequency
    // 'DVCT' is 10Hz, 10Hz is 1/10 second period, which = 0.1 X 1,000,000 in microseconds
  Timer1.pwm(10, 410);
    // Enables PWM on pin 10 with 40% duty cycle (0.4 X 1024)
    // This function expects 10 bit value for duty cycle, i.e. 0 for 0% to 1024 for 100%
    // 'DVCT' adj range 10% to 90% (14.50V to 13.85V output), 0% faults to 15.10V

}

void loop() {
}
The biggest hurdle here was figuring out that Pro Mini and other Arduinos don't have native commands to set PWM frequency. If you use analogWrite - the normal way to do PWM - you're stuck with a default frequency. So, either you can use commands (functions) that manipulate the onboard timers to get the right frequency or you can use a 'library' that has already packaged that stuff. I'm using the "TimerOne" library here. But once you get over all that, it's obviously super simple to change the frequency and duty.

One drawback with using Pro Mini/other Arduino, in this simple form, is that you'd have to reprogram different duties to get different DCDC output voltages, so if you don't know the exact voltage you want you'd have to program with a given duty cycle, install, try and measure output voltage, then remove and re-program with a different duty if the output voltage isn't what you want. I'm thinking I might try to add a trim pot to make the duty adjustable at the device, installed. The Arduino would factor-in the pot position when calculating the correct duty cycle...

Conclusion
Rock on...

* * *

Here are some links to the devices and stuff I purchased:
PWM device: https://www.amazon.com/gp/product/B07QNYMNGK/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1
USB programming thing: https://www.amazon.com/gp/product/B00N4MCS1A/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1
Micro USB cable: https://www.amazon.com/gp/product/B01JPDTZXK/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1
Pro Minis: https://www.amazon.com/gp/product/B015MGHLNA/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1
Misc. header pins and cable: https://www.amazon.com/gp/product/B01G0I0ZZK/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1
Weller WE1010NA soldering station - figured it was time to move up from my probably 30 year-old $19 special: https://www.amazon.com/gp/product/B077JDGY1J/ref=ppx_yo_dt_b_asin_title_o00_s01?ie=UTF8&psc=1
60/40 fine solder: https://www.amazon.com/gp/product/B071WQ9X5K/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

Here are some links to threads/posts where I asked questions during this project, can provide some background/genesis if needed:

I attached a pdf version of this post which might make it easier to print and read, fits on 5 pages.
 

Attachments

·
Administrator
Joined
·
10,802 Posts

·
Registered
Joined
·
280 Posts
Have a look at something like the DFRobot Beetle, its a very small and cheap Arduino clone with very limited number of IO, but 4 PWM outputs. I have a couple of thumbduino boards which are a similar type of affair. the 4 PWM outputs are a common thing on small boards now for running RGBW LED lighting.
 

·
Registered
Joined
·
6,201 Posts
Discussion Starter #4 (Edited)
^Hmm, that looks like it'd do the trick, but I'm seeing like $10-20 for one, whereas the ProMinis I bought were 5 for only $17. Other than that, I'm thinking the Nanos might be good, since they have built-in USB and one wouldn't have to deal with adding that, I'm seeing prices similar to the ProMinis, maybe a bit less...

But really, if one wanted to 'just get the mod done', the PWM device seems like it'd be the quickest and easiest - and only about $7. Using Arduino is more about tinkering/learning, or maybe if one already has some laying around, maybe if one wants to try other things along with the DCDC mod (like maybe controlling the low power mode on the 'WHT/GRN' wire, etc.)...
 

·
Registered
Joined
·
280 Posts
At that price I'm guessing they are not genuine Arduino boards but non name Chinese clones. Some of these are ok (I have some Elegoo ones that seem fine), in my experience they are a lot less tolerant to abuse and power voltage swing. I use them for proto work, but I'd put something of higher quality in my car for long term use (personally, YMMV and they could do you fine).
 

·
Registered
Joined
·
6,201 Posts
Discussion Starter #6
I'm looking for a little programming/device guidance.

I'd like to add a POT to my ProMini-based DCDC output voltage mod, that I can use to adjust PWM duty (which adjusts DCDC output V). I've compiled something that works, but in some sense it doesn't seem quite optimal...

The POT would be used to adjust PWM duty like a few times when the device is first installed. But after that you probably wouldn't change it at all - set it and forget it. Yet, the code I've got checks the POT all the time and changes PWM duty all the time based on POT position.

I noticed POT values change slightly from time to time, even though the knob hasn't been moved. Makes me think that, if you want to 'set and forget', having the program check the POT all the time and/or having it constantly resetting PWM might make the setting susceptible to noise, or whatever.

Does that makes sense, does it really matter?

I'm thinking some other code that relies on some kind of conditional statement might be better, or something that only intermittently checks the POT value and/or changes PWM, such as comparing to a stored value and if the value hasn't changed 'do nothing'... I guess the main thing is that it seems like PWM duty shouldn't be potentially changing all the time based on POT position; it should only change those few times you need it to, when you initially install the device. After that, 'just keep duty the same unless the POT is actually rotated'... Just don't know if my concern for 'noise or whatever' is valid or valid enough to justify making some more complicated code...

Here's my program as it stands. I have PWM changing the brightness of an LED here, so the parameters are different than what it'd be for changing DCDC voltage (for example, the period is a lot shorter for a higher frequency, so the LED doesn't just flicker)...

C++:
#include <TimerOne.h>  // Makes TimerOne library functionality available to Arduino IDE

const int POTPIN = A1;
int POTVAL = 0;
const int DVCT = 10;

void setup()
{
  pinMode(POTPIN, INPUT);
  pinMode(DVCT, OUTPUT);
  Timer1.initialize(8333);  // Initializes Timer1 to overflow in xxx microsecond periods, 1/period=frequency
  // 'DVCT' is 10Hz, 10Hz is 1/10 second period, = 0.1 X 1,000,000 in microseconds
  POTVAL = analogRead(POTPIN);   // values range from 0 to 1023
  Timer1.pwm(DVCT, POTVAL);   // Enables PWM on pin 10 with duty cycle based on pot position
  // function expects 10 bit value for duty, i.e. 0 for 0% to 1023 for 100%
  // 'DVCT' adj range 10% to 90% (14.50V to 13.85V output), 0% faults to 15.10V
  Serial.begin(9600);
}

void loop()
{
  POTVAL = analogRead(POTPIN); // might need delay or millis() after this or setPwmDuty?
  Timer1.setPwmDuty(DVCT, POTVAL);
  delay(250); // 250ms, 4 reads per second
  Serial.println(POTVAL);
}
 

·
Administrator
Joined
·
10,802 Posts
I don't know anything about arduino code however.. Below is what I do in pic basic pro.



Save the PotValue between loops, and only change the PWM if PotValue has changed.

So add something like POTVALOLD = POTVAL after you set the Timer1 PWM.

Then after you get the new POTVAL from the next analog read compare it to the old value POTVALOLD.

Are they equal? Y/N

If N update PWM. (Only updates if it has changed)

If Y get next analog read. (Repeat until it changes)
 

·
Registered
Joined
·
6,201 Posts
Discussion Starter #8
^ Thanks for the input. That's along the lines of what I was thinking. It makes more sense conceptually. But, I'm not sure it would make any material, substantial difference if the program 1) checked the POT and changed PWM each time through the loop, or if it 2) checked the POT and only changed PWM if the value changed.

Like, if it checked the POT and the value didn't change, I don't think setting PWM to the same value, under method 1, would be much different than leaving it the same, under method 2. The command I'm using ('setPwmDuty') is supposed to be simple, have 'low overhead', and the whole program is simple, too... So it's not like I have to conserve space, computing power, or what-not. But in the scheme of things, I'd like to be creating stuff that makes the most sense, that, in the long run, would conserve space and all that, should I need it...

I'll have to think about it some more. There are other things I should implement as well, like setting range limits on the PWM (I should probably prevent the POT from setting a duty below 10%, unless POT is turned all the way down, for instance, which would then go to zero and DCDC output voltage would 'fault' to 15.1V, i.e. at 10%, output voltage is about 14.5V, but then it jumps to 15.1V at zero duty)...
 

·
Administrator
Joined
·
10,802 Posts
If the value hasn't changed you do not set the pwm again.
You only change the pwm when the pot value changes.

Yes you could add further tests on the POT value and set defaults or ignore readings above/below set values etc.

All good practise for you.. ;)
 

·
Registered
Joined
·
6,201 Posts
Discussion Starter #10
If the value hasn't changed you do not set the pwm again.
That's what I said, isn't it?... I'm saying that whether you leave it the same (i.e. do not reset PWM) or reset PWM even though the value hasn't changed (i.e. reset PWM with the same value) - it probably doesn't make a real difference, in Arduino, with the command I'm using. I don't really know though, no experience...

All good practise for you.
True.
 
1 - 10 of 10 Posts
Top