Optical sensors for commutation -Working

Get all your technical information about electric bikes here.
User avatar
Burtie
10 kW
10 kW
Posts: 561
Joined: Mar 27, 2009 9:45 am
Location: UK

Optical sensors for commutation -Working

Post by Burtie » Jun 10, 2011 5:38 am

Proof of concept:
Prototype optical sensor setup.jpg
Prototype optical sensor setup.jpg (126.61 KiB) Viewed 6899 times
IR is visible only to the digital camera.jpg
The IR is invisible to the naked eye
IR is visible only to the digital camera.jpg (113.37 KiB) Viewed 6899 times

Optical, why bother :?:

We have all seen hall sensor fitted to RC outrunners that work, so why develop an optical system?


Hall sensors can be fitted externally or internally, each has its pros and cons.
The list below is written with the very popular Turnigy 80-100 outrunner in mind, but many of the points will apply equally to other outrunners.



External Hall Sensors placed around the bell:Pros :)
- Timing can be adjusted by moving the sensors,
- Sensors are kept away from any heat generated by the motor.

Cons :(
- Difficult or impossible to operate at high power levels (for Turnigy 80-100,greater than about 3kw), due to interference from stator flux.
- Difficult to achieve accurate angular spacing required between the sensors without precision machining



Internal Hall Sensors, glued in stator slots:Pros :)
- Less prone to interference from stator flux, so will operate at higher power.
- No precision bracket machining required.

Cons :(
- Not adjustable.
- Motor needs to be dismantled to install them.
- Sensors subjected to heat generated by the stator.
- Difficult to determine which slot to start with to achieve neutral or +-30 edegree timing.




Enter the optical commutation sensor design…..
- This is an external system, so it is possible to move the sensors to adjust the timing. :)
- It is not susceptable to magnetic interference, so will work with high power motors. :D
- It does not require precision components to be machined, -the encoder strip is printed by a computer :P
- The connections and electrical signals are the same as hall sensor systems, so it is compatable with existing controllers :mrgreen:


… so it all looks quite promising ?


http://www.youtube.com/watch?v=EHv8tApfOSo


I will try and get one installed on my RC bike soon and we will see how it works in the real world.

If everything is good, and there is enough interest, I will get a batch of PCBs made and offer kits to people.


Astro 32xx version also in the pipeline…

Burtie
Last edited by Burtie on Oct 04, 2011 3:06 pm, edited 3 times in total.

User avatar
Burtie
10 kW
10 kW
Posts: 561
Joined: Mar 27, 2009 9:45 am
Location: UK

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by Burtie » Jun 10, 2011 5:43 am

Was reserved

Edit updates...



You can check out the productionised implementation (including Astro internal version) here:
https://endless-sphere.com/forums/viewto ... 30#p434772

If you want to try some yourself, there is a sale thread for the pcbs here:
https://endless-sphere.com/forums/viewto ... 31&t=31961
Last edited by Burtie on Mar 06, 2012 7:32 pm, edited 3 times in total.

User avatar
amberwolf
100 GW
100 GW
Posts: 23938
Joined: Aug 17, 2009 6:43 am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by amberwolf » Jun 10, 2011 5:47 am

The only question I have is: Is the response time of the optical sensor fast enough for extremely high-rpm motors?

User avatar
neptronix
100 GW
100 GW
Posts: 13061
Joined: Jun 15, 2010 5:56 pm
Location: People's republic of Petrolistan ( Utah, USA )
Contact:

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by neptronix » Jun 10, 2011 5:59 am

Burtie, has anyone told you that you are awesome lately?

IMHO... this makes RC drive *way* more appealing in my eyes. I have not been too interested in it due to the hall sensor / RC controller issues.
My first major build: 8T MAC motor on a Trek 4500.
The new all-arounder: Leafmotor 1500w on a Turner O2 full suspension.
The wheelie machine: 20" Rear Magic Pie II on a Trek 4300 MTB

"The best time to plant a tree was 20 years ago. The second best time is now."- Chinese Proverb

User avatar
liveforphysics
100 GW
100 GW
Posts: 14453
Joined: Oct 29, 2008 1:48 am
Location: Santa Cruz, CA, USA

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by liveforphysics » Jun 10, 2011 11:20 am

Yes, Burtie, first let me say, you're exceptionally awesome.

It makes me super super happy to see somebody doing this!

Check this thread out I did clear back in 2009 on this exact topic, but then never got time to try it out.

https://endless-sphere.com/forums/viewto ... controller
Each carcinogen vapor exposure includes a dice roll for cancer.

