Optical sensors for commutation -Working

Get all your technical information about electric bikes here.

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

Postby amberwolf » Wed Jul 06, 2011 8:40 pm

Even if he is PWMing the optical signal for some reason, in order to actually control the voltage to the motor (and thus power and speed) it still requires PWMing the phases of the motor. (well, you could do it with linear voltage control but there would be a huge amount of wasted power at the controller)
Got a question that isn't personal or private? Post it in the forums, don't PM it. ;)

Wiki your techy info so it doesn't get old, lost and icky:
http://endless-sphere.com/w


Full-Suspension Semi Recumbent Cargo Bike - NuVinci MidDrive
Semi-Recumbent Recycled-Parts Cargo eBike: "CrazyBike2"
DayGlo Avenger, MkII


House Fire Updates Thread
User avatar
amberwolf
100 GW
100 GW
 
Posts: 15534
Joined: Mon Aug 17, 2009 6:43 am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group

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

Postby gtadmin » Thu Jul 07, 2011 4:45 am

Okay 8) Now I'm not a lecky-techie, but I've always thought that if you had 2 opto sensors sensing a spinning disk with 1 slot (aka an encoding disk), and you feed the on/off signals to a processor, you would always know the direction of rotation and you could put any advance / retard of timing you like, when and where you like (based on rpm / load). No precise placement of anything, everything configurable. And Burtie's the man, isn't he!

Of course the drawback would be the cost of the processor that is powerful (fast) enough to do all that.

BTW, I sure am glad you guys type s-l-o-w-l-y enabling people like me to grasp some of the concepts (or not :D )

Cheers,
GT
User avatar
gtadmin
10 kW
10 kW
 
Posts: 757
Joined: Fri Aug 07, 2009 7:46 am
Location: Whyalla South Australia

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

Postby Tiverion » Thu Jul 07, 2011 7:53 am

GT

You'd find this interesting. Lookup Gray code and rotary encoders and think about how you might apply that to your project.

--
Bill
Tiverion
1 W
1 W
 
Posts: 59
Joined: Thu Mar 24, 2011 9:38 pm
Location: Southport, Queensland

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

Postby gtadmin » Thu Jul 07, 2011 8:53 am

Thanks Bill, it was interesting, and I learnt something.

But with the can encoded, that encoding has to be positioned very accurately in relation to the optos, yes?

What I was suggesting is that provided we know where the can is at one point in time, then no matter what the physical relationship was between that point and the optos, it could be aligned with the optos (as near as) perfectly by the software in the processor, which then provides the "hall" signals to the controller. And you only need one opto to do it. The second opto is to provide clockwise / counter-clockwise sensing.

Jeez, I hope that makes sense :shock: :lol:
User avatar
gtadmin
10 kW
10 kW
 
Posts: 757
Joined: Fri Aug 07, 2009 7:46 am
Location: Whyalla South Australia

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

Postby mdd0127 » Thu Jul 07, 2011 10:07 am

Makes sense to me. :D
Turn it OFF!!!

Apocaloptimist! (thx Kiwi!)
User avatar
mdd0127
1 MW
1 MW
 
Posts: 1542
Joined: Tue Sep 30, 2008 4:43 pm

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

Postby Tiverion » Thu Jul 07, 2011 10:17 am

gtadmin wrote:Thanks Bill, it was interesting, and I learnt something.

But with the can encoded, that encoding has to be positioned very accurately in relation to the optos, yes?

What I was suggesting is that provided we know where the can is at one point in time, then no matter what the physical relationship was between that point and the optos, it could be aligned with the optos (as near as) perfectly by the software in the processor, which then provides the "hall" signals to the controller. And you only need one opto to do it. The second opto is to provide clockwise / counter-clockwise sensing.

Jeez, I hope that makes sense :shock: :lol:


Do you mean interpolating between trigger points? If so, then yes. Something like an Arduino is more than fast enough to pretty accurate timing between trigger points.



--
Bill
Tiverion
1 W
1 W
 
Posts: 59
Joined: Thu Mar 24, 2011 9:38 pm
Location: Southport, Queensland

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

