Adding hall sensors to 63mm motor and vesc testing

silviasol

10 kW
Joined
Dec 30, 2012
Messages
876
I am now finishing up my halls on my 270kv 63mm motor and will be doing some testing with my vesc so thought I would make a thread explaining how I made it. It was ridiculously frustrating to finish but seems to hold up well. It is all put together now but I will explain how I did it.

The main problem is no wiring will fit, even as small as 30awg, because the slot for the main wires is only meant for the size of the motor wiring.
IMG_3664.jpg


So I am using headphone wiring. This wiring is paint shielded so it will not cross connections even though there is no shielding.
IMG_0768.jpg


The hall sensors will not fit between the spaces so the stator need to be drilled. This is frustrating since the metal is tough to grind. I used a dremel and carbon bit and it wound up slipping once and skipped over the wiring damaging three wires. The motor still runs fine though.
IMG_3665.jpg


I used some e6000 glue to hold the wires in place. Instead of using epoxy to hold the sensors I wrapped some kaptan tape around the stator then used super glue and some paper tape to keep it from unraveling.
IMG_3666.jpg


I fed all the wires thru a small silicone tube so it will compress along with the main wires and keep them safe.
IMG_3668.jpg


Using more headphone cable I made a mini usb cable that connects to the jst cable. This plugs into a mini usb board I found on ebay.
IMG_3669.jpg

IMG_3670.jpg


Going to put my scooter back together this weekend and do some tests. Very excited to see the low end power with sensors installed.
 
sl33py said:
subscribed. I am going to try non-sensored to start, but also am looking at the e0 design sensors possibly for VESC. Being a 200kv 6354 motor i'll be following your build to see how it works for you!

All I know for now is the motor works fine with 6 series. Haven't done a ride with my 12s battery but I stress tested it a few times with my rear brake and all is fine.
 
So you have more info on what wires you got exactly, any online url (amazon)?
My thin wires break too easily. Also drilling a hole to make space in the stator slots is hard...

Did you already did some test rides, and how do the sensors do?

Any tips/feedback for DIY hall sensor placement?
 
I remove them from headphones that I repair and sell(from headphones I could not repair), only certain headphones have the right wire. I can send you enough wiring and some of the silicone sleeve for a few dollars. I haven't even started yet because I wiped my old laptop and installed a different windows and then installed ubuntu on a portable computer that I could take with me when I ride but for some reason I can't get it to connect even with the correct port. Just need to reinstall ubuntu again on my other laptop but I have been so busy to do that but will soon. I plan on messing with the sensorless settings first now since vedder says he is saying he gets really good start up power to bother with sensorless right now. Have you done any messing with the settings? It is really confusing for me right now, like trying to pilot a space shuttle or something.

The hall sensors have to be flat like I have them so you must drill them to fit. That metal is really tough to drill and having the gap between them just makes it more hard. I wanted to get another motor and test this different dremel bit I have that is meant for cutting metal and worked a ton better cutting my aluminum mount then the normal dremel cut off wheel. It will not skip because the teeth are not going against the metal.
 
What dremel bit(s) exactly, any link and/or name is welcome.

I'll try out a few more thin wires, and otherwise PM you for headphone wires.

By the way, I often use a Raspberry Pi with BLDC-tool, connected to a small screen, works fine.

Thanks again.
 
erwincoumans said:
What dremel bit(s) exactly, any link and/or name is welcome.

I'll try out a few more thin wires, and otherwise PM you for headphone wires.

By the way, I often use a Raspberry Pi with BLDC-tool, connected to a small screen, works fine.

Thanks again.

Hey Erwin - i tried to build the BLDC tool and programmer on Raspberry Pi 2 and it didn't work - do you have steps to do this? I'd love to have one i could loan or use! I previously did a "loan a part" on a motorcycle forum for specialty tools and was thinking to loan my RP2 out w/ prebuilt programmer and BLDC to anyone in the states who needs one... but am Ubuntu challenged... Off topic so PM me i guess if you can share steps?

Thx!
 
silviasol said:
Well I tested it and all I get is the motor whining or studdering. Tried all 6 combinations of the three hall sensor wires and nothing.

That's a bummer. I guess i'll wait until Vedder has tested and gives steps to include sensors. I was thinking of adding the e0 setup on my 63mm w/ their bracket, but as well as teh motor runs w/o a sensor i don't know if it's worth the effort. Your lack of success (nicely integrated btw!) is surprising and there's no way i could do nearly as well.
 
There seems to be much interest for good hall sensor support, so I will work on that in the next days before I go another trip to present another paper for my phd. I only have a sensored inrunner to test with on my RC car, but at least I can get all settings working. It would be nice to test the implementation on an electric longboard as well since the load is very different from an rc car.

My plan is to make it work something like the following:

1. The detection also figures out how the hall sensors are connected regardless of their spacing and order. If valid hall sensor inputs are found for all commutation steps, a hall sensor table will be printed. Otherwise, an error will be printed. The detected hall sensor table can be entered to be used.

2. Either only use sensored commutation or hybrid mode where sensorless commutation will be used above a configurable ERPM.

I will also add fault codes for detected hall sensor faults.
 
