Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 05-28-2018, 01:01 PM   #3221 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 746
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by pablitosax View Post
This idea for a hub motor was apparently good because could be adapted to any rear drum brake (plug & play) , but , again the permanent magnets and reluctance have ruined the development:
"hub motors with permanent magnets are not the best technical solution " :

Green Energy Management (GEM) Updates | Middle Tennessee State University
I have read about many hub motors in the past. The hub motors on bicycles and motorcycles seem to be solid. They have bearings on both sides of the hub and this appears to make a difference to reliability. That said, there are not many bicycles or motorcycles with 100,000 miles on them.

So far, all the hub motors that I have read about or seen videos on ... that are supported on one side only ... when you can get details about reliability at all ... seem to experience catastrophic failure before the first set of tires is worn out. Most of the prototypes just seem to disappear and no one wants to talk about them .. or even admit that there was a prototype at all?

The clearances on the motor do not appear to allow for much bearing wear. The wider the motor, the further the rotor is from the bearing. Plus, of course, there is no suspension on the wheel. When the rotating part meets the stationary part ... bad things happen

I'd love to be proven wrong on this one - it's such a practical idea to move the motors out of the vehicle and contain them within the wheels, get rid of the transmission, the extra weight ... there are just so many positives!

__________________
In THEORY there is no difference between Theory and Practice
In PRACTICE there IS!
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 06-21-2018, 06:57 PM   #3222 (permalink)
EcoModding Lurker
 
Join Date: Mar 2018
Location: Sacramento, CA
Posts: 17
Thanks: 9
Thanked 4 Times in 4 Posts
Sorry for the delay, you know how life can be

I was able to get some probes on my three current sensor (L31S200S05FS) outputs and take some basic captures while attempting to throttle up.

These are taken right at the J8, J11, and J14 terminals, which explains the dirty signal. I also quickly checked the spectral contents of one of these signals, and it looks like the (relatively) high frequency is primarily at ~10kHz. I'm not sure where this is coming from, as the ATTiny should be either 62.5kHz or 100kHz; I'll have to do another FFT, this time up to around 200kHz. I'll also verify (again) the output of the ATTiny to make sure it's not acting funky.

I'll follow up with some pics of my setup as well in case there's anything obvious that I'm missing. Here's a link to a short clip I took of myself attempting tho throttle up a few times: https://streamable.com/a6heg

I've got too much invested in this not to see it though to the end
Attached Thumbnails
Click image for larger version

Name:	1_A.png
Views:	110
Size:	101.5 KB
ID:	24437   Click image for larger version

Name:	1_B.png
Views:	74
Size:	108.2 KB
ID:	24438   Click image for larger version

Name:	1_C.png
Views:	74
Size:	118.5 KB
ID:	24439   Click image for larger version

Name:	2_A.png
Views:	50
Size:	80.0 KB
ID:	24440   Click image for larger version

Name:	2_B.png
Views:	55
Size:	82.1 KB
ID:	24441  

Click image for larger version

Name:	2_C.png
Views:	40
Size:	22.4 KB
ID:	24442   Click image for larger version

Name:	3_A.png
Views:	24
Size:	69.6 KB
ID:	24443   Click image for larger version

Name:	3_B.png
Views:	98
Size:	85.5 KB
ID:	24444   Click image for larger version

Name:	3_C.png
Views:	53
Size:	85.7 KB
ID:	24445   Click image for larger version

Name:	3_D.png
Views:	58
Size:	89.4 KB
ID:	24446  

Click image for larger version

Name:	4_A.png
Views:	54
Size:	70.6 KB
ID:	24447   Click image for larger version

Name:	4_B.png
Views:	17
Size:	73.3 KB
ID:	24448   Click image for larger version

Name:	5_A.png
Views:	20
Size:	79.1 KB
ID:	24449   Click image for larger version

Name:	5_B.png
Views:	47
Size:	84.2 KB
ID:	24450   Click image for larger version

Name:	5_C.png
Views:	16
Size:	67.0 KB
ID:	24451  

Click image for larger version

Name:	FFT_and_500HzLPF.jpg
Views:	66
Size:	90.9 KB
ID:	24452  
  Reply With Quote
Old 06-21-2018, 11:40 PM   #3223 (permalink)
EcoModding Lurker
 
