## Shenzhen (ecrazyman) Controller Information

Archive of useful information. This is not a discussion area.

### Re: Shenzhen (ecrazyman) Controller Information

You are one sick dude! Did you figure this out by testing or in your mind?

The7 wrote:
Knuckles wrote:I had a discussion on phase/hall wiring with a forum member. He said there are 36 possible combinations.
I disagreed. I say there are only six possible combinations. I was close but not exact.

I concur with you that you don't need to test all the 36 possible combinations.
It is only needed to test 12 combinations according to the first two columns according to your xls.
The remaining 24 combinations would have the identical results as these 12 combinations.

Assume a,b,c and A,B,C are Hall and Phase of the controller; and
x,y,z and X,Y,Z are Hall and Phase of the motor.

If the phase-sequence is A-B-C and the correct match is
Combination (1)
a - x
b - y
c - z
A - X
B - Y
C - Z

Then the two identical matches are
Combination (2)
a - y
b - z
c - x
A - Y
B - Z
C - X

and Combination (3)
a - z
b - x
c - y
A - Z
B - X
C - Y

Now this is not the end.
It is not even the beginning of the end.
But it is, perhaps, the end of the beginning.

Knuckles
100 kW

Posts: 1135
Joined: Fri May 02, 2008 10:10 am
Location: Wrong Island, NY

### Re: Shenzhen (ecrazyman) Controller Information

Knuckles wrote:You are one sick dude! Did you figure this out by testing or in your mind?

The7 wrote:
Knuckles wrote:I had a discussion on phase/hall wiring with a forum member. He said there are 36 possible combinations.
I disagreed. I say there are only six possible combinations. I was close but not exact.

I concur with you that you don't need to test all the 36 possible combinations.
It is only needed to test 12 combinations according to the first two columns according to your xls.
The remaining 24 combinations would have the identical results as these 12 combinations.

Knowledge is not necessarily always derived from testing.
Discernment should be based on engineering principle and experience.

The7
10 kW

Posts: 774
Joined: Wed Jul 11, 2007 5:07 pm
Location: Vancouver

### Re: Shenzhen (ecrazyman) Controller Information

The7 wrote:
Stevil_Knevil wrote:Success!!

Here is the color-coding to connect the Shenzhen controller to a 400 series C-lyte motor:

Knuckle-troller C-lyte

Hall sensors-

Blk Blk
Red Red
Yel Yel
Grn Blu
Blu Grn

Phase-

Blu Yel
Grn Grn
Yel Blu

Note: connecting color color will drive the motor backwards quite nicely.

Edited for improved content & clarity

This color matching is to "drive the motor backwards".
Did you note the battery current?

Have you try for the forward direction?
If so, could you state the color matching also.

There is no reverse jumper (at least not that I have found).

When I first tested this controller, I noticed that if I match the colors on all the hall and phase wires, the motor ran reversed. The color matching shown above will make it run forward.
This assumes a Crystalyte or similar motor.
"One test is worth a thousand opinions"

fechter
100 GW

Posts: 9702
Joined: Sun Dec 31, 2006 3:23 pm
Location: California Bay Area, USA

### Re: Shenzhen (ecrazyman) Controller Information

Hi Guys,

Right, I just received my controller and motor today from Keywin (ecrazyman). One week from ordering it from the other side of the globe, which can't be bad. There are 3 wires on it that I didn't understand, but fechter's diagrams on page 1 of this thread explain them.

The model number I have is BL7828 instead of the BL7228 that fechter reports.

I spent this evening building a test frame to mount the motor in. I'll try to run it up and report as soon as I can. I've got a set of 30V lab power supplies I can connect in series.

Nick

Tiberius
10 kW

Posts: 902
Joined: Mon Jan 14, 2008 7:52 am
Location: Rural England

### Re: Shenzhen (ecrazyman) Controller Information

The7 wrote:
Knowledge is not necessarily always derived from testing.
Discernment should be based on engineering principle and experience.

So are you saying (as an experienced engineer) that ... "One opinion is worth a thousand tests"?

Cosmic! In this instance you are correct as the solution is math.

Imagine a Direct Drive Motor (no gears - no PMGR).

