YA-HI (Yet Another Honda Inverter)

Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

As the subject suggests I am doing a drop in board for the HCH2 IMA inverter. Goal is 300v at 300A to drive the nuts off of a Hyundai HSG on a kart / bike.

My rough goals were:
Resolver input
Sufficiently isolated DC bus measurement.
Be safe enough to allow random oiks to operate it.
Be a standalone unit, I don't want a separate VCU if I can help it.

Plan is for it to be a direct drop in board. The likes of lebowski and Romale has been excellent inspiration, but I dislike using jumper wires from one board to the next. So direct mount PCB is what I am going for.
PXL_20250704_162749079.jpg
PXL_20250704_202918599.jpg
PXL_20250704_203051860.jpg
The lobotomised HCH2 inverter. Gate Drive circuitry still operates with 15v going to all the gate drive pins. Documentation suggests 16.5v but even before I modified the board mine was only ever 15v. (@12v in or 14v in still perfect 15v gate drive. I guess different revisions?
PXL_20250724_082411364.jpg
PXL_20250724_175011694.jpg
Haveing a 3d printer is instrumental to rapid prototyping. I can export the PCB in 3d and then rattle off copy of it in half an hour. Really helped line up mounting holes ect.

Mini mainboard fits but only with super low profile pin headers. I am using some from mil max that are nearly £1 per pin. It would be nice if the mini mainboards holes were enlarged to accept the much cheaper stacking headers but that's a different matter.

I am using a TI isolated volt sense IC (AMC0311SDWVR) for the main bus voltage sense. Isolate over 1kv sounds plenty fine for me.

I am figuring out the relay drives so will likely be a few questions relating to that over the coming days.
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Next update, got DC bus voltage sense all figured out.
3meg ohm R1 and 13k ohm R2 divider should give me full 2.2v scale at ~500 VDC.
DC_BUS_V_SENS.JPG
0 ohm resistor to give me the option to tune a low pass filter into the voltage isolator if I need to.
possibly overkill amount of decupling capacitors but as it sits directly over the IGBT modules I don't want to take chances.
DC_BUS_V_SENS layout.JPG
I am feeling pretty good about the HV layout. plan is to take ring terminals direct to the IGBT_1 DC BUS connection. run the wires down the side of the case and solder them into the resistor divider pickups.
DC_BUS_V_SENS 3D.JPG
HONDA IMA BOARD POGRESS 1.JPG
(Slightly older picture)
I am Slightly worried about the wemos wifi antenna proximity to the resolver excitation connector. but not sure where else to stick it. As all the contactor drivers are going to the left of the mini mainboard footprint.
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Finished board, (well nearly finished. i need to sprinkle some caps around the 5v and 12v rails, and look into setting up the board auto detection resistor)
main connector pinout.JPG
main connector pinout. combined error outputs with a selectable jumper as for a bike / kart I just want one big idiot light.
HSG_CONNECTOR_PINOUT.JPG
HSG connection, both cable shields going to the main PCB ground, maybe a poor idea for noise injection, will see.
Added in a DCDC connection with reverse protection diode.
finished layout.JPG
near final layout with relay drivers. hopefully not missed anything vital, as mentioned will have a think around some caps. I was thinking a few electrolytic's on the 12v and 5v busses and some additional decoupling MLCCs on each of the current sensors.
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

PCB has shown up.
PXL_20250811_111419259.jpg
Hopefully get it populated in the next few days.

Fingers crossed for no magic smoke.
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

So I couldn't really wait to do things. So like a kid at Christmas I stayed up till 2am playing with things.

PXL_20250811_171232023.jpg
Really nice alignment over the existing gate driver connections.
PXL_20250811_172730221.jpg
Showing the enlarged holes for the stacking headers I am quite partial to using.

PXL_20250811_172754423.jpg
I think this picture was me showing how the mini mainboards through holes could be enlarged to accommodate the stacking headers, would make diagnostic activities far easier. I suppose with Johannes looking to hand over HW activities will be for a future person to decide.

PXL_20250811_214535639.MP.jpg
Soldered in nicely.

PXL_20250811_230447112.jpg
It's alive. No motor spinny things yet but hopefully soon when the order arrives with the SMD components.

PXL_20250811_233000089.jpg
PXL_20250811_233237337.jpg
It fits back in the standard box, (which is good, the lid has all the DC bus film caps so it's pretty essential)
User avatar
johu
Site Admin
Posts: 6969
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 455 times
Been thanked: 1771 times
Contact:

Re: YA-HI (Yet Another Honda Inverter)

Post by johu »

Good work :)
Beggernator wrote: Tue Aug 12, 2025 9:29 am I suppose with Johannes looking to hand over HW activities will be for a future person to decide.
You don't have to wait, just hack away: https://github.com/jsphuebner/inverter-hardware (mainboard-mini.*)

You will need to find some old eagle version somewhere to open the file or alternatively import it into KiCAD
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Good work :)
Thanks. I am only letting myself celebrate once its moving stuff though :P .
How's the holiday so far?
You don't have to wait, just hack away: https://github.com/jsphuebner/inverter-hardware
That is actually where I got the eagle files to make the footprint I used in Altium. I just didn't want to make my own mainboard revision yet, wanted to have a working baseline first. plus I am not very trusting of swapping PCBs back and forth between file formats, I have been bitten before.