Join Date: Mar 2018
Location: Sacramento, CA
Posts: 17
Thanks: 9
Thanked 4 Times in 4 Posts
Here are some pics of my setup. I'm not sure if the method I'm using for the motor phase connections is okay. From what I can tell, the EM57 has the inverter mounted directly above the motor with bars going down into it. This doesn't use cables, so I ordered and cut some copper bars myself.

Once things are more functional, I'll put together an enclosure and mount things which should let me shorten a lot of those wires. Maybe I'll consolidate them into a connector(s).

Paul's encoder-resolver board seems to be wired up and working properly. I believe I've verified this, due to seeing one mechanical revolution cause poscnt to go up to 512 four times
Attached Thumbnails
Click image for larger version

Name:	IMG_20180618_225222.jpg
Views:	150
Size:	40.5 KB
ID:	24470   Click image for larger version

Name:	IMG_20180618_225259.jpg
Views:	115
Size:	40.1 KB
ID:	24471   Click image for larger version

Name:	IMG_20180618_225311.jpg
Views:	168
Size:	109.6 KB
ID:	24472   Click image for larger version

Name:	IMG_20180618_225321.jpg
Views:	97
Size:	111.8 KB
ID:	24473   Click image for larger version

Name:	IMG_20180618_225613.jpg
Views:	98
Size:	51.6 KB
ID:	24474  

Click image for larger version

Name:	IMG_20180618_225623.jpg
Views:	139
Size:	84.4 KB
ID:	24475   Click image for larger version

Name:	IMG_20180618_225635.jpg
Views:	114
Size:	76.1 KB
ID:	24476   Click image for larger version

Name:	IMG_20180618_225645.jpg
Views:	127
Size:	45.3 KB
ID:	24477  
  Reply With Quote
Old 06-22-2018, 03:00 PM   #3224 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
Have you checked that the 6 isolated supplies are all getting about 23.5v or whatever? Also, have you loaded the .hex file with the #define DEBUG uncommented? That's a good way to verify that the PWM signals from all 6 drivers are making it through to the other side. Make sure the current sensors are also facing the arrow pointing away from the IGBTs. I'll check your picture in a sec to check that if I can.
__________________
kits and boards
  Reply With Quote
Old 07-05-2018, 11:11 PM   #3225 (permalink)
Ale Madeo
 
ale0502's Avatar
 
Join Date: Jan 2016
Location: Bariloche Patagonia Argentina
Posts: 32
Thanks: 22
Thanked 7 Times in 5 Posts
pwm frecuency

Hi,
I understand that the pwm frecuency must be 10KHz, but on my board is about 3KHz.
My crystal is 8MHz.
What could be wrong?
Thanks
__________________
Los que dicen que es imposible, no deberían molestar a los que lo están intentando...
  Reply With Quote
Old 07-07-2018, 12:49 PM   #3226 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 746
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by ale0502 View Post
Hi,
I understand that the pwm frecuency must be 10KHz, but on my board is about 3KHz.
My crystal is 8MHz.
What could be wrong?
Thanks
The AC Controller had an upgrade a while ago that changed the PWM frequency from constant to a sort of 'white noise' signal that makes a 'SHHHH' sound. I think the frequency varies from 2 KHz to 10 KHz to do that. But I don't know what triggers the change in PWM frequency.

Why do you think that 3 Khz is wrong? Is it not working? The PWM frequency has some effect on efficiency and motor speed control ... but as far as moving your car it should make no difference at all.

Is the noise bothering you? Does it stay at 3 KHz while you drive?

And, is it connected to a motor and driving your car, or are you still testing and it is on your work bench?
__________________
In THEORY there is no difference between Theory and Practice
In PRACTICE there IS!
  Reply With Quote
The Following User Says Thank You to thingstodo For This Useful Post:
ale0502 (07-07-2018)
Old 07-07-2018, 01:37 PM   #3227 (permalink)
Ale Madeo
 
ale0502's Avatar
 
Join Date: Jan 2016
Location: Bariloche Patagonia Argentina
Posts: 32
Thanks: 22
Thanked 7 Times in 5 Posts
pwm frecuency

I have my motor on a test bench.
On Paul´s code say:
// PWM Initialization

PTPER = 1474; // 29,491,200/((PTPER + 1)*2) = 9997Hz.

I think my pwm resolution is bad.