Imagine the three phase motor wires as nodes A, B, C in an equilateral triangle. Each node is Ã¢â‚¬Å“associatedÃ¢â‚¬Â with a motor hall sensor a, b, c.
Imagine the Ã¢â‚¬Å“firingÃ¢â‚¬Â order of the controller phase wires (PWM controlled by throttle) as I, II, III timed to the hall sensor (signal) order 1, 2, 3.

Now this is a triangle. You can go around the triangle (start at A) clockwise (forward) to B and then to C. But you can also go counterclockwise A to C to B (reverse).
Assume a,b,c and A,B,C are Hall and Phase of the motor; and 1, 2, 3 and I, II, III are Hall Signal and Phase firing order of the controller.

If the phase-sequence is A-B-C and the correct match (forward direction) is Combination (1)
(motor-controller)
a - 1
b - 2
c - 3
A - I
B - II
C - III

Then the two identical matches are Combination (2)
a - 2
b - 3
c - 1
A - II
B - III
C - I

and Combination (3)
a - 3
b - 1
c - 2
A - III
B - I
C - II

And of course the correct phase-sequence for reverse direction (Combination 1) is
a - 1
c - 2
b - 3
A - I
C - II
B - III

Now this is not the end.
It is not even the beginning of the end.
But it is, perhaps, the end of the beginning.

Knuckles
100 kW

Posts: 1135
Joined: Fri May 02, 2008 10:10 am
Location: Wrong Island, NY

### Re: Shenzhen (ecrazyman) Controller Information

Knuckles wrote:Imagine the three phase wires as nodes A, B, C in an equilateral triangle. Each node is Ã¢â‚¬Å“associatedÃ¢â‚¬Â with a hall sensor a, b, c.
Imagine the Ã¢â‚¬Å“firingÃ¢â‚¬Â order of the phase wires as I, II, III timed to the hall sensor (signal) order 1, 2, 3.

Now this is a triangle. You can go around the triangle (start at A) clockwise (forward) to B and then to C. But you can also go counterclockwise A to C to B (reverse).
Assume a,b,c and A,B,C are Hall and Phase of the controller; and 1, 2, 3 and I, II, III are Hall Signal and Phase firing order of the motor.

If the phase-sequence is A-B-C and the correct match (forward direction) is Combination (1)
a - 1
b - 2
c - 3
A - I
B - II
C - III

Then the two identical matches are Combination (2)
a - 2
b - 3
c - 1
A - II
B - III
C - I

and Combination (3)
a - 3
b - 1
c - 2
A - III
B - I
C - II

And of course the correct phase-sequence for reverse direction (Combination 1) is
a - 1
c - 2
b - 3
A - I
C - II
B - III

The reverse direction (Combination 1) is correct ONLY IF the phase relationship between the Hall signals and the phase BEMFs of the motor in the reverse direction are the same as that in the forward direction.

But this combination is not correct since the BEMF in reverse rotation is negative of that in the forward rotation and this will give an addition of 180 deg.

You could check the result of the MYSTERY MOTOR in your xls.

For Controller:
Let a = Hall Blue
b = Hall Green
c = Hall Yellow
A = Phase Blue
B = Phase Green
C = Phase Yellow

For Motor
1 = Hall Blue
2 = Hall Yellow
3 = Hall Green
I = Phase Blue
II = Phase Yellow
III = Phase Green

This equivalent ones are marked in the modified xls from yours.

Then the forward combination is
a - 1
b - 2
c - 3
A - I
B - II
C - III

And the reverse direction combination becomes
a - 1
c - 2
b - 3
A - II
C - III
B - I
Attachments
Phase-Hall-Wire-Combinations aa.xls

The7
10 kW

Posts: 774
Joined: Wed Jul 11, 2007 5:07 pm
Location: Vancouver

### Re: Shenzhen (ecrazyman) Controller Information

Hi guys,

Here's a quick preliminary report. I got my ecrazyman controller and Bafang motor yesterday. Last night I made a little test stand for the motor and today I ran it all up. I solved the sensor/winding wire puzzle by trial and error (OK, I did use advanced mathematical techniques to make sure it took only the minimum number of trials). Then I could take it to 330 Hz on the Hall sensors.

