Motobecane Cady with an RC drive

matt_in_mtl

100 mW
Joined
Aug 13, 2008
Messages
49
I have spent enough time on this forum reading about other people projects, it is finally time for me to stop skulking and give something back.

So, here is my first project:
SOiMlLDjJcnjLdNpFa0Bscr6NvbXmAEEYav9CUEake_sdkMK2R812QvjqDsNuJOIcUTVsTDu8jcy1Ejoy2sUsi4=s512


It has a 49cc motor, single gear ratio (no variator). Here are the bits I'm going to use for the first phase of the build:
V6F7MUfbOs_cqEStxAheo8sd11OGVqpwfSzkRit4gC9LAqcjIkIEZswfmy2mqzqfRWUJ43sPJhwTj7K4v80F4Vw=s512


So, that would be 2x 6S 5000mah Lipo, a HobbyKing 90-100A cheapo ESC, a Turnigy 170KV 63-74 outrunner, and the thing without a case is a 130A Turnigy watt-meter. Finally I also bought a cheap 6S cell monitor to give me some form of LVC monitoring.

The aims of this little project are 3-fold;
1) get this sweet little moped on the road under BLDC power

2) you will notice that the watt-meter has it's cover off. In case you are interested, here is what it's insides look like:
jLBgzW3CvESzonDUTi9RmRo8CZZgNgH4l89a2_fpP-VAjo9eC6YMJPqc946wxYsiIR3ciwYLhP2fwrS6kNS5UL8=s512


It's a fairly simple circuit. The uC has it's top sanded to obscure it's part number, there is still the word 'ATMEL' visible. Also, you can see a 10-pin header on the top right of the board. I traced the circuit and was able to verify that it is a standard 10pin AVR programming header. I tried reading the program from it, but it did not work, it looks like they set the read fuse. Why am I interested in this? At $24 each, this is a very cheap platform for a roll your own CA/throttleizer type system. It already has a shunt and an LCD. It would not be too difficult to use this to read a 0-5V throttle signal and use it create our RC signal for the ESC. Furthermore, it already has a shunt so implementing a current based throttle system should not be too hard. According to the Atmel documentation it should be possible to reset the fuses on the uC, but that also means erasing the program memory which will make this board useless until I have the new firmware written. So, in the meantime I will piggyback an arduino on this to read the shunt, read the throttle and make my RC PWM signals.

3) After way too many hours of researching BLDC control (for work and personal interest), I have come to the same conclusion as most interested on the topic on this forum. That is, if you want full torque from 0rpm, then you need real-time position feedback from motor. So, I'm going to try using hall effect sensors to replace the BEMF feedback circuit on the HK ESC. This is sort of like the inverse of the little sensorless add-on board that people were excited about a year or two ago (hopefully it will have better results though :D). I am hopeful that between implementing current based control of an RC ESC and hacking a cheap off the shelf ESC for hall based commutation, I'll be able to get some results worth writing about.

Thoughts, comments, questions are welcome. I know that this isn't the easiest/simplest way to get into this hobby, but this is more of an investment in learning/research than just having an ebike to ride. Also, here is a tool that may come in handy for the build, and that some of you may find interesting (since I know there are some here who share this particular interest):
xOjpR86M7lxPq4tigsElNcaI5etkF2xQsAhv-wvX7-jYDu6gceoOjhECatlAtdHNL9veEhWW4ZCNW7lxVhONG3c=s512


-Matt
 
I'm definitely interested in what you do with the wattmeter. It would indeed be nice to be able to use the wattmeter for more than just a wattmeter, since it's probably got more capability than they're using in it.

Also, I'm sure you know this, but you ought to move the electronics away from the machining tools before doing any work so they don't get little conductive land mines in them. ;)
 
AussieJester said:
I thinkz you needz alot more lipos possibly a larger
motor and definitely a better ESC...Best of luck

KiM

I will likely add more lipo once the setup is working. I'll be honest, I'm more interested in seeing how far I can push these components, and not trying to compete for most powerful ebike.... yet! 8) The stock motor is only 1-2hp, so it won't take much to improve on that. If I can re-program the watt-meter to do phase current based throttle control, that should help keep from toasting the esc, and if external halls give full torque from 0 rpm, then that would be a fairly deadly combination (though still limited to 6S lipo).