I change PTPER value but I didn't get better results.
On dspic datasheet say:


thanks
__________________
Los que dicen que es imposible, no deberían molestar a los que lo están intentando...
  Reply With Quote
Old 07-07-2018, 10:36 PM   #3228 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 746
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by ale0502 View Post
I have my motor on a test bench.
On Paul´s code say:
// PWM Initialization

PTPER = 1474; // 29,491,200/((PTPER + 1)*2) = 9997Hz.

I think my pwm resolution is bad.

I change PTPER value but I didn't get better results.
On dspic datasheet say:


thanks
I have not checked the code I'm running. But I expect that Paul has not changed that in some time. I ran through the numbers in the code snippet and I get 9997 Khz as well.

The scope trace I will have to ask some questions about. I see that the 3 channels are all set to 5.00V per division. The time scale shows what looks like 1.00 ms. So each horizontal division should be 1 ms - right? -5 ms to +5 ms is your horizontal scale.

The narrowest of the pulses is far less than 1 ms. It could be near 0.1 ms, which is what would be expected at 10 KHz. I don't see anything that appears to be 3 Khz, or a period of 0.33 ms. What am I missing?

Are your cursors the dotted lines at -1.6 ms and +2.56 ms? I see the values on the right for Type - time, Source Ch1, Delta of 4.16 ms.

Can you capture the signals that are 'wrong' for us and post that picture, with your cursors showing the timing? I'm still confused about what is wrong.

As far as I can see, your board is working beautifully?
__________________
In THEORY there is no difference between Theory and Practice
In PRACTICE there IS!
  Reply With Quote
Old 07-18-2018, 12:54 AM   #3229 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 746
Thanked 565 Times in 447 Posts
Preliminary Doc

Hi everyone

Here is the text of my first cut at a manual .. of sorts ... for Paul's AC controller.

Take a read if you have some time. Looking for some constructive criticism to make it better .. along with a location to post the version after i get some pictures and perhaps video added.

Can you put pictures and video in a WIKI? Maybe as part of the GitHub repository?

----------------------------------------------------------------------------------

Introduction

This scope of this document covers power up of a tested AC Controller, cable locations, general wiring, using a computer to configure the AC Controller, and tuning of the controller to work with a specific motor at a specific voltage.

The description is not step-by-step. There are likely things further in the description that would be nice to know before you start. So I recommend reading through the whole document before you start. The AC Controller is quite robust, but it does not protect itself from all mistakes.

This document will be updated by many authors. Keep in mind that everyone interprets things differently, and that what made perfect sense to the person describing what was done ... may not make perfect sense to you.


The AC Controller

The contoller board that I am using is shown below

PICTURE OF AC CONTROLLER BOARD

The various connectors that interface outside the controller are labeled.

With nothing else connected (throttle, Battery pack, contactors) apply 12V from a battery or a power supply to the DC/DC converter. This supplies 24V to the controller board and the IGBT drivers. I have a 5A fuse on the 24V output of the DC/DC converter and a 10A self-resetting breaker on the 12V input to the DC/DC converter.

When you power up the 12V, you should hear a click from the pre-charge relay. About 5 seconds later the main contactor relay should click on and the pre-charge relay should click off. This is your first milestone.

If you have trouble getting any click at all, check the appendix for troubleshooting.

Turn off the AC Controller


Computer Interface

After the relays are working, it is time to connect your computer to the controller. This is not absolutely required. You can skip this part and still get everything running. But you can' change anything without the computer. If your controller is already set up, the serial output is still useful to point out what is not running.

Power down the AC Controller

Power up your computer. Connected to the controller with a serial cable. If you are suing a 9 pin serial connector, the cable wiring is shown below


This works for an expernal USB to serial converter as well.

Using whichever terminal program you choose, connect to the serial port at 115,200 baud, no parity, 8 data bits, 1 stop bit

I use hyperterm. My USB to serial converter is at COM7. And I use the VT100 emulator built into hyperterm. These are just selections when you open a connection in hyperterminal.

When your terminal program is connected, power up the controller. The relays click for precharge and main contactor. Then you should see this on your terminal

AC Controller version 1.0

It should also show an error for the throttle, that it is lower than minimum, and ask if it is connected. But it is not, not yet.

This is your second milestone.

If you have trouble getting anything to display, check the appendix for troubleshooting.