Postby gtadmin » Fri Jul 08, 2011 1:22 am

Tiverion wrote:...Do you mean interpolating between trigger points? If so, then yes. Something like an Arduino is more than fast enough to pretty accurate timing between trigger points.

--
Bill

Yes. The uC would calculate all trigger points once the initial offset was configured in software. Of course, I would then need to understand what needs triggering, when it needs triggering, and in what order it needs triggering, something I haven't figured out yet (or more truthfully, haven't bothered to figure out yet). I think that if Burtie (for instance), who has a far greater understanding of these things, were to use this tactic, why reinvent the wheel? :)

Cheers,
GT
User avatar
gtadmin
10 kW
10 kW
 
Posts: 757
Joined: Fri Aug 07, 2009 7:46 am
Location: Whyalla South Australia

Re: Optical sensors on Astro + Turnigy (working)

Postby Burtie » Thu Jul 21, 2011 4:44 pm

Very encouraged by the amount of interest in this field.

Thanks for all the comments and suggestions. Some interesting products also brought to light (pun intended) :D


I have had a go at 'productionising' this stuff to fit most of our favorite RC motors:

The result is 2 PCBs;
One of which is designed to read a linear encoder fixed around the can of an outrunner. (Linear version)
The other is designed to fit inside the rear cover of an Astro 32xx and read an encoder stuck on to a disc. (Rotary version)

The rotary version can also be used externally, reading an encoder stuck to a small hub that could be attached to any motor shaft between about 5 and 18mm diameter. :P

Here is the rotary version fitted to an Astro 3220...

SDC12830.JPG
Rotary optical sensor inside end cap


SDC12824.JPG


SDC12825.JPG


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




The same Rotary version can be used externally, here on a Turnigy 80mm outrunner...

SDC12835.JPG
Rotary opto sensor fitted to a Turnigy outrunner


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



Finally the linear version...

SDC12863.JPG


SDC12860.JPG
Showing how the linear sensor might be fitted
SDC12860.JPG (239.27 KiB) Viewed 1201 times


Edit to add link to linear sensor test.
http://www.youtube.com/watch?v=6yB6Rh_bAzU



For further info /blatent plug: viewtopic.php?f=31&t=31961
Burtie
Last edited by Burtie on Tue Mar 06, 2012 7:41 pm, edited 2 times in total.
User avatar
Burtie
10 kW
10 kW
 
Posts: 543
Joined: Fri Mar 27, 2009 9:45 am
Location: UK

Re: Optical sensors on Astro + Turnigy (working)

Postby recumpence » Thu Jul 21, 2011 4:57 pm

OK, Burtie, where do I send funds? :mrgreen:

This is AWESOME!

I cannot wait to order a bunch of these for production systems.

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
recumpence
10 GW
10 GW
 
Posts: 4554
Joined: Sat Apr 19, 2008 8:33 am
Location: On Earth right now. That can change at any time, though..........

Re: Optical sensors on Astro + Turnigy (working)

Postby damcard » Thu Jul 21, 2011 5:13 pm

AWESOME! Maybe I finally can use my 3220. I want one Burtie. :D
User avatar
damcard
100 W
100 W
 
Posts: 293
Joined: Mon Feb 02, 2009 6:15 pm
Location: San Antonio, TX

Re: Optical sensors on Astro + Turnigy (working)

Postby dbaker » Thu Jul 21, 2011 5:21 pm

Yea, Burtie :D I have a 3220 sitting here I want to fit with your kit :mrgreen:
dbaker
10 kW
10 kW
 
Posts: 935
Joined: Fri Oct 24, 2008 2:32 pm

Re: Optical sensors on Astro + Turnigy (working)

Postby TylerDurden » Thu Jul 21, 2011 5:35 pm

Game-changer.

Great work, Burtie. :D
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
TylerDurden
100 GW
100 GW
 
Posts: 8617
Joined: Thu Jan 04, 2007 5:50 pm
Location: Wear the fox hat.

Re: Optical sensors on Astro + Turnigy (working)

