Toyota Prius Gen 2 Inverter Controller

Topics concerning the Toyota and Lexus inverter drop in boards
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

mjc506 wrote: Thu Mar 24, 2022 6:25 pmThe inverter needs about 1 amp on the 12V rail :-)
So, my bench supply is 0-120vdc, but only 0-1000mA.

Okay, no problem, I could use a spare car battery or something, but for testing, I wanted some measure of current control I figured. So I used one of those cheap LM2596 "3A" buck converters. Cranked the input voltage to 35v (the 2596's max), and had the buck converter set to 13.8v.

Power supply was drawing about 650mA. So, about 1.8amps @ 12v off the buck. Naturally the buck is 3 chinese amps, and I know from friends testing these, past about 2amps they get hot enough to melt the solder.

Anyway, that was my first alarm bell. As the blue pill board only draws 60mA, soon as I powered up the inverter it spiked to 1.8amps and held itself there, which, for all I know was the 2596 thermal limiting itself. It later shit the bed and died after a minute or two I think.

So, just as an idiotcheck... is 1.8 amps "about 1 amp", or, is there a problem with the inverter there?

...

In other news I bought 3 light fixtures and 40w bulbs for them and connected them across the phases, so, good to go testing-wise with that.

Also, I'd say a solid 95% of the time, I can't get any parameters to display in the web interface. That whole section of the page just never loads. I can't figure out why.
User avatar
mjc506
Posts: 343
Joined: Wed Sep 09, 2020 9:36 pm
Location: Wales, United Kingdom
Has thanked: 30 times
Been thanked: 28 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by mjc506 »

The main board itself should only drawn a couple hundred mA (sorry, I forget the exact figure). But the mainboard + inverter + wifi won't be too far from 1.5A (also those LM2965's aren't fantastically efficient, especially dropping from 35V, so 1.8A @12V, or 1.65A @ 13.8V, is probably about right).

Do you hear a quiet high pitched wine from the inverter when you connect 12V? It's only the internal SMPSs running (not the louder noise from PWMs when driving a motor) but is a good sign that all is well.
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

mjc506 wrote: Thu Apr 07, 2022 10:35 amThe main board itself should only drawn a couple hundred mA (sorry, I forget the exact figure). But the mainboard + inverter + wifi won't be too far from 1.5A (also those LM2965's aren't fantastically efficient, especially dropping from 35V, so 1.8A @12V, or 1.65A @ 13.8V, is probably about right).
Ahh, I figured it was easier on it by giving it a higher voltage. In any case, it's trash now.

So far so good, if that's the right ballpark.
Do you hear a quiet high pitched wine from the inverter when you connect 12V? It's only the internal SMPSs running (not the louder noise from PWMs when driving a motor) but is a good sign that all is well.
Maybe? It's very high pitch, and I'm deaf above certain frequencies, but I think I can hear it whine as it spools up and disappears over my aural horizon.

...

Okay, I used a 12v battery instead.

So far so good. I'm inching forward.

Next obstacle...

When I power on my board, my pre-charge contactor turns on, for about 1 second, and then clicks off. The main contactor never activates. This is while the inverter isn't even powered up, so the board has no knowledge of the current state of pre-charge. I have default parameter settings.

I'm not sure why it turns on (power up spike? Or, actual pre-charge typical?), but definitely not sure why it powers off. This is true even if I have nothing connected to my HV DC bus. Always about a 1 second click clack of the pre-charge relay, and then nothing else.

I could just forego pre-charge and hotwire it (I'm using a variac, I can just slowly crank the dial), but, it's going to need to be fixed properly eventually anyways.

Thoughts or troubleshooting?
User avatar
mjc506
Posts: 343
Joined: Wed Sep 09, 2020 9:36 pm
Location: Wales, United Kingdom
Has thanked: 30 times
Been thanked: 28 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by mjc506 »

Hmm. Depending what else you've got connected, the board may be seeing a 'phantom' start signal and then cancelling, but that is a bit weird. A glitch on the precharge contactor shouldn't do any damage, but it shouldn't be happening and I'd want to find out why (and make sure a similar glitch couldn't occur on the main contactor!)

Mind, if the inverter isn't powered up, the board will be reading voltages for the Battery and HV buses that aren't there (in the order of 60ish volts). That could confuse things. I'd be tempted to get everything powered up on 12V (no HV) and make sure everything seems sane.
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

mjc506 wrote: Fri Apr 08, 2022 8:24 amHmm. Depending what else you've got connected, the board may be seeing a 'phantom' start signal and then cancelling, but that is a bit weird.
Part of the problem is that I don't even know what expected behavior is, so I can't tell what aberrant behavior is.

I just leave my start signal connected all the time, is that okay?
A glitch on the precharge contactor shouldn't do any damage, but it shouldn't be happening and I'd want to find out why (and make sure a similar glitch couldn't occur on the main contactor!)
Indeed.
Mind, if the inverter isn't powered up, the board will be reading voltages for the Battery and HV buses that aren't there (in the order of 60ish volts). That could confuse things. I'd be tempted to get everything powered up on 12V (no HV) and make sure everything seems sane.
No change, with the inverter also powered up. That said, I don't know what "everything powered up" is or if I'm missing something.

I saw in another thread, Johannes talked about pins 16 and 32 on the inverter going to ground (they're various grounds), but, I don't have that, that's not in anything I've been able to find as part of a procedure to follow. Do those need to be connected too?

Actually, there is no wiring diagram or procedure to follow. There's nothing anywhere that says what to connect or how to get started. 90% of the documentation for this is the documentation that I wrote or pictures and diagrams I made, and I just made bumbling guesses and shared it onto the wiki.

I've gone through Damien and Johannes' FOC Tuning Tutorial video, in as much as it applies to my situation, but there's not much there either, most of that video is FOC specific stuff. And, I get it, it's a deprecated design and they sell newer and better versions now, so, not worth anyone's time.

Typical open source woes. The solution is sufficient for the person who created it and who understands it intimately, but there's a canyon between that and the average person who would want to use it.

Trying to carry on through persistence alone. Thanks for helping troubleshoot.

Any thoughts on what I should do next?

Just short out the relays and manually turn up the HV and see if I can get lightbulbs to flash?
User avatar
mjc506
Posts: 343
Joined: Wed Sep 09, 2020 9:36 pm
Location: Wales, United Kingdom
Has thanked: 30 times
Been thanked: 28 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by mjc506 »

Haha I've been working from the wiki :-) It's been working for me so far, so...

Yes, I think you'll need to connect all the grounds on the 32pin connector (and the 2pin)

I don't leave my 'start' connected. That, I think, would cause the precharge to close on boot.

My inclination would be to power everything up, get on to the web interface, and check/set the parameters (current sensor offsets and gains, battery and LV voltage offset and gains... etc etc) This will require pushing current through the current sensors and voltages onto the two buses, so will confirm that the mainboard is listening to the inverter properly and all is working. There's no point trying to apply real HV and running the inverter until you've got to this point.
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

mjc506 wrote: Fri Apr 08, 2022 10:20 pmHaha I've been working from the wiki :-) It's been working for me so far, so...
Well, most of the Prius Gen 2 page was written by me, especially just about all of it as it pertains to this obsolete through-hole board.

https://openinverter.org/wiki/Toyota_Prius_Gen2_Board

Know why there's only labelled pictures of the 32-pin wiring plug on the inverter side, and not on the wiring harness side that most people would actually be tapping into? Because all those pictures are mine, and when I bought my inverter it didn't come with any wiring, and no one else has ever taken pics, labelled them, and contributed to show people what pins and wiring colors they'll be tapping into (someone did add a column to the table and write the colors out at least).

My goal was "If you take time to answer a question for me, I'll make sure no one ever has to answer that question again, it'll be well diagrammed and documented", but, even then, after 3 months of trying and getting tired of pestering people, I threw in the towel for a couple years. Johannes' new board is much better documented I think, though, hard to say what challenges people have with it.
Yes, I think you'll need to connect all the grounds on the 32pin connector (and the 2pin)
Hmm, okay.
I don't leave my 'start' connected. That, I think, would cause the precharge to close on boot.
K, will try that...

No change.

Still pulses the precharge contactor on, and then refuses to stay on or switch to the main contactor.

Y'know, maybe I'm wrong. Maybe I'm connecting it to the wrong pins. Maybe it's supposed to go to ground instead of 12v. None of this is written down, I'm just winging it. My first iteration of the diagram was wrong in a half-dozen places (tied connects to ground instead of 12v+), and someone came and corrected it with a different diagram, maybe theirs isn't right for this part of the diagram either. *shrugs*
My inclination would be to power everything up, get on to the web interface, and check/set the parameters (current sensor offsets and gains, battery and LV voltage offset and gains... etc etc) This will require pushing current through the current sensors and voltages onto the two buses,
I can't use the current sensors. This board pre-dates when people knew how they worked. You need to use some... I dunno, some other voltage splitting circuit or something. There's probably 10 posts about it. It's a few pages back. The solution seems simple to someone who understands that terminology, and there's a partial solution to it. But there's no clear values, it's just "use this calculator and figure it out", which, maybe I'd get right, or maybe, lacking context of how to do it, I'd use numbers that seem reasonable but are actually totally wrong. And, no one who did understand it ever just said "Here, do this" and drew a diagram and wrote it down, despite the solution being exactly the same for everyone. New boards would just have that solution incorporated, so, it only applies to this 3-year old obsolete board.

I was also told it wasn't necessary to use the current sensors for an ACIM motor, but then I don't know the context behind that either. Does that mean "Well, technically you could use some workarounds to force it to work, things I haven't mentioned" or does it mean "Yeah, just skip it, it just means you won't know what the currents are"? Either of those could be true, I don't know.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by Isaac96 »

A few questions I can answer off the bat.

-Wiki contains enough info to get the system running. I used a bare STM32 board with a ULN2001 and OI software to get some lightbulbs flashing (using your documentation). I used the 'schematics and instructions' page for the needed commands.
https://openinverter.org/wiki/Schematic ... structions

-Current sensors are unneeded to at least get a motor spinning, they're really there for information and overcurrent detection in the case of an induction motor (since we don't do FOC). No OC detection needed since the Toyota hardware handles that better than we do. So just ignore them, if you get errors then crank the ocurlim stupid high.



General Gen2 wiring as far as I remember (could probably dig out the wiring again):
-U,V,W for MG2 to the PWM outputs.
-16 and 32 to ground, 32 is for boost converter so maybe unnecessary.
-12v and ground to that other weird connector.
-MSDN to 12v

And that should be it for that end of it.
No idea how to handle the BluePill board.



You've got a wifi thing hooked up. Is that communicating with the bluepill? Default params are probably fine, may need some adjustments to udcmin, udcmax, udcsw etc.

For 'manual' precharge you don't need to be sensing voltage, just have to be careful with your powerup timing. (Turning system on should turn on the precharge, then hitting start will activate main contactor if udc > udcsw; so as long as you wait a few seconds / verify that voltage across precharge resistor is fairly low (<10v) it should be fine.)

Interesting that your precharge is turning off. I lean towards thinking the board is unhappy with whatever udc value it's reading. Adjusting udcsw to be below whatever udc value you have should solve that. Still be careful with precharge timing.
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Getting frustrated so I'm just throwing random shit at the wall now, guessing what might work, and trying to whip some progress in any direction I can.

- Tried updating the firmware, just, if for no other reason, than to see if I could, since I never have. The web interface doesn't tell you that you have to use a .bin instead of the .hex, but the wiki for the web interface clarifies. If you use a hex file, nothing tells you it failed or gives you any indication you did anything wrong, it just doesn't make changes. Once I figured that out, it still took 4 tries, kept timing out, but, it appears to have worked!

.. didn't fix anything, but, at least I got newest firmware.

- Curious about how to update the web interface itself, but it doesn't tell you how to do that anywhere other than "You can upload 'it' into memory" and then "You can make use of that to modify the web interface itself." Which is like the instructions for driving a car saying "If you get into the car, now you can drive it". Doesn't help me update the interface. No matter, I don't think that's holding me up.

- I couldn't find anywhere to get the current values of my throttles, so I selected them on the graphing interface and, that worked. I found their max and mins. I entered these into 'potmin' and 'potmax', with some header room. That is, they go from about 1050 to about 4000, so I set the min to be 1000 and max to be 4095, so that any number out of that range definitely signifies an error. I'm not sure if I should've done the reverse, and left extra capacity in the range. I can think of reasons to go either way. The instructions are perfectly vague. They tell you it's important and to modify them, but not in which direction. Only to "add/subtract" some, depending on whether you're doing the min or the max... ... but doesn't tell you which to do for which. I.E. "These are traffic lights, they tell you to go or to stop. They are red and green." ... which means go, which means stop? Doesn't tell me whether I'm adding or subtracting to the min, and vice versa on the max. Is my parameter range supposed to be wider than measurement range, or narrower?

- Intending to test at 80vdc, I set 'udcsw' to 70v, and 'udcmin' to 80v, and 'udcmax' to 120v.

- I set 'tripmode' to 2, which is to leave precharge contactor on if it errors out or shutsdown.

- I left 'udclim' high at its 540v default, just to prevent it from tripping and shutting down.

...

I just noticed I'm having trouble getting them to save. I'm using a tablet, and it does have a "go" button after entering values, which I presume is like the "enter" key and should initialize. When I refresh the page (either with the refresh button or the browser's refresh button) I get all the values reloading just fine. But if I power down the board and turn it back on again... none of my values are saved, they're back to defaults. Am I saving values the wrong way? ... Yes. Apparently you have to tell it to save settings to flash. This is different than saving them to file. The web interface doesn't mention any of this, though the wiki does make note of it in a dictionary-style list, if you happened to read that exact line it tells you to click it, there's no overview telling you to do that every time.

Also, this should be a huge hint... if I click "Display Error Memory" I get "[7] : STOP - OVERVOLTAGE". Despite the board not having any connection to the DC bus yet. No elaboration on that or what it means.

The wiki doesn't say anything in the web interface section: https://openinverter.org/wiki/Web_Interface , other than "Display Error Memory - shows the latest 4 errors. Errors are only reset by power cycling." No list of errors, troubleshooting help, or explanation of what is causing them.

I googled the error, and luckily it turned up another random, unlinked wiki page about errors: https://openinverter.org/wiki/Errors . Great. I've now linked it to the web interface area where it tells you what the errors button does, so someone reading that has a hope of finding out what the error means.

Okay, let's look up error #7: 7 DESAT STOP Desat pin went low ... well that doesn't seem relevant.
Okay, but here's error #8: 8 OVERVOLTAGE STOP udcmax was hit ... okay, that's probably the correct one, but why is the wrong error number given? Is the web interface outdated? Is the documentation outdated? Is it a typo or a mis-order?

Let's presume that's correct, how is UDCMAX (set to 540v for most of the testing, and 120v more recently) hit, when:
A - I don't even have the HVDC connected to anything yet, and
B - My variac is set to like, 30v maybe.

Maybe I just need to wire it up to the inverter and let 'er rip? Maybe it's floating and undefined?


I also found this post from Damien in another thread: viewtopic.php?p=28475#p28475

---
In order for the main contactor to close you need :

1)UDC>UDCSW
2)No errors or faults. Check the web interface.
3)Momentary signal on DIN_START.