There are scope traces, but for now there's no point publishing them - I need to resolve a few issues first.
I am using 3 PSU's in series to make a source that can be adjusted up to 90 V. Look carefully and you can see the diodes strapped across each one. The blue PSU is the throttle.
There's a lot of noise on the signals, so scope triggering is an issue. Noise is much worse at partial throttle.
The current limits on the PSUs keep triggering - this alone could invalidate any results.
For some reason, the system won't let me get above 71.9 V. If I try to push it, the noise changes slightly. I need to work out if that is PSU, controller or the combination interacting. I suspect its the combination.
Keywin has modded the controller low voltage cut off so I can switch between 36 and 72V operation. I need to get my head round that first.

But so far, it does what would be expected and I haven't seen any strange behaviour other than the 71.9 limit.

Nick

PS. Edited to add: I deliberately downsized the picture to make it display comfortably, only to find the system does that for you.

Tiberius
10 kW

Posts: 902
Joined: Mon Jan 14, 2008 7:52 am
Location: Rural England

### Re: Shenzhen (ecrazyman) Controller Information

BTW, its a geared motor with freewheel.

Don't know if this is sad or what, but I just put a counter on one of the Hall sensors and turned it backwards one turn. Keep getting a count of 86. For some reason I was expecting it to be a multiple of 3, but I don't suppose it has to be anything special if its geared.

Nick

Tiberius
10 kW

Posts: 902
Joined: Mon Jan 14, 2008 7:52 am
Location: Rural England

### Re: Shenzhen (ecrazyman) Controller Information

Excellent test setup!

btw. I just use two 36V SLA chargers is series as an 88V PSU for no-load testing. That works perfect for my controllers and DD brushless motors.

See my vid here ...
Last edited by Knuckles on Wed Jun 04, 2008 4:22 pm, edited 1 time in total.

Now this is not the end.
It is not even the beginning of the end.
But it is, perhaps, the end of the beginning.

Knuckles
100 kW

Posts: 1135
Joined: Fri May 02, 2008 10:10 am
Location: Wrong Island, NY

### Re: Shenzhen (ecrazyman) Controller Information

Thanks Knuckles,

It isn't only used for this, though. But something needs checking. I just crunched the numbers on the rates and rpms and it works out as about half the road speed it should be doing.

fechter, doc, anyone, what kind of Hz per Volt do you expect from the typical geared motor? I mean Hall sensor Hz / Supply V at no load.

Nick
Last edited by Tiberius on Wed Jun 04, 2008 12:53 pm, edited 1 time in total.

Tiberius
10 kW

Posts: 902
Joined: Mon Jan 14, 2008 7:52 am
Location: Rural England

### Re: Shenzhen (ecrazyman) Controller Information

Knuckles wrote:btw. I just use two 36V SLA chargers is series as an 88V PSU for no-load testing. That works perfect for my controllers and DD brushless motors.

I don't have any of those, unfortunately. I do have various 5 A PSUs but they only add up to about 50 V.

What I do have is breadboard dc-dc step up converter that will make hi V from a car battery. I've only run it up to 80 V so far, but there's more there. But its not finished and I don't want to put too many uncertainties into the test.

Nick

Tiberius
10 kW

Posts: 902
Joined: Mon Jan 14, 2008 7:52 am
Location: Rural England

### Re: Shenzhen (ecrazyman) Controller Information

Nice setup!

I'm not sure there is a "typical" bike motor of any type these days. You could open the side cover and count the magnets.

The behavior you're describing sounds like what I was getting at around 31v with the Puma. Above that voltage, the rpm got to that critical frequency and started to spike the current.

If you put the scope on any hall signal and the hall ground, it should look pretty clean. From this you could determine the frequency. The signal on the phase wires is normally very noisy.

You could also put the scope across the power input to the controller to see if the PSU current limiter is kicking in.
"One test is worth a thousand opinions"

fechter
100 GW

Posts: 9702
Joined: Sun Dec 31, 2006 3:23 pm
Location: California Bay Area, USA

### Re: Shenzhen (ecrazyman) Controller Information

Tiberius,

You have an excellent setup to test any motor at no-load with an supply voltage up to 90V.

I hope that you don't mind if I make some suggestions and comments about the test.

1) "The current limits on the PSUs keep triggering - this alone could invalidate any results"
What are the current limits used?
Would suggest to be about 2 or 3 A for no-load test.
There is one main difference between battery and PSU. Battery could supply current (forward current) and take back current (reverse current). PSU could only supply current but NOT take back. There could be some "reverse current" from the motor. These PSUs could be too sensitive to the reverse current.