Each mutagen vapor exposure includes a dice roll for reproductive genetic defects in your children.

Each engine start sprays them into a shared atmosphere which includes beings not offered an opportunity to consent accepting these cancer experiences and defective genetics life experiences.

Every post is a free gift to the collective of minds composing the living bleeding edge of LEV development on our spaceship.

User avatar
mdd0127
1 MW
1 MW
Posts: 1517
Joined: Sep 30, 2008 4:43 pm

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by mdd0127 » Jun 10, 2011 12:48 pm

Very Awesome! That's something I also wanted to try in the future.

Put me down for a few boards whenever they're ready!
Turn it OFF!!!

Apocaloptimist! (thx Kiwi!)

bobc
100 kW
100 kW
Posts: 1001
Joined: Jan 20, 2011 5:08 pm
Location: Knutsford England
Contact:

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by bobc » Jun 10, 2011 1:31 pm

I tried an optical system a couple of years ago (before ever looking at this forum).
It didn't work in the sunshine - bit of a problem for me as I was doing the work in my shed...
So I went over to halls ;^)
Yes really - the motor worked beautifully when the weather was bad...
Bob

User avatar
mdd0127
1 MW
1 MW
Posts: 1517
Joined: Sep 30, 2008 4:43 pm

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by mdd0127 » Jun 10, 2011 1:43 pm

I like the idea of enclosing the important, expensive, spinny bits anyway so this looks like an excellent idea to me. I went with an external magnet trigger ring on my Astro to get the halls away from the flux and heat but it's a day project to build one. I love the trigger tape layout on the can. My initial thought for the in-runners was a painted/polished trigger wheel clamped to the shaft with the optical sensors looking towards the wheel/ motor endcap. Can't wait to see your Astro design Burtie.

Apparently, I need to call you and talk some business soon :wink: :mrgreen:
Turn it OFF!!!

Apocaloptimist! (thx Kiwi!)

silentflight
100 W
100 W
Posts: 109
Joined: May 07, 2007 5:42 pm
Location: Chicago

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by silentflight » Jun 10, 2011 3:48 pm

Nice work!

I ran my Bionx with an recording optical rpm sensor back in 2007 using the EagleTree logger. It was finicky, especially in the sunlight. I had to adjust it so that the sensor was very close to the motor (maybe 2 or 3 mm) and also shroud the sensor to keep the direct sun off of it. I used twelve strips of black from the block letters you can buy at marinas to put the registration number on a boat, so it was waterproof and permanent. Having twelve sensors per turn made for a very sensitive speedometer.

User avatar
recumpence
100 GW
100 GW
Posts: 5308
Joined: Apr 19, 2008 8:33 am
Location: On Earth right now. That can change at any time, though..........

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by recumpence » Jun 10, 2011 5:00 pm

Ahh, nice. I was wondering if this was possible.

Matt
1% of the world's population can think "Outside the box". The rest are firmly stuck within the box. Where are you?

User avatar
Joe Perez
100 W
100 W
Posts: 190
Joined: Apr 06, 2011 10:41 am
Location: New York City

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by Joe Perez » Jun 10, 2011 11:30 pm

amberwolf wrote:The only question I have is: Is the response time of the optical sensor fast enough for extremely high-rpm motors?
IR phototransistors are commonly used in automotive cam position sensors (albeit in transmissive fashion through slotted discs, rather than in a reflective configuration.)

One of the more extreme examples would be the cam sensor from the later-models of the Nissan SR20 engine, which has 360 slots. Turning at 1/2 crankspeed, that would be about 21,600 slots per second under the sensor at redline.

I was more concerned with sunlight as others have mentioned. Sunlight covers damn near the whole EM spectrum, including the whole IR band.
The concept of "average" requires that 50% of the population be below it.

User avatar
spinningmagnets
100 GW
100 GW
Posts: 10721
Joined: Dec 21, 2007 10:27 pm
Location: Ft Riley, NE Kansas

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by spinningmagnets » Jun 11, 2011 1:09 pm

A long time ago in the motor section, there was a post from a guy in named Axel in Sweden about a DIY plywood single-phase motor for his large RC plane. The info interested me at the time because, it could be scaled up to make a non-hub pancake motor for an E-bike (no longer necessary for me), and he had replied that he was working on a DIY 3-phase motor design.

He specifically chose optical/IR instead of halls, and mentioned that the response time was unusually fast, so that he could speed up the motor and never have to worry if his timing triggers could keep up. edit: optical sensors have been used as a tachometer on turbochargers that have been converted to a small DIY jet engine spinning 50,000-RPMs