Check your mode. does it say : RUN?
The precharge contactor should switch off after 5 seconds if RUN mode is not achieved.
---

Well, my precharge contactor is definitely not on for 5 seconds. It's on for like, 1 second. And if that was the problem, it would throw error 10, about the 5 second timeout on precharge elapsing.
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Isaac96 wrote: Sat Apr 09, 2022 3:48 am-Wiki contains enough info to get the system running. I used a bare STM32 board with a ULN2001 and OI software to get some lightbulbs flashing (using your documentation). I used the 'schematics and instructions' page for the needed commands. https://openinverter.org/wiki/Schematic ... structions
So, that's what I've been using. But, most of it doesn't apply to my situation, that's for one of the pure OI inverter boards. Lots of it doesn't make sense, but maybe I'm making mistakes, ignore stuff that does apply or not ignore doesn't that doesn't apply. It's lots of guesswork that can go many different ways. It's so much guessing, I'm sure sometimes I'm looking right at the answer and don't know it's the answer.
-Current sensors are unneeded to at least get a motor spinning, they're really there for information and overcurrent detection in the case of an induction motor (since we don't do FOC). No OC detection needed since the Toyota hardware handles that better than we do. So just ignore them, if you get errors then crank the ocurlim stupid high.
Gotcha. Good to know, that was my plan.
General Gen2 wiring as far as I remember (could probably dig out the wiring again):
-U,V,W for MG2 to the PWM outputs.
-16 and 32 to ground, 32 is for boost converter so maybe unnecessary.
-12v and ground to that other weird connector.
-MSDN to 12v
Okay, I was missing pin 16 (and 32, but skipping that), I'll do that. Result: It seems to be in common with the heavier ground beside the IGCT line on the other connector, at least, it has equivalent power draw when I connect either of them.