I am currently having some software issues with the web interface.
PXL_20250814_103247216.jpg
I have both 8266 and 32 variants of the ESP module. (allegedly pin compatible, not true, the rx and tx lines are swapped on the ESP32 despite being labelled the same so swapped that in software)

basically, ESP32 interface is nice snappy and works as expected. but it takes over 5 mins for the WIFI AP to show up on any of my devices.

ESP8266 wifi AP shows up instantly. but interface is pretty slow and some elements on the main page never load, plus I get coms dropout messages semi frequently when graphing or setting parameters.
hubner inverter picture..PNG
Ideally I would fix the ESP32 loading times, I don't have an RTC or an SD wired in so is it possible thats slowing the boot process down?
Attachments
hubner inverter picture 2.PNG
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Vary busy Saturday.
Got inverter working.
Bricked software update going to foc so had to get the st link out.
But resolver connections were right first time so win some lose some.

Very rough syncoff tune didn't have any inverter cooling so didn't push it past 60A

Runs on the throttle pedal but jolts into self acceleration over a certain rpm so is probably the sync offset not being 100%

Alarmingly the estop doesn't seem to do anything. I have wires it up and tested it. In the spot values it changes from OK to ERROR when push but it doesn't stop the pwm output.
Any help / insight on that would be great. Really don't want to put it on anything till the estop works.

Other then that going nicely.
Attachments
PXL_20250815_232309543.jpg
User avatar
johu
Site Admin
Posts: 6969
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 455 times
Been thanked: 1771 times
Contact:

Re: YA-HI (Yet Another Honda Inverter)

Post by johu »

Oh shiet. Estop triggers hardware PWM stop. But... During the chip crisis the 3-channel nand became unavailable so I disconnected estop and used a 2 channel one. Then never reverted the change...

So first SW task for new maintainers: software stop when estop goes low.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Ah thanks, I did think it was a tad strange.
How's the holiday going?

Has a new maintainer been found? or is that still in the works?

I have noticed a few other oddities, motor feels like mechanical grinding in reverse when inverter is enabled, both moving it by hand or with throttle command. but with inverter in standby mode it feels flawless. possibly sync offset thing.
However I did see a development firmware that applied sync advance twice in reverse to solve some issues, don't know if that applies here?
The sync offset tuner does nothing, but putting manual id in from parameters still works

My ESP32 module now refuses to show a web page connected or unconnected to the mainboard, will try and troubleshoot that another time. for now am back to the 8266.
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Yeah deffo sync offset needs better tuning. swapped 2 resolver wires. then had to swap 2 motor phase wires, strange notchy mechanical feeling now in opposite direction. motor turns the other way in forward and sync offset re-tuned to be approximately 32000 more, so reversed as expected.

not sure how to do better sync offset tuning as motor has really strong cogging. 62000 gave me very slow counter clockwise at 50A and 56000 gave me very slow clockwise at 50A . going up to 100A didn't get much movement after that.

Currently only testing at 50V will put another VW module on charge to test again at 100v see if that helps.

video of current progress, (I added a second clamp after this)
User avatar
manny
Posts: 165
Joined: Sun Jan 23, 2022 4:15 pm
Location: Netherlands
Has thanked: 38 times
Been thanked: 126 times

Re: YA-HI (Yet Another Honda Inverter)

Post by manny »

Have not seen you settings.

But the motor speeding up, is probably a result of not having sync offset right and having field weakening on.
If you set fwcurmax to zero. I should stop the motor from taking off.

This is not a permanent solution but for testing it might be helpful.
[DRIVING] Citroen Saxo electrique
  • Volvo ERAD motor, XC90 inverter/DCDC (custom OI board)
  • PSA battery (50kWh)
  • Foccci and MG ZS charger 6.6kW
  • Zombie VCU
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Thanks, I figured it was sync offset field weakening related as it was a fixed rpm it took off at. I hadn't considered just turning field weakening off. It's a good suggestion, I will try later.

I have 2 other VW Passat modules on charge so can try throwing some more voltage at it during manual tuning.