2) Use the lowest supply voltage to determine the best combination for the forward. The best combination will give the minimum supply current. The supply current could be read in the PSU. In your case the lowest voltage is 36V for this controller.

3) "I solved the sensor/winding wire puzzle by trial and error (OK, I did use advanced mathematical techniques to make sure it took only the minimum number of trials)."
Noted that you have already achieved this by trial and error.

4) "I am using 3 PSU's in series to make a source that can be adjusted up to 90 V. Look carefully and you can see the diodes strapped across each one. "
How did you connect these diodes?
Are these diodes are connected in reverse and across each PSU?

5) "There's a lot of noise on the signals, so scope triggering is an issue. Noise is much worse at partial throttle."
Try to use one channel to measure for one certian Hall signal and only use this channel for triggering.
Then use the other channel to measure each of the other Hall signals, motor phase voltages ( one at a time) wrt the -ve of the supply (as close to the controller as possible).
Measure also the time period for 1 cycle of the Hall signal and its frequency could be calculated from its time period. The frequency of motor phase voltage is same as the Hall signal.

6)"BTW, its a geared motor with freewheel. Don't know if this is sad or what, but I just put a counter on one of the Hall sensors and turned it backwards one turn. Keep getting a count of 86. For some reason I was expecting it to be a multiple of 3, but I don't suppose it has to be anything special if its geared."
How did you measure?

A simple circuit as suggested in the attached picture could be used to measure the Hall signal from one sensor with counter.
It uses one 5 V supply , pull-up resistor of 2.2k and simple noise filter of 3.3k and 0.01uF for the countor.
No of counts for 1 turn = No of pole-pairs X Gear-ratio
If this motor has 10 pole-pairs and gear-ratio of 4.3 (this data 4.3 was mentioned by Knuckles?)
Then no of counts for 1 turn = 10 x 4.3 = 43 counts.

If your counter counts the edge of rising and the edge of falling as 2 counts, then the number will be double .

7)"For some reason, the system won't let me get above 71.9 V. If I try to push it, the noise changes slightly."
Did you note the frequency at this instant?
It could be the same critical frequency as observed by fechter.

"What I do have is breadboard dc-dc step up converter that will make hi V from a car battery. I've only run it up to 80 V so far, but there's more there. "
What is frequency at 80V?
Would like to see the voltage waveforms on scope for full throttle and partial throttle.
Especially at partial throttle to see if the phase voltage is symmetrical or not.
Attachments
Counter DCN8113 copy.jpg (28.19 KiB) Viewed 1704 times
Last edited by The7 on Wed Jun 04, 2008 4:40 pm, edited 1 time in total.

The7
10 kW

Posts: 774
Joined: Wed Jul 11, 2007 5:07 pm
Location: Vancouver

### Re: Shenzhen (ecrazyman) Controller Information

Hi The7,

All very interesting points, thanks. I think I'm going to go back and check everything again before I respond in detail.
Your comment about 10 pole and 4.3 ratio is a bit spooky if I'm counting 86. There are too many parameters out by factors of two here for comfort. I need to check stuff, let you know more tomorrow.

Nick

Tiberius
10 kW

Posts: 902
Joined: Mon Jan 14, 2008 7:52 am
Location: Rural England

### Re: Shenzhen (ecrazyman) Controller Information

The7 wrote:
The reverse direction (Combination 1) is correct ONLY IF the phase relationship between the Hall signals and the phase BEMFs of the motor in the reverse direction are the same as that in the forward direction.

But this combination is not correct since the BEMF in reverse rotation is negative of that in the forward rotation and this will give an addition of 180 deg.

Gosh! OK so I forgot about the old 180 degree BEMF forward-reverse gig! details details details!
So here is a design for a DPDT forward-reverse relay setup.

F-R_dpdt_relays.jpg

btw My Bafang is on it's way to me now so I'll post my testing here also.

Tiberius, Can you open up the controller? I am curious what components Keywin sent to you. 80nf10 fets? LVC=62V? Pics of mods on the pcb?
Toa Chie.
Last edited by Knuckles on Wed Jun 04, 2008 11:18 pm, edited 4 times in total.