He used holes in the rotor-disc for timing, with the receptors on the normally dark inside of the motor. Burtie, I notice in your first version, that the external send-recieve module allows on-the-fly adjustment to timing, as I have read that neutral is good for start-up/low-RPMs...and a slight advance helps power at high RPMs.

edit: perhaps physically mount the module in the advanced position, and then add an adjustable filter to slow the signal to neutral when desired? (I apologize for the electronically noobish question in advance)

I am almost drowning in work with water up to my nose...I am so jealous of all the fun you guys are having. At least I finally have a garage and shop now...I guess I could sleep when I'm dead!

edit: pic of the inside of a Tidalforce hub with optical sensors...(and phase wires that do not exit the hollow axle!!)
Image
Last edited by spinningmagnets on Jun 11, 2011 6:44 pm, edited 7 times in total.

deVries
1 MW
1 MW
Posts: 1827
Joined: Jul 10, 2008 11:29 pm
Location: Solar Powered 3000w Texas

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by deVries » Jun 11, 2011 1:37 pm

liveforphysics wrote:Yes, Burtie, first let me say, you're exceptionally awesome.

It makes me super super happy to see somebody doing this!

Check this thread out I did clear back in 2009 on this exact topic, but then never got time to try it out.

https://endless-sphere.com/forums/viewto ... controller
Right-on Luke... :wink: Super-Glad to see Burtie move ahead with this too. 8)

I bumped your thread last year trying to get an update on this optical idea too...

by deVries » Sat Jun 12, 2010 7:02 pm
November 29, 2009...
liveforphysics wrote:
fechter wrote:I've seen some motors with optical sensors. Usually they use an interrupter disc, but I don't see why a reflective sensor wouldn't work. Just need to shade it so it doesn't screw up when it's in the sun. A bit of felt draped over the sensor holder and glued to be snug up against the motor should solve ambient light problems I think you could do it with just 3 sensors and use a standard sensored controller.I'm not all that impressed with TO-220 fet packages used in all other controllers, not too impressed with poor use of space in board layout and weak traces. I bet you could run the optical sensors directly to the hall wires (with some resistors). If your pattern was black against a shiny metal background, I don't think you'd need reflective paint. Timing could be adjusted by moving the senor mount. Yep, that's what I currently do with my external hall sensor retro-fit RC outrunner.

A similar approach would be to use a disc rather than a drum for the pattern. This may allow for mounting the encoder on the motor shaft externally or on the end face of the rotor. More needless complexity IMO.

With the 6 sensor approach and the right FETs, you could essentially turn a brushless motor into the equivalent of a brushed motor by using the sensors and FETs for commutation. This is like the eCycle silicon commutated motor. http://www.ecycle.com/motorgenerator.html With this setup, the commutation is done separately from the PWM and you just use a (cheap) brushed motor controller. Of course it would make sense to just gate the high side FETs with the PWM signal to avoid the losses in a separate controller. In this kind of a setup, I think you'd want to add some kind of logic latch that would prevent shoot through if a sensor screwed up. Yep, hence the part where I suggested driving a 6 channel H-bridge fet driver with built-in no-passthrough protection.
kfong wrote:Luke,

Cool idea, optos should have no problem in this application. There are already opto sensors that have transmitter and receiver pairs so it will reflect on the surface easily. If you know what the hall effect outputs are, it might be just an easy substitution. This optocoupler uses plain paper as the contrast media. Would be easy to create a pattern on the motor and secure it with clear tape or paint. You would need to know if the motor algorithm uses edge or pulse width detection. Keep the sensor on the underside or on top so it gets less sunlight, so as long as there is good contrast it should work out fine. It already has a daylight filter.

http://search.digikey.com/scripts/DkSea ... -1239-2-ND

With the large motors it would be easy to create a circuit board with a strip of these. Let me know if you plan to pursue this. I can help by making a simple 2 layer circuit board with my milling machine. Just attach it length wise to your motor and print out a pattern.

Kin
by deVries » Sat Jun 12, 2010 7:02 pm

Bump.

Has anyone pursued this optical sensor-controller to get a working model yet?

Or, does someone have an ETA when this might happen for RC motors?

TIA
Power to the Burtie! :D :twisted:

User avatar
TylerDurden
100 GW
100 GW
Posts: 7543
Joined: Jan 04, 2007 5:50 pm
Location: Wear the fox hat.
Contact:

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by TylerDurden » Jun 11, 2011 2:27 pm

We are not worthy.

Image



:mrgreen:
Have a Nice Day,

TD

Image
___________________________________________________________

FYI: Adding pictures?

Bored?... take a crack at the unanswered posts