Another thing is, in one tutorial Damien says not to connect your HVDC to the normal HVDC lines, you want to connect them to the terminals 8" to the left. ... okay, but, they're just straight in parallel with the original terminals, and his instructions don't say to take apart or disconnect anything, so, I'm not sure how using the original terminals or the interior terminals make a difference. Which makes me skeptical that I've interpreted it correctly or that the solution was complete and didn't make presumptions about what I would know to do.
You've got a wifi thing hooked up. Is that communicating with the bluepill? Default params are probably fine, may need some adjustments to udcmin, udcmax, udcsw etc.
Yes, I'm fairly certain. I could graph my throttle and regen pedals and watch the number change, so, I think that confirms I'm reading and communicating correctly, don't have my TX/RX lines crossed, etc.
For 'manual' precharge you don't need to be sensing voltage, just have to be careful with your powerup timing. (Turning system on should turn on the precharge, then hitting start will activate main contactor if udc > udcsw; so as long as you wait a few seconds / verify that voltage across precharge resistor is fairly low (<10v) it should be fine.)
Okay, good to know.
Interesting that your precharge is turning off. I lean towards thinking the board is unhappy with whatever udc value it's reading. Adjusting udcsw to be below whatever udc value you have should solve that. Still be careful with precharge timing.
It's connected to pin 12 on the inverter (triple checked I'm on the correct pin), but, no HVDC power is going to the inverter yet for it to measure.

Another weird thing, I don't think it was doing this earlier... but if I yank out a line for the contactors, I can hear/feel it click a little bit. Not a lot, not like when it turns on, but, definitely... something. There shouldn't be any power on those lines, and if there is, it should be lots, or none. Not sure why it's got a small amount of click-clack to it. Neither contactor is tripping either way when I do this.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by Isaac96 »

MattsAwesomeStuff wrote: Sat Apr 09, 2022 8:18 am
Isaac96 wrote: Sat Apr 09, 2022 3:48 am-Wiki contains enough info to get the system running. I used a bare STM32 board with a ULN2001 and OI software to get some lightbulbs flashing (using your documentation). I used the 'schematics and instructions' page for the needed commands. https://openinverter.org/wiki/Schematic ... structions
So, that's what I've been using. But, most of it doesn't apply to my situation, that's for one of the pure OI inverter boards. Lots of it doesn't make sense, but maybe I'm making mistakes, ignore stuff that does apply or not ignore doesn't that doesn't apply. It's lots of guesswork that can go many different ways. It's so much guessing, I'm sure sometimes I'm looking right at the answer and don't know it's the answer.