Now this is not the end.
It is not even the beginning of the end.
But it is, perhaps, the end of the beginning.

Knuckles
100 kW

Posts: 1135
Joined: Fri May 02, 2008 10:10 am
Location: Wrong Island, NY

### Re: Shenzhen (ecrazyman) Controller Information

Tiberius wrote:Hi The7,

Your comment about 10 pole and 4.3 ratio is a bit spooky if I'm counting 86.

Nick

The motor in this picture (Knuckles) is quite similar to yours:
It has 10 pole-pairs (or 20 magnet poles) and the gear ratio is around 4:1 to 5:1 when estimated from the picture.
No of counts in 1 hub turn = 40 to 50 for this motor.

Knuckles said :"OK. Keywin says ...
... There are 10 pole pairs
... The gear ratio is 1:4.3
... and 1720 rpm at 72v is bafang motor"

The gear ratio of your Bafang motor as given by Knuckles is 4.3:1.
So the no of counts of your should be 43 for 1 turn of the hub.

Would like to know the exact circuit of your counting?
Attachments
Grubee_04 copy.jpg (37.83 KiB) Viewed 1528 times

The7
10 kW

Posts: 774
Joined: Wed Jul 11, 2007 5:07 pm
Location: Vancouver

### Re: Shenzhen (ecrazyman) Controller Information

Knuckles wrote:Excellent test setup!

btw. I just use two 36V SLA chargers is series as an 88V PSU for no-load testing. That works perfect for my controllers and DD brushless motors.

Noted that you are using an DD brushness motor.
So don't think that the frequency would reach the critical frequency in this test.

The7
10 kW

Posts: 774
Joined: Wed Jul 11, 2007 5:07 pm
Location: Vancouver

### Re: Shenzhen (ecrazyman) Controller Information

Of course. I was just illustrating the chargers as PSU for no load testing.

Now this is not the end.
It is not even the beginning of the end.
But it is, perhaps, the end of the beginning.

Knuckles
100 kW

Posts: 1135
Joined: Fri May 02, 2008 10:10 am
Location: Wrong Island, NY

### Re: Shenzhen (ecrazyman) Controller Information

While my Knuckle-troller PCB was out of it's housing, I figured that this would be a good time to 'ruggedize' the caps, implement a couple user-interface augmentations and generally improve upon an already good controller.

First observation- the PCB is sprayed with a varnish/conformal coating of some kind (?) to resist moisture. Solder wants nothing to do with this stuff, so I swabbed the areas where I needed to work with a Q-Tip soaked in Acetone, waited for it to dry (duh) then soldered the wires for a future CycleAnalyst connection.

Next, I decided to fatten the FET traces with solder wick and copious amounts of solder to keep the resistance and heat loss to a minimum.

If something goes left, this controller will throw fault codes. A carefully measured & step-drilled hole in the housing, then covered with a water-proof, clear tire patch will let me know if/what kind of 'event' we've had without the need for disassembly.

Finally, a couple blobs of silicone should keep the caps from getting perished when the going gets rough.

Stevil_Knevil
10 kW

Posts: 892
Joined: Tue Jan 09, 2007 8:32 pm
Location: Up where the air is fresh and clean

### Re: Shenzhen (ecrazyman) Controller Information

Very nice work. Knuckles should take note. On the other hand, maybe this should be left as an exercise for the student, that way we can say we did a controller mod!

1 kW

Posts: 453
Joined: Sun Mar 02, 2008 11:11 am

### Re: Shenzhen (ecrazyman) Controller Information

Nice work Stevil!

I like the LED window. I was also thinking of replacing the LED with a wire and having it run to an LED in the throttle body or one mounted in the end plate. Hopefully you won't need to see the codes too often though.
"One test is worth a thousand opinions"

fechter
100 GW

Posts: 9702
Joined: Sun Dec 31, 2006 3:23 pm
Location: California Bay Area, USA

### Re: Shenzhen (ecrazyman) Controller Information

Ok, guys,

This is embarassing. I rushed into print too soon yesterday.

I messed up counting the pulses from the Hall sensor. In my defence may I point out that I'm usually working with signals 10^7 faster. I had a nice 5V square wave from the Hall sensors and I fed it to the scope and the counter. But I left the counter threshold set to DC coupled and zero volts and there was enough bounce on the signal to accurately count both edges. With better settings the count is 43 Hall pulses per turn, and I've checked that with a stored trace of a quarter turn on the scope. So that ties up nicely with a 4.3:1 gearing and 10 pole motor