Postby HumboldtRc » Thu Jul 21, 2011 5:50 pm

I don't remember if it was already answered yet... But will the sun or bright light mess with the optical sensors? Are we going to need some sort of shield for them?

I can't wait to buy a few of them and make my mountainboard sensored 4wd!!! It will be a hill climbing beast with sensors!!!! It already climbs really well, just not from a start below like 2-3 mph...
HumboldtRc
100 W
100 W
 
Posts: 296
Joined: Sun Aug 22, 2010 3:50 am

Re: Optical sensors on Astro + Turnigy (working)

Postby snath » Thu Jul 21, 2011 5:59 pm

Count me in for a couple.... one to screw up and one to use:) on the Astro that I bought from Recumpence a couple of years ago. The Halls that I fitted didn't work as well as I wanted them to.

Thank you,
Snath
snath
100 W
100 W
 
Posts: 121
Joined: Mon Jan 04, 2010 6:01 pm
Location: Georgia, USA

Re: Optical sensors on Astro + Turnigy (working)

Postby Burtie » Thu Jul 21, 2011 6:04 pm

HumboldRC, -Yep,
Water, Mud, Bright light -will all mess with the sensors. The external versions will need to be protected from these.


Thanks for the positive comments folks. I hope to make some of this stuff available soon to play with, just got to buy some parts, assemble a few pcbs and get some instructions written down.
:)
User avatar
Burtie
10 kW
10 kW
 
Posts: 543
Joined: Fri Mar 27, 2009 9:45 am
Location: UK

Re: Optical sensors on Astro + Turnigy (working)

Postby mdd0127 » Thu Jul 21, 2011 6:22 pm

I have one quick question. Have you thought about internal motor temps with regard to the selection of components?

If so, I need at least two for the astros.

I'm so glad you're making this stuff! The TA is amazing!
Turn it OFF!!!

Apocaloptimist! (thx Kiwi!)
User avatar
mdd0127
1 MW
1 MW
 
Posts: 1542
Joined: Tue Sep 30, 2008 4:43 pm

Re: Optical sensors on Astro + Turnigy (working)

Postby Burtie » Thu Jul 21, 2011 6:33 pm

The sensors are rated to work to at least 212F.

For the internal sensors, I guess the thermal situation would be similar to typical hall sensors mounted inside a hub motor. Or hall sensors glued into the slots of an outrunner.

The adhesive holding the encoder disc to the rotor also needs to withstand the internal motor temperture. I have yet to temperature test any of this prototype stuff, and am open to suggestions :wink:

For the real hard-core motor melting, stator cooking addicts, -they may be best off using the external sensors.

EDIT update:
Some temperature testing of the sensors inside an Astro here: viewtopic.php?f=2&t=28966&start=60#p455368
Last edited by Burtie on Fri Mar 09, 2012 10:20 am, edited 1 time in total.
User avatar
Burtie
10 kW
10 kW
 
Posts: 543
Joined: Fri Mar 27, 2009 9:45 am
Location: UK

Re: Optical sensors on Astro + Turnigy (working)

Postby rodgah » Fri Jul 22, 2011 5:42 am

its like music to my ears hearing that british accent saying internal optical sensors.....

one thing for the external turnigy....maybe the disc could just bolt to the endcap of the rotor with CS screws and have the "pattern" (whats the real name for this) in a sticker form to add to the disc once the right rotation is found, actually how do you find this>??? atleast i gather you wouldnt have to run the change the hall wire till it works routine, you would just move the encoder disc a position around till it did.

Excellent work burtie, I have just the project brewing for this, which has a 80-100 130kv internally mounted into a frame so no sun light will see it. Will work wonders for the sensors picking up the signal but I wonder how hot the motor is going to get.

Friggin legend!
Common Sense isn't so common........
Image
Specialized BigHit
Electrapunk
Stinky
User avatar
rodgah
10 kW
10 kW
 
Posts: 536
Joined: Wed Dec 23, 2009 7:07 pm
Location: Sunshine Coast, Australia

Re: Optical sensors on Astro + Turnigy (working)