Another thing is, in one tutorial Damien says not to connect your HVDC to the normal HVDC lines, you want to connect them to the terminals 8" to the left. ... okay, but, they're just straight in parallel with the original terminals, and his instructions don't say to take apart or disconnect anything, so, I'm not sure how using the original terminals or the interior terminals make a difference. Which makes me skeptical that I've interpreted it correctly or that the solution was complete and didn't make presumptions about what I would know to do.


Interesting that your precharge is turning off. I lean towards thinking the board is unhappy with whatever udc value it's reading. Adjusting udcsw to be below whatever udc value you have should solve that. Still be careful with precharge timing.
It's connected to pin 12 on the inverter (triple checked I'm on the correct pin), but, no HVDC power is going to the inverter yet for it to measure.

Another weird thing, I don't think it was doing this earlier... but if I yank out a line for the contactors, I can hear/feel it click a little bit. Not a lot, not like when it turns on, but, definitely... something. There shouldn't be any power on those lines, and if there is, it should be lots, or none. Not sure why it's got a small amount of click-clack to it. Neither contactor is tripping either way when I do this.
Once you can get the system precharged and happy then the commands on wiki are useful. For now you're not at that stage, so let's try to get the HV working.

Your connections to those HV lines are fine for now. IIRC Damien had an issue with the capacitors being 'far away' electrically and thus being unable to catch voltage spikes. For testing (sub kilowatt levels) there's no issue.

Weak click? Very weird. What happens if you try small relays instead of contactors? Perhaps the drivers for main and precharge are too weak? In fact, do you get a big proper click if you connect contactor negative directly to ground?
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Isaac96 wrote: Sat Apr 09, 2022 9:02 pmWeak click? Very weird. What happens if you try small relays instead of contactors?
I'm actually using a variac as my HVDC source instead of batteries, and, that makes it a lot easier to switch on the primary side than the output since it's still AC there. So I'm just using piddly little 12v contactors out of a microwave I think, half the size of a wine cork.

So, it's not too hard of a load to switch.

I don't actually have any HVDC hooked up to the inverter (or anything, other than a lightbulb and a multimeter just for visual indication) yet though, the weird contactor behavior has spooked me.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by Isaac96 »

Hmm. What are the output states? (Can't remember if those show up in the interface!)

Also, remembering precharge and main behaviour.
At the moment, your precharge powers up on boot, then turns off after a second or two. Correct?

Precharge should turn on as soon as the board boots. So that part's fine.
It will shut off either
a) when the main contactor turns on (which will happen if you have udc > udcsw and start signal) or
b) if udc < udcsw after a certain amount of time.
Precharge shutting off probably means your udc is too low. Which is expected behaviour since you've got no HV!