Please post your Watts-at-speed in the survey.



Image

User avatar
bigmoose
1 GW
1 GW
Posts: 3069
Joined: Aug 06, 2009 3:05 pm
Location: North coast USA
Contact:

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by bigmoose » Jun 11, 2011 8:00 pm

Great progress! As they say, do what you love and the acclaim will follow!

Con: Beware of mud and false triggering.
Last edited by bigmoose on Aug 07, 2011 7:06 pm, edited 2 times in total.
"Live simply. Love generously. Care deeply. Speak kindly. Leave the rest to God..." all the best, Dave

User avatar
rodgah
10 kW
10 kW
Posts: 584
Joined: Dec 23, 2009 7:07 pm
Location: Sunshine Coast, Australia

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by rodgah » Jun 12, 2011 4:36 am

Good work burtie,

I for one knew it was possible but not in this kind of DIY fashion. I have used optical encoders before on axes drives on cnc laser cutter and flame cutters. It is too long ago to remember brands/sources but I am sure you could find an optical encoder that is completely enclosed (no probs with sunlight) that has a spinning disc(locked to the shaft) with much the same pattern as whats on the can of your turnigy. Not very useful for an outrunner unless you want a complicated mounting bracket, but for a inrunner I think it would be a very good bolt on fix. If anyone out there knows of where to buy encoders like this please share as I have searched and not really found anything significant.

Anyways excellent burtie I have thought about this for a long time on weather that kind of setup would work, wish I had the ability to R&D things like that.

Cheers
Common Sense isn't so common........
Image
Specialized BigHit
Electrapunk
Stinky

flathill
100 kW
100 kW
Posts: 1397
Joined: Jul 06, 2010 9:26 pm

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by flathill » Jun 12, 2011 3:10 pm

one could create an inexpensive position sensor with hall emulation
it could even have integrated rpm/load dependent timing (hint hint)
it could be shipped pre-programmed for your joby/astro/whatever motor
(if the programmer is just a cable/software it could have dyno tuned presets :D )
it could have a one step setup (calibrate zero position)

6 pole pairs: http://www.austriamicrosystems.com/eng/ ... ers/AS5134

10 pole pairs: http://www.amtencoder.com/Product/AMT303

a single magnet on the end of the shaft seems simpler than screwing around with shaft adapters

BillMckraken
1 mW
1 mW
Posts: 13
Joined: Jun 17, 2011 11:30 pm
Location: Indiana

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by BillMckraken » Jun 17, 2011 11:38 pm

OMG Wow!

I am just getting into the RC motor route have been nervous about hall reliability. It looks like a sensored setup is critical for proper functioning, power, and reliability. I also have been hoping...bah..praying someone would make a "bolt-on" kit!!!
From what bit I know, it seems, Opto may be the way to go. I plan on running the a Kelly controller, so this would work well.

I DEFINITELY WANT ONE!! Please ;). I can't wait for when they are ready, lol.

Thank you much for your efforts!

User avatar
spinningmagnets
100 GW
100 GW
Posts: 10721
Joined: Dec 21, 2007 10:27 pm
Location: Ft Riley, NE Kansas

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by spinningmagnets » Jun 18, 2011 12:37 am

I have seen postings from others that indicate that halls will work much better on the 80-100 when they are mounted inside. Internal mounting is not too difficult, but there are a lot of enthusiasts who would MUCH prefer an external solution to sensored brushless timing.

For many, if they have to disassemble a motor to add halls, they will just buy a different system. I think this will prove to be VERY popular.

kenkad
100 W
100 W
Posts: 190
Joined: Oct 12, 2009 9:36 pm
Location: Union Grove, AL, USA

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by kenkad » Jun 18, 2011 8:10 pm

Consider something like the folowing using the magnetic rotary sensor:
1. Small double sided PCB with rotary sensor and PIC micro, a few LEDs, an 8 position DIP switch, etc.
2. mount the sensor/PIC PCB so a small toothed belt driven by the motor shaft turns an appropriate pully (equal sized if only 3 phases) wherein this pully shaft rotates with the embedded dimetrically polarized rod magnet needed by the magnetic rotary sensor.
3. Using an oscilloscope, set the 8 position (PIC does the offset calculation) DIP switch so that the Hall simulated outputs (PIC outputs) are 'zeroed' as would be required to track the phases.
4. Possibly using another DIP switch (2 or 3 position), set the desired amount of advance/retard based on motor RPM.

Add whatever else functionality you might want.

This is what I am planning for my multi 3 phase motor design research.
Kenkad