Postby Whiplash » Fri Jul 22, 2011 8:43 am

IF these are readily available, I also will be interested in using it for my kits, it will keep me from having to make up hall sensor boards for each kit! PLEASE put me on the list of "contact when ready to sell"!!
Power is a fascinating thing, the more you have, the more you want, but the real power is having the restraint not to use it all at once...............Um...Yeah..

The harder you work.....The luckier you get!!

"People who say it can't be done are often interrupted by those that have already figured out how to do it!"

Email me @ currentcycles@gmail.com
OR check out http://www.CurrentCycles.net
User avatar
Whiplash
1 GW
1 GW
 
Posts: 3035
Joined: Mon May 10, 2010 2:55 pm

Re: Optical sensors on Astro + Turnigy (working)

Postby Burtie » Fri Jul 22, 2011 9:42 am

Thanks guys!

@Rodgah,
I did wonder about using those screw holes on the end of the outrunner to attach a disc. But like you pointed out, it would then not be possible to rotate the disc relative to the shaft to tune the timing.

Getting the right hall sequence is still best done by swapping the sensor wires until you get it spinning. Then you can move the hub relative to the shaft to fine tune the timing. When you are happy, just nip up the grubscrew, and it is done!


@Whiplash. The stuff should be available pretty soon. I will be sure to put you on the list :)


I managed to test the linear optical sensor board today, here is how it went:

http://www.youtube.com/watch?v=6yB6Rh_bAzU





Do you like the way it all got colour-co-ordinated ? ... completely by accident 8)


Burtie
Attachments
SDC12888.JPG
SDC12888.JPG (248.27 KiB) Viewed 824 times
User avatar
Burtie
10 kW
10 kW
 
Posts: 543
Joined: Fri Mar 27, 2009 9:45 am
Location: UK

Re: Optical sensors on Astro + Turnigy (working)

Postby spinningmagnets » Fri Jul 22, 2011 9:50 am

It seems I can't stop smiling right now! Thank you Bertie!!
User avatar
spinningmagnets
100 GW
100 GW
 
Posts: 6657
Joined: Fri Dec 21, 2007 10:27 pm
Location: Ft Riley, NE Kansas

Re: Optical sensors on Astro + Turnigy (working)

Postby Red_Liner740 » Fri Jul 22, 2011 11:26 am

put me down for some as well...not sure which style i will go with, but i will def be sending money your way one way or another!
Red_Liner740
100 W
100 W
 
Posts: 122
Joined: Fri Apr 22, 2011 11:44 am

Re: Optical sensors on Astro + Turnigy (working)

Postby dbaker » Fri Jul 22, 2011 12:29 pm

Wow, Bertie! That is the lowest Turnigy no load current I have seen. What voltage are you running? What controller? :D :D :D
dbaker
10 kW
10 kW
 
Posts: 935
Joined: Fri Oct 24, 2008 2:32 pm

Re: Optical sensors on Astro + Turnigy (working)

Postby GGoodrum » Fri Jul 22, 2011 12:55 pm

Finally, a sensor solution for Astros. :) Put me on the list for several of these as well.

Great work.

-- Gary
User avatar
GGoodrum
100 MW
100 MW
 
Posts: 2980
Joined: Thu Sep 20, 2007 2:03 pm
Location: South Orange County, CA

Re: Optical sensors on Astro + Turnigy (working)

Postby Whiplash » Fri Jul 22, 2011 1:26 pm

Will the rotary version work for the smaller Aero drive turningy like I am using? You just can't beat the price of that little guy!
Power is a fascinating thing, the more you have, the more you want, but the real power is having the restraint not to use it all at once...............Um...Yeah..

The harder you work.....The luckier you get!!

"People who say it can't be done are often interrupted by those that have already figured out how to do it!"

Email me @ currentcycles@gmail.com
OR check out http://www.CurrentCycles.net
User avatar
Whiplash
1 GW
1 GW
 
Posts: 3035
Joined: Mon May 10, 2010 2:55 pm

PreviousNext

Return to E-Bike Technical

Who is online

Users browsing this forum: No registered users and 8 guests