Amberwolf, that is good advice. The shavings in the picture are actually plastic. I was making a mould out of nylon for potting USB plugs for work.

-matt
 
I like the way you have supported the shaft with an additional bearing, i also thought
of a can over the motor with a bearing at the end would be a simple solution well done...
If i can find me some aluminium tubing the right size i shall be following suit in the not to distant future...
with the addition of some lovingly placed "lightening holes" of course :mrgreen:

Does the cooling of the motor seem to be affected alot?

Nice hob anywayz mate...

KiM
 
northernmike said:
It didn't have enough power for me.

I remember that build, I really liked it. Was the turnigy really under powered, or was it that you couldn't get full power/torque right from a start?

-Matt
 
matt_in_mtl said:
I remember that build, I really liked it. Was the turnigy really under powered, or was it that you couldn't get full power/torque right from a start?

-Matt

Those mobecanes are pretty heavy bikes arent they? I have a 50kilo bike with a Turnigy in it and it flogs, very fast acceleration
and nice top end speed...Im guessing it must be a weight thing? Interested in the motor if it is forsale and a new edition though as they are out of stock at HobbyCity and have been forawhile and me wants another motor to keep my current one company :)

KiM
 
Sold the motor+mount a while back, sorry.

Honestly the lack of take-off ability was what did it in for me.

On a lighter bike, the 80-100-B might be a nice motor. IF you can solve the off-the-line issues. Yes, top end was find, mid-range acceleration was fine, the motor was not the issue.

The lack of weight is a real plus on a small build like a Motobecane.

Hope this build goes well for you - be prepared to pedal, though, I think, with this little motor.

Building your own controller should be fun, keep us posted. Sensored does seem to be the way forward with these brushless things...

I DO love the eTek though.... :mrgreen:
 
northernmike said:
Honestly the lack of take-off ability was what did it in for me.

IF you can solve the off-the-line issues. Yes, top end was find, mid-range acceleration was fine, the motor was not the issue.
Sensored does seem to be the way forward with these brushless things...

I DO love the eTek though.... :mrgreen:

Hi Mike,
The take-off ability is very easy to resolve and has been done using sensors.

Out of intrest what is the weight saving with using the big outrunner compared to using the eTek ( Bearing in mind there may need to be additional hardware with the outrunners ( extra gear reduction ) and what are the power differences.
 
IIRC eTek = 22lbs. 80-100-B = approx 3lbs.

Alltrax 4834 = 7lbs additional.

eTek powers full size motorcycles, 80-100-B, model helicopters...

Again IIRC, not citing any sources, 80-100-B = approx 100A @ 50V (MAX) - 5kw.

eTek + Alltrax = 165A continuous, 300A max @ 60V. 18kw.

Someone can jump in here with torque numbers and such.

But, seriously, can a little BLDC outrunner, even sensored, keep up with a BRUSHED gigantic motor like this in terms of starting torque? I mean full load @ 0 rpm?

FETs are great, sure, but how great?
 
northernmike said:
But, seriously, can a little BLDC outrunner, even sensored, keep up with a BRUSHED gigantic motor like this in terms of starting torque? I mean full load @ 0 rpm?

I guess you will never know now LoL.. As GWhy said, the fitting of sensors (halls) would have solved this, something i am doing myself so i know the issues you were having. I don't know in a moped if the Turnigy would outperform the ETek simply because of the bikes weight, on a pushbike though Turnigy (on 66-88v) v's Etek would be close call i think...

KiM
 
I have a 10 pound drive unit sitting here (two Astro 3220s) that runs 28hp total (2,000 ounce inch torque at 14,000 rpm). RC motors are unparralelled in output power. But, the issue of startup is a frustrating one. On a light weight bicycle, this is not usually an issue. On something heavier (even a moped) it becomes problematic. The E-tech was a great solution for that application. :)

Matt
 
AussieJester said:
Those mobecanes are pretty heavy bikes arent they? I have a 50kilo bike with a Turnigy in it and it flogs, very fast acceleration
and nice top end speed...Im guessing it must be a weight thing? Interested in the motor if it is forsale and a new edition though as they are out of stock at HobbyCity and have been forawhile and me wants another motor to keep my current one company :)