Only other thing I can think of is motor parameters, it's a fairly unusual motor compared to larger EV motors and I have left alone motor values at default.
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Oh shiet. Estop triggers hardware PWM stop. But... During the chip crisis the 3-channel nand became unavailable so I disconnected estop and used a 2 channel one. Then never reverted the change...
Have been thinking about this, looking at the schematic. Did you just change the part or did you change footprint and layout. It's possible the easiest thing for me to do is swap the ICs if everything else is the same.

If that's a non starter, different footprint / layout ect, then I could tie it into the over current line.

Other option is to loop the estop into the main 12v relay control loop so kills power to everything.

Does the controller logic look for estop status at all during startup? Need to know if I should tie it to +12v if not used. / I implement it differently.

Thanks
Tom.
User avatar
johu
Site Admin
Posts: 6969
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 455 times
Been thanked: 1771 times
Contact:

Re: YA-HI (Yet Another Honda Inverter)

Post by johu »

It's a footprint change as the pinout is quite different :?
Easy option is to cut off the direction signal to put it into neutral. Not really equivalent but somewhat
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Ah ok no worries,

I was mounting a 3 position switch for forward - neutral - reverse within driver reach so that works, will verify kicking it into neutral stops operation then I will remove estop.
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

So I have some progress.
Running on 100v now I got brave and set manual id of 150A. I got no motion from the motor with sync offset values from 58500 to 60500 so still a very large range. and I only get moments of runtime at 150A on the motor (haven't hooked up cooling yet, it really needs it, inverter barely got warm.)



No field weakening gave expected result of making the motor controllable. but not exactly exciting performance.



still getting runaway with field weakening but its a bit more controllable now. this was with sync off at 59480 just changing it by 20 at a time and seeing what seemed happiest.

Any suggestions apricated. I don't know if anyone else has tried to tune a Hyundai HSG before.
User avatar
johu
Site Admin
Posts: 6969
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 455 times
Been thanked: 1771 times
Contact:

Re: YA-HI (Yet Another Honda Inverter)

Post by johu »

Well field weakening without any load is bound to overspin. Wouldn't worry too much for now and recheck with load
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Thanks, I am used to SPM and BLDC motors where field weakening is just a nice little extra rpm at the end not a core operating principle.

I pushed the frequency limit up from the default 200hz to 300hz and it got stuck at max rpm so is clearly still something going on.

Out of interest the speed limit in HZ is that ERPM or motor RPM? the documentation doesn't specify.

Will get it mounted to the kart frame so I have some brakes I can use to load the motor.
User avatar
johu
Site Admin
Posts: 6969
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 455 times
Been thanked: 1771 times
Contact:

Re: YA-HI (Yet Another Honda Inverter)

Post by johu »

Erpm
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Thanks,
Based on that I think 700hz is the final value I will use but will slowly work up to it.
(motor is 3 pole pairs and rated to 14000 RPM).

I have been looking at motor tuning in a bit more depth. I left Kp and Ki at the default 32 however for my motor inductance and voltage it looking like they should be much higher, around 250 and 4800 respectively. how much of an effect would this have on the motor tuning issues?

I did some digging on my exact motor and didn't find all that much.
https://isopack.blogspot.com/2017/08/mt ... BK6M0f674

He suggests λ=0.053, Ld=0.6mH, and Lq=1.47mH, but that is for the 2012 sonata HSG which had flat plate magnets.
ORNL Sonata HSG.JPG

The ioniq HSG appears to have an identical stator but different rotor.
Ionic HSG rotor.JPG
Ionic HSG stator.JPG

According to Buildits build log the motor measures the exact same for its critical values.
The kart originally used a pair of 2012 Sonata Hybrid HSG's. 2 years ago I got one of the Ioniq HSG's to tear down and take some measurements on (this project has been brewing for a while), and found that the terminal measurements (resistance, inductances, back-emf) were identical to the older Sonata HSG's, but the motor was slightly smaller and a couple kg's lighter.
in my mind the different magnetic layout would have a large affect on the motor inductance, unless of course they specifically designed the new rotor to mimic the old one, but that would sort of remove the point of a redesign.


Anyway I didn't want to mess with the MTPA base values in open inverter till I was happy I had sync offset correct but in this case where the values are so far from the default it might help?
jrbe
Posts: 653
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 266 times
Been thanked: 186 times

Re: YA-HI (Yet Another Honda Inverter)

Post by jrbe »

Beggernator wrote: Wed Aug 20, 2025 10:26 am in my mind the different magnetic layout would have a large affect on the motor inductance, unless of course they specifically designed the new rotor to mimic the old one, but that would sort of remove the point of a redesign.
I think the newer ones have skewed rotors / stators which also likely effects motor tuning.

Curious if you'll open source / share the board files when done?

If you decide later to use KiCad there's a few footprints and stuff in my GitHub for the gen3 leaf board (not fully operational yet..) or feel free to reach out if they're not easy to extract, I could send the library files if needed.

There are a few things to consider on the mini mainboard that I'm not sure were corrected or considered. I think they may be relevant for you.
- chamfered and radiused corners for orientation reference (optional but would help.)
image.png
- can bus transceiver slope / slew pin connection missing? viewtopic.php?p=41112#p41112
I should likely add these as requests on github if they are still open.

Some other struggles were:
- the ESP32 pulling a surprising amount of power when sending wirelessly.
- some 3.3v linear regulators with awful voltage dips within their claimed current ratings browning out the esp32.
- ESP32 startup timing delay interfering with OI logic. Startup timing does matter but not sure on the exact details / why. I used the recommended startup delay circuit for the esp32 (from esp32 datasheet) and there were startup issues. Johu changed the startup resistor / capacitor on the gen 3 leaf board to get boot and wireless communication working.
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

Hi Thanks for the reply.

I have tried tuning the motor both forwards and backwards by swapping resolver and motor phases. seems pretty consistent. but I am lucky in that my application rotation direction is the same as the OEM one (counter clockwise)

Yeah plan is to open source the files once I confirm that they work as intended. was tempted to only sell them, but the whole reason I went this route was because I was unhappy with an individual who did a Lebowski brain board and charged an excessive amount of money for it.
Likely will release files but sell a few pre populated boards if there was any apatite.
Few things I would change are:

Dedicated auxiliary 5V PSU and 3.3V regulator for throttle and Coms module.
multiple footprint options for coms module.
Include an SD card slot and RTC IF I ever get the ESP32 interface to work.
Better pin count, was a few functions I omitted.

So far I am happy with my isolated voltage measurement circuit. only had it at 100v but it did that no issues and it holds calibration.

I have used kicad on other projects, I used Altium on this one as I have access to and its what I am most used to using at work. I wouldn't say no to anything you have library wise incase I swap back, kicad makes it easier for open source designs.

Its interesting you had so many issues with the ESP32, I have temporarily given up on mine as it really wasn't playing nice for whatever reason. possible I have flashed it wrong. will come back to it at a later date.

As for the recommended mini mainboard changes I will have a think. what with the estop issues I am tempted to do a community revision of it. Not a right now problem however. might be a fill my time type thing over the winter. I do agree mounting direction indicator would be good. I am personally also interested in adding physical mounting points and enlarging the header mounting holes so I can use removeable pin headers I like and still have a physical form of attachment for the board.

I think if I do decide to do that I will start a new thread for it.

But first I want to get my project running then I will have a platform to stress test my V1 board and I can go from there.
Beggernator
Posts: 40
Joined: Wed Dec 20, 2023 5:11 pm
Has thanked: 12 times
Been thanked: 25 times

Re: YA-HI (Yet Another Honda Inverter)

Post by Beggernator »

So, time to continue fighting the tuning, I have been coming up with what I think might be a bad way to validate Syncoff.

In one of Pete9008s post he says :
If you are coasting (no throttle or regen, torque request of zero) then iq and id will be zero. If syncofs and syncadv are correct then vd will also be zero and only vq will be non zero (oops, sorry looks like I mistyped in the text quoted above).

So if you are coasting and vd is zero you can use the value of vq to calculate flux linkage.

If vd isn't zero then syncadv or syncofs are out, vq is coupling into vd and so any measurement/calculation based on vq would be wrong. Vd being zero is mostly a sanity check on the sync setup.
So I was thinking is there a way for me to easily see Vd? I can set regen to 0 spin the motor up with a drill and theoretically give myself a much better indication of how correct my sync is.
User avatar
manny
Posts: 165
Joined: Sun Jan 23, 2022 4:15 pm
Location: Netherlands
Has thanked: 38 times
Been thanked: 126 times

Re: YA-HI (Yet Another Honda Inverter)

Post by manny »

Think this is problematic because two variables need to be correct to get 0 Vd.

You can plot Vd on the web interface.

I tried this, and this is what I got:

When changing syncofs:
Screenshot_20250712_103309_Chrome.jpg
note that at the point I stopped accelerating Vd goes to 0 but during the deceleration it rises a bit.

When changing syncadv:
Screenshot_20250712_162840_Chrome (1).jpg

A different way to get the syncofs is to apply limited current to the motor externally.
Phase A to the positive and phase B and C to the negative, the rotor should lock in place. And then plot the angle value on the web interface . Adjust the syncofs until the angle reading jumps from ~0 to ~360

This is a part of test setup I tried to measure the motor parameters.
viewtopic.php?p=67688#p67688
[DRIVING] Citroen Saxo electrique
  • Volvo ERAD motor, XC90 inverter/DCDC (custom OI board)
  • PSA battery (50kWh)
  • Foccci and MG ZS charger 6.6kW
  • Zombie VCU
Post Reply