you should be able to type in commands. config and return will show you how your controller is configured right now. there are a lot of settings, but the defaults are all reasonable and you don't need to even know what they are for unless you need to change them.

my controller looks like this



Turn off the controller.

Now it's time to connect your throttle. My board is set for 0 - 5K ohms input, 0 = stop and 5K = max speed. I have one end of the throttle connected to 5V, the other to 0V and the wiper connected to the throttle input. These are all on the 3 pin header as labeled.

With an ohm-meter, you should be able to figure out which way your throttle works. We are not using the relay contacts on the throttle if you have them.

Power up your controller. You should hear the clicks, see the AC Controller version 1.0 message, and there should not be a throttle error.

Now we are going to check out the throttle signal. type in these commands, one line at a time, with an ENTER after each one



After the last one, lines will start to scroll on your terminal and will look something like this


We are looking at the raw throttle signal, a number from 0 - 1023 that represents 0V - 5.0V and the scaled throttle signal, which is a number from -16000 to +16000 which is sent to the controller algorithm, which converts that to the pulses sent out to the motor.

When you change your throttle, the numbers change. It is a good idea to write down what the raw throttle signal is when the throttle is released and when it is at maximum. This value will change a little bit with temperature, and over time. So we don't use that number EXACTLY.

Here are my numbers. I set up my throttle for single direction (the motor won't go reverse at all) which is good for a manual transmission that has a reverse gear.

Minimum 121
Maximum 968

So with these numbers, I changed the settings below

Fault
Max rev
Min rev
Min fwd
Max fwd

So of the throttle signal is below fault, the controller shuts off and the motor coasts
Between Fault and Max rev it runs at maximum reverse. I don't want reverse, so I put Max rev below Fault
Min rev is also below Fault
Anything between Fault and Min Fwd does nothing. It is coast
And between Min Fwd and Max Fwd is a linear increase in torque (NOT SPEED) for the motor. You can go over your max speed if you are going downhill. This is kind of important to remember

SAVE

The changes in the configuration are now saved.

If you want to check the output of the controller, you can put your voltmeter, on the AC range that you have that is safe for 24VAC (I use 200VAC range on mine) and connect it on the posts of one IGBT as circled below

When you press the throttle it should change from 0V to some higher voltage. The value is not really important, but it should change for a couple of seconds when you press the throttle.

This is your third milestone. The controller is putting out control signals.

If you have trouble getting any voltage output, check the appendix for troubleshooting.

Turn off the controller

Now we connect your battery pack. It needs to be at least 24V DC, even for testing. It can be up to 400V DC. The IGBTs are rated for 600V, but there are fast voltage changes that use up that extra voltage. It is best to keep the battery voltage at 400V or below.

We don't need to connect the motor yet.

You should be using a pre-charge contactor with a resistor that charges up the big capacitor within a couple of seconds and a main contactor that does not use any resistor at all. The basics are shown below. But you can add extra fusing, contactors, etc as you wish.

Set your throttle to minimum and power up the controller. You are familiar with what you will see and hear by now.

Connect your voltmeter between U and V terminals, with the setting for AC voltage and as high as your battery pack is - say 200VAC.

Press the throttle and you should see the voltage rise from 0V to some other number. It does not continue to rise since you have no encoder signal. It will only try to run the motor for a short time without an encoder signal. Some versions of the firmware will continue to run at a very slow speed with no encoder signal to show that the controller is working, but the encoder has failed.

This is your fourth milestone. The controller is putting out power signals.

If you have trouble getting any voltage output, check the appendix for troubleshooting.

Turn off the controller

It is time to connect your encoder. Not the motor, just the encoder.

Wire up the A, B, GND as shown on the controller board. The output of the board is 5V. And it expects that the return signal is 5V or under. I have had to power up encoders with higher voltage and then step down the voltage on the signal to under 5V. It just takes some extra time. Having a 5V signal is best.

When the encoder is connected, turn on the controller.

Type in these commands to see the encoder signal


It will look something like this on your computer

Turn the motor shaft by hand and it should change, like this.

If it doesn't change, check the voltage to your encoder is good, and that you are getting a changing signal from your encoder. 24VAC setting on your meter, between terminals A and GND, or B and GND,

If got to here, write down the encoder number, then turn the motor on e revolution or as close as you can get. Write down the encoder number again. This is your pulses per revolution. Actually, it is 4 times your pulses per revolution. Divide that number by 4 and put into this setting

pulse-per-revolution=

SAVE

Now the controller knows how many pulses to expect each time the motor turns once.

This is your fourth milestone. The controller is putting out power signals.

If you have trouble getting any encoder signal, check the appendix for troubleshooting.


Turn off the controller

Time to check how your motor is wired.

At the motor, the 3 terminals should show about the same resistance from U to V, V to W and W to U. This is good.

There should be very high resistance between each of the terminals and the metal outside of the motor. This is good.

If the resistances are not about the same, or there is under 1000K ohms between a motor terminal and the metal outside the motor, do not connect this motor to your controller. It could damage the controller.

It is finally time to connect your motor to the output of the controller.

Connect U, V and W to your motor leads. If the motor leads are not labeled, choose which wires go where to make it easy to wire up, with no wires crossing if you can. Then label the motor wires.

When all is tight and you are ready to go, power up the controller

After the controller is powered up and ready, press the throttle a bit. The motor should hum or turn. It won't be smooth, but you should see or hear something.

If the controller faults, the motor may not be internally wired the way the controller expects it to be.

This is your fifth milestone. The controller does something with the motor connected.

If you have trouble getting any sound or motion from the motor, check the appendix for troubleshooting.

Turn off the controller


Tuning the controller

You have your motor connected to U, V and W terminals, the encoder is connected, the throttle is connected, and your computer is connected and running your terminal software.

Power up the controller and see the firmware version

There should be no throttle fault

Type in the following command, as shown

KP=1000
KI=20
RUN-PI-TEST2

There should be a very brief hum, and the output from the screen should look something like this

We are running a short test with the settings we have chosen, to determine if the output 'converges' to 0. If you take the output, copy and paste to excel, then generate a graph with the values on the Y axis and the line numbers on the X axis, you will see a graph like this

What you are trying to come up with are settings that make the graph fall to 0 as quickly as possible but go negative as little as possible. Here are some examples from my motor and my controller

These include Kp and KI too low

Kp and KI too high

KP an KI about right

For simplicity, we are using simple division on KP to get KI. When you get about right, you can increase or decrease the numbers individually to get slightly less negative, or drop the time just a bit. KP / 50 seems to work for most motors that have been tested.

remember to SAVE when you are done!

When you change your pack voltage, like changing from 24V for testing to 144V in your vehicle ... you need to run the tune again. The numbers that you saved will run, but different numbers will give less overshoot (negative) or a shorter time to 0V (convergence)


This is your sixth milestone. The controller does the basics - drive your motor smoothly.

If you have trouble getting convergence on your motor, check the appendix for troubleshooting.


Fine tuning of the controler

This section is a bit larger, involves more settings, and is very subjective. You are making the controller YOURS. It will decelerate how YOU want it to. You can configure it for one-pedal driving, where letting off on the throttle gets you mild to aggressive regenerative braking. You can change how responsive the vehicle is for the throttle, the time it takes to go from no torque to maximum torque. Careful with that one - you can wreck gearboxes, CV axles, drive shafts, clutches ... with too much torque too fast.

.. to be continued ...
__________________
In THEORY there is no difference between Theory and Practice
In PRACTICE there IS!
  Reply With Quote
The Following 4 Users Say Thank You to thingstodo For This Useful Post:
esali1987 (12-26-2018), freebeard (07-18-2018), pablitosax (07-18-2018), Piotrsko (07-19-2018)
Old 07-19-2018, 04:28 PM   #3230 (permalink)
Somewhat crazed
 
Piotrsko's Avatar
 
Join Date: Sep 2013
Location: 1826 miles WSW of Normal
Posts: 4,374
Thanks: 528
Thanked 1,194 Times in 1,054 Posts
Spelling? Suing a 9 pin connector?

Well done, otherwise.

__________________
casual notes from the underground:There are some "experts" out there that in reality don't have a clue as to what they are doing.
  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
Paul & Sabrina's cheap DIY 144v motor controller MPaulHolmes Open ReVolt: open source DC motor controller 7381 08-02-2023 11:55 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 10:09 PM
Contest! Name Paul & Sabrina's controller MetroMPG Forum News & Feedback 120 10-22-2011 02:59 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com