What sort of error messages do you get in the interface? And what is the udc reading?
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Isaac96 wrote: Sat Apr 09, 2022 10:26 pmHmm. What are the output states? (Can't remember if those show up in the interface!)
Hmm, dunno, haven't seen that anywhere.
At the moment, your precharge powers up on boot, then turns off after a second or two. Correct?
About 1 second, yeah.
Precharge shutting off probably means your udc is too low. Which is expected behaviour since you've got no HV!
Yes, but it should be giving it 5 seconds, not 1.
What sort of error messages do you get in the interface? And what is the udc reading?
I posted it a bit earlier.

"[7] : STOP - OVERVOLTAGE"

And the error wiki says error 7 is different, but error 8 matches up pretty closely:

Error #7: 7 DESAT STOP Desat pin went low
Error #8: 8 OVERVOLTAGE STOP udcmax was hit

Looks like it's somehow measuring that UDCMAX was reached, so it panicked and shut off even the pre-charge contactor because it thought the pack was overvoltage.

I recently lowered my UDCMAX to 120v, but formerly (when it was still doing this) it was set to the default of 520v. And, even if it was connected, my variac can't generate voltage that high. It maxes out just north of 200v. And I've never gone above about 80v.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by Isaac96 »

Ah, sorry, missed those somehow. Very interesting that it's measuring high. Have you calibrated the voltage sensor? It's a 2 step process, one with no HV and one with HV.
No HV:
Offset to 0, gain to 1, then read udc; set offset equal to udc reading.
Then with HV:
Gain to make udc match your actual HV reading.
Chances are the default parameters don't match what is needed for the Prius system, which outputs ~1% of bus voltage (according to wiki again).

For now all you need is a close enough udc reading to get through precharge, as it sounds like the rest of the system is configured beautifully.
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Isaac96 wrote: Sat Apr 09, 2022 11:27 pmAh, sorry, missed those somehow. Very interesting that it's measuring high. Have you calibrated the voltage sensor? It's a 2 step process, one with no HV and one with HV.
I have not, no.

Where is that described in a procedure, or otherwise written down? (Not complaining, sort of complaining, but mostly, if/when I get this working I want to know what needs to be rewritten, added to, or featured more prominently for everyone else, because I've never come across it so far and if I'm having this problem so will everyone else).
No HV:
Offset to 0, gain to 1, then read udc; set offset equal to udc reading.
Then with HV:
Gain to make udc match your actual HV reading.
Chances are the default parameters don't match what is needed for the Prius system, which outputs ~1% of bus voltage (according to wiki again).
Hmm... if I guess at what this means, I'm going to guess at least one part of it wrong. Pretend I'm a child, that's about how specific instructions I'll need.

What "offset"? I presume this is a parameter? I would guess you mean "UDCOFS"? There's only a very short description, and zero explanation of what this parameter does: "DC link 0V offset" Doesn't mean anything to me.

What "gain"? Another parameter? I would guess "UDCGAIN"? Again, short description, zero explanation: "Digits per V of DC link" I can't even parse that as a sentence. I don't know what the term "digits per volt" means. Digits of what?

What does "read" mean in this context? Read what, where, and how? Like, I graph it, or, I try to do a "get udc" and see what it spits out?

What does "setting offset equal to UDC reading" mean? Equal as in, whatever parameter I'm modifying, literally the same number as the UDC reading, or, am I doing other things to equate them?

I'm not sure what "gain to make udc match your actual HV reading" means. I get that I'm supposed to alter my gain or my offset for different things to match, but I don't get in what way or what I'm doing with the numbers.

... Also... I can't measure my HV to calibrate it, because I can't get HV at all, because the relays won't close.
For now all you need is a close enough udc reading to get through precharge, as it sounds like the rest of the system is configured beautifully.
So, I tried another foolish plan before I checked back here. If I was erroring out because UDCMAX was exceeded, why not just crank up my UDCMAX?

So I cranked my UDCMAX to the max of 1000v. Same behavior, 1 second or precharge and then the relay shuts off, but, different errors now. No UDCMAX error. Instead:

[49] WARN - HICUROFS1
[49] WARN - HICUROFS2
[50] WARN - HICUROFS1
[50] WARN - HICUROFS2

I'm not sure what the numbers mean, if those are supposed to be error codes or whether it's just a sequential number of errors so far, they don't match the numbers in the Errors list. But I can find the HICUROFS`1 and 2:

https://openinverter.org/wiki/Errors

[14] HICUROFS1/2 DISPLAY Current channel 1 or 2, respectively, is below 1.23 or above 2.06V when no current is flowing. Check wiring and voltage dividers

[15] HICUROFS2 DISPLAY

Not sure what the second one (15) is there or how it differs from error 14, but...

This makes sense, sort of. I don't have any current sensors hooked up. I can't, because they need some special extra voltage divider that no one's documented yet.

Are these just courtesy warnings (i.e. "Hey by the way, your current sensors appear to be malfunctioning"), or are they critical errors (i.e. "We can't read your currents, shutting it down now.")?

Any way around them?

Or, are they not even the problem?
User avatar
mjc506
Posts: 343
Joined: Wed Sep 09, 2020 9:36 pm
Location: Wales, United Kingdom
Has thanked: 30 times
Been thanked: 28 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by mjc506 »

https://openinverter.org/wiki/Schematic ... sor_boards

You do definitely need to calibrate all of the sensors, otherwise they'll see wild readings and assume (for safety) that something's wrong and shut everything down.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by johu »

Not quoting as I'm on my phone.

Offset: the prius inverter does not deliver 0V on its voltage signal when bus voltage is 0V but like 0.3V or so. This is then converted by the controller to “digits“ where 3.3V on a controller pin is 4095 digits. Software needs to know this offset.
Gain: per V of real bus voltage the prius board will deliver some mV of sense voltage, which is again converted to digit and software needs to know how many of those digits correspond to 1 real volt
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by Isaac96 »

MattsAwesomeStuff wrote: Wed Apr 13, 2022 7:44 am So, I tried another foolish plan before I checked back here. If I was erroring out because UDCMAX was exceeded, why not just crank up my UDCMAX?

So I cranked my UDCMAX to the max of 1000v. Same behavior, 1 second or precharge and then the relay shuts off, but, different errors now. No UDCMAX error. Instead:

[49] WARN - HICUROFS1
[49] WARN - HICUROFS2
[50] WARN - HICUROFS1
[50] WARN - HICUROFS2

I'm not sure what the numbers mean, if those are supposed to be error codes or whether it's just a sequential number of errors so far, they don't match the numbers in the Errors list. But I can find the HICUROFS`1 and 2:

https://openinverter.org/wiki/Errors

[14] HICUROFS1/2 DISPLAY Current channel 1 or 2, respectively, is below 1.23 or above 2.06V when no current is flowing. Check wiring and voltage dividers

[15] HICUROFS2 DISPLAY

Not sure what the second one (15) is there or how it differs from error 14, but...

This makes sense, sort of. I don't have any current sensors hooked up. I can't, because they need some special extra voltage divider that no one's documented yet.

Are these just courtesy warnings (i.e. "Hey by the way, your current sensors appear to be malfunctioning"), or are they critical errors (i.e. "We can't read your currents, shutting it down now.")?

Any way around them?

Or, are they not even the problem?
HICUROFS are exactly that, just courtesy warnings. So it's very sensible that you are seeing them, and they don't cause any issues.

Following the instructions from that schematics and instructions page for voltage sensor calibration should get you going. Interesting that even with udcmax all the way up your precharge is still shutting off.

No need to worry about the current sensor calibration.
You could get rid of the HICUROFS errors by supplying 3.3v to the current sensor pins, as the schematic https://github.com/damienmaguire/Prius- ... ematic.pdf appears to show a 1K - 1K divider which would halve input voltage. (Thus you get 1.65v with a 3.3v input, which the board will be happy with.)

It would be great to have a quick-start guide containing info like the voltage sensor calibration. Future project.
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Damnit. I've been going through that, but, that section I presumed was assembly and setup instructions for parts of the original Openinverter hardware... which I've never seen or used, so I lacked the context to know what could or couldn't be ignored on them, and chose wrong. I knew there would be things I guessed wrong about, I just didn't know which :p

Seeing instructions like: "Current values are only measured in Run mode, so tie Pin 11 and 17 to 12V and type...". Well, I don't have a pin 11 and 17 on the original hardware, so, that advice is nonsensical to me. Nor even now, do I know how to apply it to my current situation. What do those pins do? What is their function? How do I replicate that on my setup? Do I even need to replicate that on my setup? Etc.
johu wrote: Wed Apr 13, 2022 5:20 pmOffset: the prius inverter does not deliver 0V on its voltage signal when bus voltage is 0V but like 0.3V or so. This is then converted by the controller to “digits“ where 3.3V on a controller pin is 4095 digits. Software needs to know this offset.
Gain: per V of real bus voltage the prius board will deliver some mV of sense voltage, which is again converted to digit and software needs to know how many of those digits correspond to 1 real volt
Ahh. Okay, that explanation makes sense. "Digits" to me, is, how many... well, digits there are. I.E. 17 = 2. 217 = 3. 835,409.12 = 8. Maybe it has another use or maybe it translates differently from German.

This should be written down somewhere. The better documented things are, the more able people are to make their own decisions.
Isaac96 wrote: Wed Apr 13, 2022 6:21 pmHICUROFS are exactly that, just courtesy warnings. So it's very sensible that you are seeing them, and they don't cause any issues.
Great, ignoring for now.
Following the instructions from that schematics and instructions page for voltage sensor calibration should get you going. Interesting that even with udcmax all the way up your precharge is still shutting off.
Indeed. Except, it's not throwing any error about it. Unless there's a maximum of 4 errors in the log or something like that, and earlier errors are being suppressed.
You could get rid of the HICUROFS errors by supplying 3.3v to the current sensor pins
I'm not worried if it's not going to impact me. Though I would like to get them working properly later.
as the schematic appears to show a 1K - 1K divider which would halve input voltage. (Thus you get 1.65v with a 3.3v input, which the board will be happy with.)
Not sure I trust following instructions on the Gen 3 with hardware on the Gen 2. I've not heard anyone mention that they operate the same in this aspect.
It would be great to have a quick-start guide containing info like the voltage sensor calibration. Future project.
I mean, I'll do it. I don't mind adding documentation. But in order to write good documentation, I have to have good understanding of what I'm trying to explain. Else we end up with things like me making circuit diagrams with wires going to GND instead of 12+ and writing tables with the wrong labels (real examples).

Also, I'm probably the last person in the world to use or need this documentation. This through-hole board is deprecated, the Blue-Pill has some fatal limitations for certain tasks, and Johannes' new one has, for example, the current sensors voltage divider built properly into the circuit so no one needs that explained anymore. I picked my horse early, and it was the wrong horse.
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Okay, some tinkering time. Just spewing out procedure in case at some point it's wrong someone can alert me. Boring stuff:

First up, with no HVDC connected, a:

"get UDC" yields 79.59
on repeat, 79.75
on repeat again, 76.81

That's without changing the default "udcgain".

Now with HVDC connected, well, no change, because there's no voltage on it, because the relays won't shut.

Setting "udcgain" to 1, "udcofs" is 0, and a "get udc" yields 516. Then 522.

"set udcofs" to 522.

Just to verify, a "get udc" now results in -21. Hmm. Well it's in the right ballpark.

... the next step is to set a known voltage... I can't, because no voltage is getting into the inverter because the relays are still open. So, back to that.

*time passes*

Okay, well, now I have really absurd behavior. Inconsistent behavior, and/or I can't figure out how I got certain errors/results.

To at least progress in some direction, I know I got rid of the Overvoltage error by cranking the "udcmax", so I first tried to set the "udcmax" back up to 1000, because apparently that hadn't saved from earlier, or it got restored to a default by accidental click (it was saved to flash, it has to be, or it wouldn't boot with that value and it definitely was). I presumably also lost my previous UDC calibrating here in the unsaved reboot.