User avatar
boostjuice
100 kW
100 kW
Posts: 1027
Joined: Jul 27, 2008 8:50 am
Location: Canberra, Australia

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by boostjuice » Jun 18, 2011 9:28 pm

Brilliant find! :idea: and at a reasonable price (US$43)for a tiny (37mm x 11mm) self contained bolt-on product that provides direct outputs compatible with any device requiring encoder or commutation U/V/W signal input at standard TTL logic levels! Super high resolution as well (1,024 PPR [positions per revolution] Thats accuracy to 0.35 of a mechanical degree)!
flathill wrote:.....a single magnet on the end of the shaft seems simpler than screwing around with shaft adapters
Whilst it's true that the limited size range of the shaft couplers is only 2mm>8mm, there is nothing stopping users drilling and tapping a centred hole in the end of larger diameter shafts (ie common Astro 3/8" shafts), screwing an appropriately sized smooth shank bolt partially in till it bottoms out (with loctite), cutting the head off the bolt, and there you have it. You can now slide your coupler over the excess shank protruding from the end! You would probably need a lathe to get the centre accuracy required, but thats a small issue compared to fabricating something like this from scratch!
Astro_Encoder.JPG
Astro_Encoder.JPG (6.16 KiB) Viewed 5709 times
Funky method of transducer measurement as well!

Encoders contain two capacitive channels: a Fine channel and a Coarse channel. The Fine channel has
16 wavelengths of a periodic capacitive pattern, while the Coarse channel has 5 wavelengths. Each channel has its own ASIC that interpolates the channels to a resolution of 256 increments per wavelength. A microprocessor on the encoder PCB combines the twochannels to achieve the absolute, incremental and commutation outputs depending on the model.
From catalog


Datasheet

Encoder Installation video

Image
Last edited by boostjuice on Jun 19, 2011 7:54 am, edited 1 time in total.

flathill
100 kW
100 kW
Posts: 1397
Joined: Jul 06, 2010 9:26 pm

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by flathill » Jun 19, 2011 4:28 am

Astro also sells double exit shafts, one of which you could turn down

User avatar
bigmoose
1 GW
1 GW
Posts: 3069
Joined: Aug 06, 2009 3:05 pm
Location: North coast USA
Contact:

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by bigmoose » Jun 19, 2011 5:39 am

Take a look also at the Renishaw RLS AM4096, it has a RMK4 development kit that is ready to rock and roll. Only goes to 8 pole pairs however.
Last edited by bigmoose on Aug 07, 2011 7:11 pm, edited 2 times in total.
"Live simply. Love generously. Care deeply. Speak kindly. Leave the rest to God..." all the best, Dave

User avatar
boostjuice
100 kW
100 kW
Posts: 1027
Joined: Jul 27, 2008 8:50 am
Location: Canberra, Australia

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by boostjuice » Jun 19, 2011 8:44 am

bigmoose wrote:Take a look also at the Renishaw RLS AM4096, it has a RMK4 development kit that is ready to rock and roll. Only goes to 8 pole pairs however.
Yeah, they are interesting. However you would still have to build a housing for the board.

These ones are housed (still 8 pole pairs max)....but i dont think you can order RLS products in small quantities like you can for the AMT303

User avatar
mdd0127
1 MW
1 MW
Posts: 1517
Joined: Sep 30, 2008 4:43 pm

Re: Optical sensors on a turnigy outrunner (working, with vi

Post by mdd0127 » Jun 20, 2011 2:03 pm

These look really cool. I looked at them a while back but had a concern. There is only one thing that makes me question their reliability for our application. It appears that it's using a compression fit on the plastic adapter that interfaces the shaft. I didn't see what material was specified for the adapter but it would have to be some kind of sticky urethane or something to work. When I was setting up and messing with the encoder I made for the 3220, I tried to tighten the magnetic trigger disc that bolts to the end of the shaft up just enough that I could try slight adjustments by holding the shaft with pliers and rotating the trigger ring with another set. It was way too tight to turn by hand but the acceleration of the motor would cause the mag ring to slip. I had to loctite it and tighten it down all of the way each time I tried a different position. If I had cut the adjustment slots in the sensor module a little longer, no mag ring adjustment would have been necessary........Anyway, that adapter needs to really grip the shaft and using the smaller shaft contact area and a friction fit adapted to a larger motor might not work. When the motor is actually installed, it won't be able to accelerate fast enough to cause slip 99% of the time though.......I guess I'll just have to order one and see how it works. Building everything from scratch takes too long. Being able to order things like this gives me more time to figure out other stuff!
Turn it OFF!!!

Apocaloptimist! (thx Kiwi!)

Post Reply