After finding out from Ben that I needed to change a setting in the firmware and how to adjust the three values for the hall sensors I got it working! No more cogging at all! Check out the video's! Keep in mind I have it geared very high so it doesn't have much torque.

Sensorless
[youtube]g480W5hZhpc[/youtube]

Sensored
[youtube]a5hTa3RwJjY[/youtube]
 
I was up late yesterday and spent some hours today on the new hall sensor implementation. It should work for any spacing and any connection order. The detect function now also detects how the hall sensors are connected and prints a table that can be entered, so there is no need to reconnect the sensors. I also implemented the hybrid mode where hall sensors are used on low speed and sensorless is used on high speed. I will push the new code in a couple of hours after some more testing if there are no issues.

It would be nice to have a sensored longboard so that I can test and debug the active braking. Doing that on my RC car is difficult since active braking makes no difference on that one.
 
vedder said:
I was up late yesterday and spent some hours today on the new hall sensor implementation. It should work for any spacing and any connection order. The detect function now also detects how the hall sensors are connected and prints a table that can be entered, so there is no need to reconnect the sensors. I also implemented the hybrid mode where hall sensors are used on low speed and sensorless is used on high speed. I will push the new code in a couple of hours after some more testing if there are no issues.

It would be nice to have a sensored longboard so that I can test and debug the active braking. Doing that on my RC car is difficult since active braking makes no difference on that one.

Not sure if it is my vesc of if I have an issue with the hall sensors but I get a drv8302 error if I use 12s voltage and put it into high rpm. When the motor spins at about 50-75% speed it reboots itself and the terminal says drv8302 error. I am going to try to finish making another vesc and see if there is any difference. I also have another problem with 12s voltage on sensorless where if I give it too much throttle at low speed it cuts off then reboots and I get the drv8302 error.
 
The new hall sensor implementation with hybrid mode and auto detection is now pushed to github. It should be quite easy to use:

1. When running detect for the sensorless parameters, the hall sensors are also detected and a table for them is generated and printed.
2. Enter the detected table and choose sensored or hybrid mode (I recommend hybrid). Everything should work now.

It would be nice if someone could test this with the latest BLDC Tool and FW1.5 or later.

Not sure if it is my vesc of if I have an issue with the hall sensors but I get a drv8302 error if I use 12s voltage and put it into high rpm. When the motor spins at about 50-75% speed it reboots itself and the terminal says drv8302 error. I am going to try to finish making another vesc and see if there is any difference. I also have another problem with 12s voltage on sensorless where if I give it too much throttle at low speed it cuts off then reboots and I get the drv8302 error.

How much KV does the motor have? How close is your electrolytic capacitor and what are its specs? How thick wires are you using?

12s is close to the voltage limit, so it is important that everything is right then.
 
270kv motor, 10awg wiring on the battery cable and motor cables, the capacitor is just about the same as the beta vesc's. The bullet connectors I am using are not as tight as fit as they should be, the male connectors that came with them fit tighter then the motors connectors so that could be an issue also. There have been other things that have happened like I would plug in the positive first a few times so a bigger spark was made with the 12s battery(I didn't know to plug in the negative first) and on my first test ride the motor wires pulled out of the vesc two times when riding so there could have been some damage to it.

I will test the new firmware and bldc tool later tonight and let you know.
 
Sensored is and hybrid is working perfectly. The problems I was having before is I can not use a 270kv motor with 12 series battery. I have 6s right now and it works perfectly. Going to try 10s soon when I have time to rebuild the pack. I actually blew up the drv8302 from using 270kv and the 12s battery, replaced it and have had no issues with 6s.
 
Finally got another vesc ready so I could have a spare just in case when doing a long range test with sensored only. Even with 6s I am getting drv8302 errors. Seems to happen after the motor heats up a bit. Happened about 5 times on a 25 mile trip. No problems giving it full throttle at a stand still but seems to be just random giving the error, a few times after stopping then going and a few times getting to top speed. I am going to ditch the usb connector and solder it directly to the wiring and see if that helps.

IMG_1169.jpg
 
silviasol said:
Finally got another vesc ready so I could have a spare just in case when doing a long range test with sensored only. Even with 6s I am getting drv8302 errors. Seems to happen after the motor heats up a bit. Happened about 5 times on a 25 mile trip. No problems giving it full throttle at a stand still but seems to be just random giving the error, a few times after stopping then going and a few times getting to top speed. I am going to ditch the usb connector and solder it directly to the wiring and see if that helps.

Are you using sensored mode only and not hybrid?
 
vedder said:
silviasol said:
Finally got another vesc ready so I could have a spare just in case when doing a long range test with sensored only. Even with 6s I am getting drv8302 errors. Seems to happen after the motor heats up a bit. Happened about 5 times on a 25 mile trip. No problems giving it full throttle at a stand still but seems to be just random giving the error, a few times after stopping then going and a few times getting to top speed. I am going to ditch the usb connector and solder it directly to the wiring and see if that helps.

Are you using sensored mode only and not hybrid?

Yes. I wanted to see how much more quiet it was then sensorless or hybrid. Tonight I am going to try hybrid mode.
 
Back
Top