I think it failed and I didn't notice, because it said the inverter was running. I rebooted and got not just an Overvoltage error, I also got an Overcurrent error. With no current sensors, and nothing I did differently.

So then I tried to save parameters with udcmax at 1000, to see if I could get it to clear the error as it had several days ago. It refused to save, said the inverter was running. I never told it to run. I clicked "stop inverter", and, doesn't matter, still refused to save, said the inverter was running. Okay, so I disconnected 12v from the board to the inverter. Then it saved.

I think what happened next was, if I booted without the inverter powered, but then connected power, suddenly the Precharge relay turned on. I waited for it to turn off.... it never did. Minutes later it still had 12v across it. I doublechecked it was the precharge pins I was measuring. Precharge never shuts off. That should never happen.

Okay, so I hooked up power, and turned up the variac.

Left it for probably a minute, precharge never turned off, main relay never clicked on. I tried this with HVDC disconnected from the inverter too, same performance.

I think then I tried continuing with the voltage calibration procedure, from scratch. This time I got a UDC of 429, so that's what I set "udcofs" to.

Oh, somewhere in or around here, my UDC was reading 4092 (almost max), with no HVDC connected. Did that for a few reboots, not sure why.

Anyway, moving on, I left "udcofs" at 429 and got a UDC measurement of 389v when I was pretty much bang on 100v measured. I'm using an old tablet to interact with the web interface, and, if I try to adjust parameters with the interface rather than commands, it refuses to let me use decimals. Only integers. I don't know how the tablet knows I shouldn't be typing letters in there, but, seems like however you tell it to use a data type, it's set to integers instead of whatever would allow decimals. I forgot I could just set it by command up top, so I set "udcgain" to 4, (389 ~= 400).

So, offset to 429, gain to 4 was the ballpark. If that ever ends up helpful to anyone.

I think I tried saving to flash (maybe had to tell it to "stop", which worked this time, unlike previous times).

I think the next time I booted up, the precharge relay timed out after 5 seconds (as it should have, my HVDC voltage was way too low). It gave the correct precharge timeout error.

I tried to repeat this error, and couldn't. Next boot I think it did the 1 second precharge thing again.

I wasn't being careful about watching what I was doing, but some combination of stripping 12v power from the inverter during startup, or not connecting the start/ignition pin, managed to get it into Permanent Precharge. I was just trying random stuff at this point because I wasn't getting consistent behavior anyway.

Sometimes I'd get no errors. Sometimes I'd do a reboot and then get 4 HICUROFS warnings, changing nothing at all. Just randomly rebooting and they'd change. And the leading number would change too. Sometimes it would be [53], sometimes something like [6172] or whatnot, some 4 digit number.

But seems pretty consistently now, if I boot, I am in Permanent Precharge mode. Precharge never errors out or kicks off or switches over.

My "udcmax" is set to 120v, and my HVDC voltage is set to about 110-115v, doesn't matter. I can crank the voltage higher, doesn't matter, doesn't trip anything. Nothing I do makes the precharge shut off, unless it goes back to its 1-second startup pulse thing.

I feel like I've made some progress, but, not particularly useful progress because it's all over the map. Throwing in the towel for the night.

Ugh. Confusing without having a known-good setup beside me or even just to have ever seen in the past, to know what behavior to expect.

Is there something I'm doing abnormal from what proper startup procedure is? It shouldn't even be possible for me to have the precharge locked on for 20 minutes straight. I did once (only once) get the 5-second timeout with maybe different settings. I still can't get it to switch over when the right voltage is reached.

I feel like I'm at the point where someone who knows what they're doing would mildly freak out and say "Whoa. Stop. Do exactly this, and it should work, stop trying random things just to see if they make a difference."
User avatar
mjc506
Posts: 343
Joined: Wed Sep 09, 2020 9:36 pm
Location: Wales, United Kingdom
Has thanked: 30 times
Been thanked: 28 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by mjc506 »

If you've still got your 'start' directly connected to 12V, that would explain why it went in to run mode and wouldn't stop.

Also bear in mind that with inputs disconnected (left floating) you'll be reading noise. Sometimes it'll look (to the main board) like all is ok on boot, other times it'll 'read' high currents, low HV, weird errors... With the main board powered but the inverter not powered (with 12V) you'll also get screwy inputs from internal resistances, capacitors charging/discharging...

No arguments that documentation is lacking. A symptom of lots of different projects and little dev time. And made worse of course by obsoleted hardware! But it should all still work!