KiM
[/quote]

The bigger Motobecanes can be a little heavy and hard to pedal. My girlfriend has a 50V mobylette, and it is a B1tch to pedal if the motor quits, and weighs maybe 80-100lbs. The Cady that I am working on though is a real lightweight. 40-50lbs, and pedals allot like a bike, not much of drag. The motor is rated at 3200W max, if I can even get 500W continuous it should be good enough for a proof of concept/testing/design etc. Once I can prove to myself that it is practical.. then more power/more money/ maybe a bigger bike?

So far I have managed to make the arduino act a servo tester (I know, impressive yes?) Actually I have gotten a ways past that. I am now tapping into the current shunt signal from the watt-meter so that I have battery current feedback. Based on this I threw together a current based throttle setup. I can specify a max current (for bench test I have been using 2A), and say 50% throttle will give me 50% max current. This should limit the huge initial currents the RC setups pull at low speed/high throttle. It is using a PD (proportional, differential) control loop. It works fairly well, thought it oscillates at low current, low load. Next step will be to calculate phase current so that I can keep the RC ESC from being cooked during slow, mid-throttle situations.

I have also bought a pulley for the motor. I couldn't find one with the 10mm shaft size that I needed, so I bought one with a 5/8 hole, and then bought a 5/8OD bushing and machined the ID of the bushing to the size of the motor shaft. I machined a flat on the motor shaft for the setscrew to seat against. I am curious to see how the belt systems works, my gut tells me it won't be very efficient.
SCHrT9IVzJpZpvDPlWsQkoAyLQNKC7xt0odVhgdBYLebQ4DehT6A8hnBIIevaLTwDxd9Ui_lniBPxOGRN0rDXSQ=s512


-Matt
 
Hi Matt,
that motor you have i think is the same as the one that I am using ( 3250watts) I have been able to use this motor upto 5kw ( my battery is the limit ) for short periods without ill effect and a constant output of about 2kw and remains well within temp limits. I would advise adding more glue to the magnets and also have a additional bearing on the output shaft. Are you using gearing on the bike ( variator setup ? ) or is it going to be a single speed setup.
 
gwhy! said:
Hi Matt,
that motor you have i think is the same as the one that I am using ( 3250watts) I have been able to use this motor upto 5kw ( my battery is the limit ) for short periods without ill effect and a constant output of about 2kw and remains well within temp limits. I would advise adding more glue to the magnets and also have a additional bearing on the output shaft. Are you using gearing on the bike ( variator setup ? ) or is it going to be a single speed setup.

gwhy!, I thought this may have been the same motor you are using. Good to hear that it can stand up to some abuse. I would like to add a bearing on the output shaft, but the stock shaft is too short. Did you replace your shaft? Also, the bike does not have a variator, so I will be sticking with single-speed for now.

-Matt
 
gwhy! said:
I would advise adding more glue to the magnets and also have a additional bearing on the output shaft.

I heartily recommend this. My motor's front bearing has "failed" at least 2 times already from taking abuse it wasn't meant to, so an additional support bearing seems to be a pretty good idea. Thankfully, my motor hasn't turned into shrapnel yet as it seems to fail in such a way that the drive system starts making a lot of noise and then I can see the motor is waving up and down as it rotates and, *bingo*, time to replace the bearing.
 
Hi Matt,
I think these motors are the best bang for your buck, I think they are so good I bought another :D . I added another bearing in the mounting plate and so far so good so there was no need to use a extended shaft. As soon as I can afford to get more batteries I will be pushing the motor even harder I think\hope it can take it ( may have to incorporate some active cooling ). I will be keeping a eye on your build as Im toying with the idea of doing something similar in the summer ( with a auto scooter ), good luck.
 
gwhy! said:
Hi Matt,
I added another bearing in the mounting plate and so far so good so there was no need to use a extended shaft.
Now that is good idea! I don't see any reason I couldn't duplicate that, thanks! :D

gwhy! said:
Hi Matt,
Im toying with the idea of doing something similar in the summer ( with a auto scooter ), good luck.

If all goes well, my ultimate plan would be to convert something like a vintage vespa using an 80-100 at least, along with with a capable controller and enough battery to give me usable range/power. I saw a project (evalbum):
imgm.php

