il1 and il2 are measuring phase currents. Since you're outputting AC, the currents swing from positive to negative. It's mostly magnitude, but if I remember correctly you might have to reverse the sign of il1 and il2 to make the FOC algorithm happy (don't quote me on that please).
-Isaac
Re: Prius Gen2 adapter board development thread
Posted: Tue Jul 28, 2020 8:06 pm
by imwoody36
im in. will make myself avail when you tell me.
FYI Im eastern time zone USA
I will need to learn how to do google hangout but I think no problem
may I propose tomorrow?
Re: Prius Gen2 adapter board development thread
Posted: Tue Jul 28, 2020 8:11 pm
by Jack Bauer
Sounds good.
Re: Prius Gen2 adapter board development thread
Posted: Tue Jul 28, 2020 9:05 pm
by ZooKeeper
Isaac96 wrote: ↑Tue Jul 28, 2020 7:51 pm
il1 and il2 are measuring phase currents. Since you're outputting AC, the currents swing from positive to negative. It's mostly magnitude, but if I remember correctly you might have to reverse the sign of il1 and il2 to make the FOC algorithm happy (don't quote me on that please).
-Isaac
Isaac, that was my point, we are running DC "backwards" thru one leg to calibrate the sensors. Should we expect a positive or negative value, IF that matters.
If my entry level understanding would be permitted, I too would be in for a Google meet as I am always open to Educational opportunities.
Re: Prius Gen2 adapter board development thread
Posted: Tue Jul 28, 2020 9:24 pm
by Kevin Sharpe
imwoody36 wrote: ↑Tue Jul 28, 2020 8:06 pm
im in. will make myself avail when you tell me.
ZooKeeper wrote: ↑Tue Jul 28, 2020 9:05 pm
I too would be in for a Google meet as I am always open to Educational opportunities.
Can you guys update this thread and the wiki once you get your issues resolved? It's important that we understand why you're having such problems so that we can help avoid them in the future.
Isaac96 wrote: ↑Tue Jul 28, 2020 7:51 pm
il1 and il2 are measuring phase currents. Since you're outputting AC, the currents swing from positive to negative. It's mostly magnitude, but if I remember correctly you might have to reverse the sign of il1 and il2 to make the FOC algorithm happy (don't quote me on that please).
-Isaac
Isaac, that was my point, we are running DC "backwards" thru one leg to calibrate the sensors. Should we expect a positive or negative value, IF that matters.
If my entry level understanding would be permitted, I too would be in for a Google meet as I am always open to Educational opportunities.
Right, sorry, I misunderstood the question. FOC might care, the slip control doesn't.
Have you tried making il1gain and il2gain negative?
(also you quoted me... how dare you )
Hopefully once someone has this system working we as a community can draft some documentation?
-Isaac
Re: Prius Gen2 adapter board development thread
Posted: Tue Jul 28, 2020 10:47 pm
by imwoody36
update, ac clamp ammeter on the U, V, And W wires to the motor during operation show 17 amps on two of them and almost zero on the U phase pin 31 of the board.
I would have expected much fewer amps based on how the equipment is sounding, and also all of them to be the same.
scoping the signal on pins 29,30 and 31 shows no pwm signal on pin 31 like the others.
however there is a signal going to the uln2003 driver IC and nothing coming out , even when that channel is unloaded.
looks like ive got a bad driver IC.
Re: Prius Gen2 adapter board development thread
Posted: Tue Jul 28, 2020 10:56 pm
by ascii-art
imwoody36 wrote: ↑Tue Jul 28, 2020 8:06 pm
im in. will make myself avail when you tell me.
ZooKeeper wrote: ↑Tue Jul 28, 2020 9:05 pm
I too would be in for a Google meet as I am always open to Educational opportunities.
I'd greatly appreciate it as well. Thanks for the offer!
Re: Prius Gen2 adapter board development thread
Posted: Wed Jul 29, 2020 12:07 pm
by imwoody36
amazon says my replacement driver IC will be here the 30th.
Im working simultaneously on a nissan leaf EV boat, Ill get the test jig connected this morning.
this is the only one I will put here about nissan. apologies for not on topic
Re: Prius Gen2 adapter board development thread
Posted: Wed Jul 29, 2020 1:04 pm
by Jack Bauer
the uln2003 is not a push pull driver so you would need to connect a small load like a resistor to see its output change
Re: Prius Gen2 adapter board development thread
Posted: Wed Jul 29, 2020 2:13 pm
by imwoody36
okay, can do easily. did try a second inverter already.
edit, just added a 470 ohm to ground..retested, still no signal.
its okay, a new driver will be here soon, and I can change it.
I have not dropped or shorted wires and there are no poor splices exposed, but I own the statistical probability that It was damaged in my care.
if I figure out what happened I will share.
Re: Prius Gen2 adapter board development thread
Posted: Wed Jul 29, 2020 3:01 pm
by Kevin Sharpe
imwoody36 wrote: ↑Wed Jul 29, 2020 2:13 pm
edit, just added a 470 ohm to ground..retested, still no signal.
The resistor must go from the ULN2003 output pin to 12V. If you connect the output pin to ground via a resistor then nothing will happen.
It's unlikely the driver chip is damaged. Check the connector pin soldering (no disrespect intended but some of the soldering looks 'suspect' in the video), connector pins, and the wiring loom carefully because that's the most likely problem here.
Re: Prius Gen2 adapter board development thread
Posted: Wed Jul 29, 2020 3:02 pm
by SciroccoEV
imwoody36 wrote: ↑Wed Jul 29, 2020 2:13 pm
edit, just added a 470 ohm to ground..retested, still no signal.
The ULN2003 is an open collector Darlington transistor array.
imwoody36 wrote: ↑Wed Jul 29, 2020 2:13 pm
edit, just added a 470 ohm to ground..retested, still no signal.
The resistor must go from the ULN2003 output pin to 12V. If you connect the output pin to ground via a resistor then nothing will happen.
It's unlikely the driver chip is damaged. Check the connector pin soldering (no disrespect intended but some of the soldering looks 'suspect' in the video), connector pins, and the wiring loom carefully because that's the most likely problem here.
yeah, it looks that way because I already revisited the soldering when it was not working.
Re: Prius Gen2 adapter board development thread
Posted: Thu Jul 30, 2020 3:34 pm
by imwoody36
amazon sent DIP instead of SOP package. had to reorder 2003 drivers. ( the side project with the nissan leaf driver worked practically out of the box)
RetroZero wrote: ↑Sun Jul 26, 2020 4:40 pm
BTW, relaoding the programme can be done with a ST Link V2?
Yes. Careful, there are apparently some fakes floating around -- if you get an STM32 Nucleo board those have an ST-link onboard (and also a spare STM32 chip).
-Isaac
St Nucleo board finally arrived today.....I will attempt to reload firmware this week end. Am I correct in thinking that the firmware is flashed via Nucleo?
RX and TX outputs on Nucleo connect directly to RX and TX of original ESP wifi module pins? Or do I need to flash directly via MCU TMS and TCK?
Re: Prius Gen2 adapter board development thread
Posted: Fri Jul 31, 2020 6:07 pm
by Isaac96
RetroZero wrote: ↑Fri Jul 31, 2020 5:11 pm
St Nucleo board finally arrived today.....I will attempt to reload firmware this week end. Am I correct in thinking that the firmware is flashed via Nucleo?
RX and TX outputs on Nucleo connect directly to RX and TX of original ESP wifi module pins? Or do I need to flash directly via MCU TMS and TCK?
I hope you're flashing firmware to the STM32 chip?
Had some success getting the Outlander motor spinning with the inverter!
Did the IL1 and IL2 current sensor calibration using a light bulb as a current limiter through the respective phase wires. Set syncoffset to 15000 as starting point from the Outlander motor thread.
With a 3A ID it runs in manual mode as shown on this video. Not sure if that is smooth or not since I have not seen this motor run on manual mode before. I will hook up the throttle tomorrow and hopefully see some smoother starts and stops.
Battery BMS showed a 3.5 amp drain on the battery so it seems pretty similar.
This is running at 48v. I hooked the inverter up to my Quad bike battery so that I could use the precharge system in that. It's also the only battery I have at the moment higher than 12v.
Video
Re: Prius Gen2 adapter board development thread
Posted: Sat Aug 01, 2020 11:15 pm
by johnspark
Jack Bauer wrote: ↑Tue Jul 28, 2020 7:49 pm
Ok. This ain't working. How about we do a google hangout or similar and I'll talk you all through it.
If you have not had the session yet, i would like to watch this as well thank you
Re: Prius Gen2 adapter board development thread
Posted: Mon Aug 03, 2020 11:30 am
by Bram
LRBen wrote: ↑Sat Aug 01, 2020 8:08 pm
Had some success getting the Outlander motor spinning with the inverter!
Did the IL1 and IL2 current sensor calibration using a light bulb as a current limiter through the respective phase wires. Set syncoffset to 15000 as starting point from the Outlander motor thread.
With a 3A ID it runs in manual mode as shown on this video. Not sure if that is smooth or not since I have not seen this motor run on manual mode before. I will hook up the throttle tomorrow and hopefully see some smoother starts and stops.
Battery BMS showed a 3.5 amp drain on the battery so it seems pretty similar.
This is running at 48v. I hooked the inverter up to my Quad bike battery so that I could use the precharge system in that. It's also the only battery I have at the moment higher than 12v.
Great work LRBen!
I have the same plans and equipment (with a 48V test powersupply). you are ahead, paving the way. Thank you.
unfortunate I'm stuck for a few days with the DESAT error. would you mind sharing Parameters, or your IL1 & IL2gain? Perhaps this solved my DESAT issue. Thank you, keep up the good work!
Re: Prius Gen2 adapter board development thread
Posted: Mon Aug 03, 2020 11:35 am
by Bram
Great work LRBen!
Have the same combination, willing to share Parameters? I'm stuck for days on my DESAT error
Re: Prius Gen2 adapter board development thread
Posted: Mon Aug 03, 2020 5:31 pm
by LRBen
Bram wrote: ↑Mon Aug 03, 2020 11:30 am
Great work LRBen!
I have the same plans and equipment (with a 48V test powersupply). you are ahead, paving the way. Thank you.
unfortunate I'm stuck for a few days with the DESAT error. would you mind sharing Parameters, or your IL1 & IL2gain? Perhaps this solved my DESAT issue. Thank you, keep up the good work!
My IL1 and IL2 gain were around 3.1. I am going to redo the current sensor calibration next weekend with 10 amps and 5 amps as I'm not entirely sure it is accurate enough at the moment. I did hook up the throttle on the Sunday but it wasn't all that successful. On the throttle pedal it does not always move, but when it does it will spin up to the same rpm as running in manual mode and also not stop once I release the pedal. I think it might be something to do with the throttle settings or the Il1/2 gain is off maybe?
Once I get the throttle working well I will share my parameters.
Bram wrote: ↑Mon Aug 03, 2020 11:30 am
Great work LRBen!
I have the same plans and equipment (with a 48V test powersupply). you are ahead, paving the way. Thank you.
unfortunate I'm stuck for a few days with the DESAT error. would you mind sharing Parameters, or your IL1 & IL2gain? Perhaps this solved my DESAT issue. Thank you, keep up the good work!
My IL1 and IL2 gain were around 3.1. I am going to redo the current sensor calibration next weekend with 10 amps and 5 amps as I'm not entirely sure it is accurate enough at the moment. I did hook up the throttle on the Sunday but it wasn't all that successful. On the throttle pedal it does not always move, but when it does it will spin up to the same rpm as running in manual mode and also not stop once I release the pedal. I think it might be something to do with the throttle settings or the Il1/2 gain is off maybe?
Once I get the throttle working well I will share my parameters.
Thank you!
Had the same throttle issue with my blue pill set up. the (induction) motor only moved until the test/manual Frequency, and throttle did not moved very linear. still need to figure out what it is, let you know once figured out.
Re: Prius Gen2 adapter board development thread
Posted: Tue Aug 04, 2020 9:33 am
by johu
In general it is hard to control motor speed of an unloaded motor with the throttle. Throttle input controls torque and of course very little torque will spin an unloaded motor up very fast. You can try using the idlespeed parameter for testing as well.