So, erm... "Whoa. Stop. Stop trying random things just to see if they make a difference." :-)
  • Start fresh.
  • Make up a minimal set of connections between board and inverter (put 'start' on a momentary switch, or leave a flying lead so you can touch it to 12V, or leave it open and control the inverter over the web interface for now.) To start with, you want power and ground connections, and connect all the HW safeties to 12V.
  • Get the inverter and main board powered up with 12V (a car battery is fine, especially if that's plugged in to a charger too just to keep it topped up during testing - a low 12V will make everything more difficult).
  • At this stage, you want to make sure you have decent connection to the web interface using your tablet/phone/laptop/whatever.
  • Check you have the latest released firmware (just in case etc).
  • Might be worth resetting your parameters too? Not essential, but forces you to do things step by step :-)
  • Check you can read errors (there will be some, probably current offsets at least)
  • Read values. You will get, generally, some noise on all the inputs.
  • I would next start to calibrate udc. Set udc offset to zero and gain to 1. Save (it won't save parameters if the board is in 'run' mode)
  • Power off, connect HV voltage from inverter to the udc input on the board, and power back on and reconnect to the web interface. I can only recommend powering off everything every time you fiddle with connections, saves issues with free wires touching power or ground...
  • Refresh the values a few times and take a rough average of the 'udc' value. This is your offset (integers are fine)
  • Save!
  • Alternatively, you can 'plot' udc - this gives you a graph which it may be easier to eyeball an average from
  • You _will_ get noise. Don't worry at this stage (once calibrated, any noise should hopefully be small in comparison to your HV voltage)
  • Now udc gain. Apply a known voltage to the HV bus in the inverter (12V is ok, higher voltages will give you better accuracy, but take care not to connect a high voltage to a discharged HV bus). Note the value that the board reads for udc, and the actual voltage with a multimeter. I think you calculate gain by udc reading/true voltage, but it could be the other way around. You should be able to input a float here.
  • Save...
  • Remove your 'HV'
  • If you're feeling brave, remove 12V (power off the board and inverter), then power back up and reconnect to the web interface
  • With both board and inverter powered up, and no HV applied, you should get a udc reading of close to 0V (some noise is fine)
  • Apply your HV, udc should now show pretty close to the actual applied voltage.
  • You have now confirmed the the board and inverter are good, can save (and load) parameters and make realistic readings :-)
  • As above, you don't need to, but I would be tempted to get an approximate calibration of the current sensors, if only to get rid of the warnings on the interface. But this may need some potential dividers etc (I don't have a gen2 board, but the schematics are on the wiki. The stm32 will be expecting an analogue voltage of 0-3.3V, with 1.65V resulting in a 0A reading. I think you would need to provide an external potential divider to convert the output from the current sensors to these levels. Plus it's generally more tricky to feed a fixed current through a sensor. But as above, not essential for sine firmware
  • Getting some pwm is next I think.
  • You should already have the HW safeties pulled high
  • Send the 'start 2' command. The inverter should now be in 'manual run' mode (this mode has fewer checks and safeties enabled than the normal run mode)
  • 'set fslipspnt 1' and 'set ampnom 1'
  • You should now be getting pwm from the board pwm outputs. Ideally check with an oscilloscope, but a multimeter should be able to see 'something' happening (maybe also read frequency)
  • Send a 'stop' command
  • Now it's worth checking that the parameters on the board are suitable for the Prius inverter, mainly pwm frequency and dead times. An example set is here: https://openinverter.org/wiki/Configura ... 2_Inverter
  • Yes, that set of parameters does include udc offset and gain (which are hopefully pretty close to what you've got). Yes, I did get you to do it anyway :-) Wasn't it satisfying? :-)
  • save...
  • Now connect up the PWM outputs on the board to the PWM inputs on the inverter
  • Connect some HV (direct to the bus is fine, highly recommend some current limited supply - either a bench PSU or similar, or a battery with a filament bulb or oven element connected in series. You don't need massive voltage, 12V will do)
  • Start the inverter in manual mode again (start 2). You may need to resend the fslipspnt and ampnom commands again
  • The inverter should be making a whistling noise - this is the IGBTs switching
  • With nothing connected to the inverter, you should have 0 current on the HV line (any bulb shouldn't be lit). If you have significant current, you have shoot-through (+ve and -ve IGBTs turning on simultaneously) which should be impossible with the gen2 inverter...
  • Assuming success, stop and power down the inverter.
  • Motor next. Connect it up!
  • Power up, start, set fsplispnt/ampnom. You should be able to get the motor spinning by adjusting ampnom and fslipspnt - see the wiki. This may not work if your HV supply is too weak, but hopefully you'll at least be able to feel something while spinning the shaft by hand
  • Hopefully by this point, you'll have confirmed that the board and inverter are both working and capable of spinning a motor. And gained a bit of confidence? Next steps are connecting the resolver/encoder, throttle, drive/reverse inputs, start (momentary) line...
Good luck!
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by johu »

Wow, need to wiki that one!
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
mjc506
Posts: 343
Joined: Wed Sep 09, 2020 9:36 pm
Location: Wales, United Kingdom
Has thanked: 30 times
Been thanked: 28 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by mjc506 »

Hah, didn't realise I'd typed that much...
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

mjc506 wrote: Fri Apr 15, 2022 3:13 pmIf you've still got your 'start' directly connected to 12V, that would explain why it went in to run mode and wouldn't stop.
I see.

So that starts the inverter, not the control board.

See? Really obvious things once you know them, that are ambiguous before you know them.
Also bear in mind that with inputs disconnected (left floating) you'll be reading noise. Sometimes it'll look (to the main board) like all is ok on boot, other times it'll 'read' high currents, low HV, weird errors... With the main board powered but the inverter not powered (with 12V) you'll also get screwy inputs from internal resistances, capacitors charging/discharging...
Might be why my current sensors are angry occasionally. That or, if left at 0v, when it's expecting 1.65v center, must look like a maximum negative voltage.
No arguments that documentation is lacking. A symptom of lots of different projects and little dev time. And made worse of course by obsoleted hardware! But it should all still work!
*deletes long tangent about the importance of more people than just the developers contributing to open source projects*

...

Just to be pedantic and thorough (and also, 50% of these I don't actually know the answer to...):
[*]Make up a minimal set of connections between board and inverter (put 'start' on a momentary switch, or leave a flying lead so you can touch it to 12V
I've been using a flying lead out of laziness, and, leaving it connected. So, I'll just leave it disconnected until needed.
To start with, you want power and ground connections, and connect all the HW safeties to 12V.
Dumb question... What are the hardware safeties?

You mean the pre-charge? Just connect that terminal to ground instead of MNC (main contactor)?
[*]Get the inverter and main board powered up with 12V (a car battery is fine, especially if that's plugged in to a charger too just to keep it topped up during testing - a low 12V will make everything more difficult).
I got a 12v 5a power brick last week to replace my 1a bench supply. But I notice, presumably due to the polarity protection diode voltage drop, I only get 11.3v on stuff now. I am apparently making everything more difficult with low voltage. I'll grab a lead acid instead.
[*]Read values. You will get, generally, some noise on all the inputs.
Read which values specifically?

What inputs?

What should be expected for values or noise?

What am I doing with this information? What does it establish?
[*]As above, you don't need to, but I would be tempted to get an approximate calibration of the current sensors, if only to get rid of the warnings on the interface. But this may need some potential dividers etc (I don't have a gen2 board, but the schematics are on the wiki. The stm32 will be expecting an analogue voltage of 0-3.3V, with 1.65V resulting in a 0A reading. I think you would need to provide an external potential divider to convert the output from the current sensors to these levels. Plus it's generally more tricky to feed a fixed current through a sensor. But as above, not essential for sine firmware
I get the gist of it, but not in a way I'm confident to act on. Plus, I would like the current sensors to work, so, an actual solution would be best.

Digging up from this thread, Konstantin plagiarized Johannes' solution on his Gen2 board, but, that's a bit too complicated for me: viewtopic.php?p=11441#p11441

Arber discusses it somewhat (centering on 2.5v instead of 1.65, corrected/discussed later), and verbally describes the process: viewtopic.php?p=9031#p9031

Just below, Sirrocco links a calculator (referenced several times with annoyance in the future), that I'm sure works, but no one seemed to have success actually picking the right values with: viewtopic.php?p=9043#p9043

People post the circuits they tried that didn't work or that they struggled with, but don't document their proper end result. So, if an end result was reached, everyone reinvents the wheel regardless.

Again I get the gist of it, but, I only somewhat know what an OpAmp is, I don't think I have any in my salvaged parts pins (maybe I do, I don't know the common part numbers), I don't know exactly what to order, and shipping is so expensive I kinda want to order all my next batch of electrics at the same time, not 2 op amps.
[*]You should now be getting pwm from the board pwm outputs. Ideally check with an oscilloscope, but a multimeter should be able to see 'something' happening (maybe also read frequency)
Well, something is happening.

However, my HVDC is fluttering all over the place. It was at 100v, but it's fluttering between 5v and 50v. This is right off the variac's supply's DC terminals.

It's only a 3amp variac, and my smoothing cap is only 47uF (what I had around), so, maybe this is suffocating the smoothing capacitor a bit? Shouldn't be, the inverter's main power cap should basically be in parallel with it, no?

... I connected a lightbulb in parallel with the HVDC output. It's on, and steady. But the same terminals it's connected to are wandering hugely.
[*]Send a 'stop' command
Well, fwiw, voltage stabalized back at 100v.
[*]Yes, that set of parameters does include udc offset and gain (which are hopefully pretty close to what you've got).
Indeed, they are.
[*]Now connect up the PWM outputs on the board to the PWM inputs on the inverter
Oops, had those from the start...
[*]Connect some HV (direct to the bus is fine, highly recommend some current limited supply - either a bench PSU or similar, or a battery with a filament bulb or oven element connected in series. You don't need massive voltage, 12V will do)
Oops, had it at 100v the whole time.
[*]The inverter should be making a whistling noise - this is the IGBTs switching
It might be so high pitch that I'm deaf to it (I've lost some upper range), but I don't hear anything.
[*]With nothing connected to the inverter, you should have 0 current on the HV line (any bulb shouldn't be lit). If you have significant current, you have shoot-through (+ve and -ve IGBTs turning on simultaneously) which should be impossible with the gen2 inverter...
My kill-a-watt knockoff says it went from ~5w on the variac input to 7w with no bulb on the HVDC, just the 3 on the phase outputs. So, sounds good.
[*]Motor next. Connect it up!
I'm too chicken, can't I test with the bulbs first and see them, I dunno, power up and flash around?

I'm not certain what use there was in having the bulbs in there. Just to be a litmus test for whether current would be flowing through them (bad) or not (good)?

I tried the first part of the motor procedure, spinning at 10hz with the lightbulbs... I could see a warbling voltage on the phase outputs, but no power was ever drawn to the bulbs.
[*]Power up, start, set fsplispnt/ampnom. You should be able to get the motor spinning by adjusting ampnom and fslipspnt - see the wiki. This may not work if your HV supply is too weak, but hopefully you'll at least be able to feel something while spinning the shaft by hand
...

Whelp, I lifted the motor up to the desk, removed the lightbulbs, and powered the HVDC off of a car battery (with narrow leads I could grab to disconnect as "fuses"). I can measure 12.6v on the HVDC inverter input terminals... but nothing happens. Nothing happens when it's supposed to be spinning at 10hz. No voltage on the phase outputs (so, it's not just that it can't move the motor, nadda is being sent). Twisted the shaft with my fingertips, can't detect anything different than off.

Tried setting my "udcmin" to 10v. No change.

Far as I can tell, nothing different with the setup than when I had the bulbs instead of the motor phases.

Reading ahead...

Following the wiki ( https://openinverter.org/wiki/Schematic ... _the_motor ), I'm not sure how to apply the context of the motor I'm using.

"'So for a DC bus voltage of 350V, a nameplate frequency of 60Hz and a nameplace voltage of 200V you get fweak=60Hz x (350V/1.41)/200V = 74.5Hz"

My test motor is the smaller of the two ACIMs from a forklift.

It says:

Image

Now, my DC bus, is that my test bus? Do I have to keep changing this every time I change my test setup?

Else, let's say DC bus is 100V.

Nameplate frequency is 85hz.

Nameplate voltage is 33vac.

So...

"fweak" = 85hz x (100v / 1.41)/33 = 363.2hz?

... but do I care what my namplate voltage was? Since, I'll be running the forklift motor at, I dunno, at least 200v?

Likewise, do I care what nameplate frequency was?

Or, is this exactly the purpose of this configuration - that we'll be running motors at way higher voltages than spec and need to account for that?

... Doesn't really matter, since even the simpler 10hz spin doesn't work.
[*]Hopefully by this point, you'll have confirmed that the board and inverter are both working and capable of spinning a motor. And gained a bit of confidence?
Nope, never got a motor to spin.

Confidence? Ehn, just in the certainty of having less vague instructions, yes, that helps a bunch. Haven't made much progress otherwise.

I could rig the variac to spin the motor, but I'm still to chicken to try it, if the 12v didn't do anything.

Thanks, btw, you and others, for taking the time to assist.
Post Reply