It also turned out that while 2 of the PSUs had 2 A cutouts, one was 1 A. That got changed to a different one (you don't want to know how many PSUs I have) and now I can go to 84 V full throttle.

The change in noise was down to my test jig coupling very well with the benchtop and hitting a resonance somewhere.

Here are the scope traces at various voltages, all full throttle. Bottom trace is a Hall sensor, top trace one of the winding connections to ground.

At low (sic) voltages there is an artefact at the beginning and a trapezoid ramp.
ECM_SB_60V.jpg (208.36 KiB) Viewed 1343 times

Getting higher, the ramp reduces. At 72 V its is almost gone.
ECM_SB_72V.jpg (159.27 KiB) Viewed 1342 times

After that its just a square wave. This is as far as I could go. You should be able to see the frequency readout.
ECM_SB_84V.jpg (143.69 KiB) Viewed 1334 times

Or maybe not; the photos aren't good enough. From 72 to 84 V the frequency hardly moved - 326 Hz.
There is some kind of effect or limit being reached at 72 V or 326 Hz. Mind you, with 43 count in a 26" wheel that would be 35 mph.

Nick

Tiberius
10 kW

Posts: 902
Joined: Mon Jan 14, 2008 7:52 am
Location: Rural England

### Re: Shenzhen (ecrazyman) Controller Information

Is this good or bad? I think this is good? YES? Hell I feel like I don't know ANYTHING anymore!
So the Bafang caps out at 72V (326 frequency limit) but doesn't jitter to bad between 72V and 84V?
(Man! And I thought I was a geek! All you ES guys are like WAY OUT THERE!)
Under loaded conditions (on a 26" wheel) the 326 Hz frequency will not be reached until 35 MPH?
Party on Wayne! Party on Garth! This is all good? YES?

btw This IS THE BAFANG MOTOR
The7 wrote: Knuckles said :"OK. Keywin says ...
... There are 10 pole pairs
... The gear ratio is 1:4.3
... and 1720 rpm at 72v is bafang motor"

The gear ratio of your Bafang motor as given by Knuckles is 4.3:1.
So the no of counts of your should be 43 for 1 turn of the hub.

Grubee_04.jpg (52.59 KiB) Viewed 1369 times

Bafang_Geared_Motor.JPG

Now this is not the end.
It is not even the beginning of the end.
But it is, perhaps, the end of the beginning.

Knuckles
100 kW

Posts: 1135
Joined: Fri May 02, 2008 10:10 am
Location: Wrong Island, NY

### Re: Shenzhen (ecrazyman) Controller Information

Tiberius wrote:...

Or maybe not; the photos aren't good enough. From 72 to 84 V the frequency hardly moved - 326 Hz.
There is some kind of effect or limit being reached at 72 V or 326 Hz. Mind you, with 43 count in a 26" wheel that would be 35 mph.

Nick

Good measurements. You reached the magic 325 Hz limit. When you get close, I noticed the waveform gets squared off as the timing goes out of whack. If you had a few more volts, you could push it into the range where it just jitters.
"One test is worth a thousand opinions"

fechter
100 GW

Posts: 9702
Joined: Sun Dec 31, 2006 3:23 pm
Location: California Bay Area, USA

### Re: Shenzhen (ecrazyman) Controller Information

fechter wrote:Good measurements. You reached the magic 325 Hz limit. When you get close, I noticed the waveform gets squared off as the timing goes out of whack. If you had a few more volts, you could push it into the range where it just jitters.

Yes, I am definitely running out of electricity, or "leccy wallop" as we refer to it in these parts.

The PSU's are struggling and the current limit on them is setting the voltage. I would like to explore that top end of the range a bit more to find out whether its the current, the voltage or the frequency that is setting the limit. My feeling is that its the frequency and that is causing the current to rise, which then limits the volts. To find out I really need more wallop, and then I'd be likely to break something.

But as Knuckles says, its way over the top anyway for this particular motor.

Nick

Tiberius
10 kW

Posts: 902
Joined: Mon Jan 14, 2008 7:52 am
Location: Rural England

PreviousNext