where a guy had converted a vespa using a mars brushless motor and 36V 20Ah worth worth of Yesa LiFePO4. A very cool project, I would like to see the same results with more potent batteries and more stealth (everything tucked under the body panels) :D

-Matt
 
matt_in_mtl said:
So far I have managed to make the arduino act a servo tester (I know, impressive yes?) Actually I have gotten a ways past that. I am now tapping into the current shunt signal from the watt-meter so that I have battery current feedback. Based on this I threw together a current based throttle setup. I can specify a max current (for bench test I have been using 2A), and say 50% throttle will give me 50% max current. This should limit the huge initial currents the RC setups pull at low speed/high throttle. It is using a PD (proportional, differential) control loop. It works fairly well, thought it oscillates at low current, low load. Next step will be to calculate phase current so that I can keep the RC ESC from being cooked during slow, mid-throttle situations.

-Matt

I was wondering why you didn't use any I? Back when I was using a CC 110 esc, I used an arduino to implement a PID controller. D didn't seem to do much for me. P and I worked worked well to control the current draw from the battery. Can you share how you are going to calculate phase current? One of these day I may go back to an RC esc and an arduino.

Bubba
 
dontsendbubbamail said:
I was wondering why you didn't use any I? Back when I was using a CC 110 esc, I used an arduino to implement a PID controller. D didn't seem to do much for me. P and I worked worked well to control the current draw from the battery. Can you share how you are going to calculate phase current? One of these day I may go back to an RC esc and an arduino.

Bubba
Bubba,
my understanding has been that the integral term is important if you need to reach a precise point (like a servo position), it helps to amplify small errors so that you eventually converge to the desired state. If The motor consumes 2.1A instead of 2A, that is close enough for me :D Also, what happens if you specify say 40A, but at the current speed you can only get 30A through the motor? In this case the 'I' value will become very large. Now, consider you want to slow down to 10A.. the large 'I' value may overwhelm the P and D value, slowing down the response of your system (eg your throttle stays full for 1/2 second after to throttle down). I am more interested in having fast response than precise control.

regarding calculating phase current.. I spent some time thinking about this.. and came up with a simple solution. Basically power from the battery = power to the motor, and P = IV. Since we are directly controlling the PWM duty cycle of the RC ESC, we know the effective voltage going to the motor.
So, motor current = battery current * 1/(PWM duty cycle)
For example at 50%PWM duty the motor current is double the battery current.

-Matt
 
matt_in_mtl said:
my understanding has been that the integral term is important if you need to reach a precise point (like a servo position), it helps to amplify small errors so that you eventually converge to the desired state. If The motor consumes 2.1A instead of 2A, that is close enough for me :D Also, what happens if you specify say 40A, but at the current speed you can only get 30A through the motor? In this case the 'I' value will become very large. Now, consider you want to slow down to 10A.. the large 'I' value may overwhelm the P and D value, slowing down the response of your system (eg your throttle stays full for 1/2 second after to throttle down). I am more interested in having fast response than precise control.

regarding calculating phase current.. I spent some time thinking about this.. and came up with a simple solution. Basically power from the battery = power to the motor, and P = IV. Since we are directly controlling the PWM duty cycle of the RC ESC, we know the effective voltage going to the motor.
So, motor current = battery current * 1/(PWM duty cycle)
For example at 50%PWM duty the motor current is double the battery current.

-Matt

What you say about I is true and I have heard that the issue is called windup. I think if you lower your P and add some I that the oscillation will go away. Below is a snippet of code that I found somewhere that resolved the windup problem for me.

if (I_STATE > I_WINDUPGUARD)
I_STATE = I_WINDUPGUARD;
else if (I_STATE < -I_WINDUPGUARD)
I_STATE = -I_WINDUPGUARD;

The pictures show the clasic ringing of an untuned system and a the best tuning I achieved. These measurements were taken with my bike on a traning stand. This was with P &I but no D.

Bubba
 

Attachments

  • a ring.jpg
    a ring.jpg
    143.1 KB · Views: 4,146
  • a tune.jpg
    a tune.jpg
    137.1 KB · Views: 4,143
Back
Top