Free Agent 2 stage rc mid drive

Discussions related to motors other than hub motors.
This includes R/C motors, botttom bracket, roller and geared drives.
User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Free Agent 2 stage rc mid drive

Post by pendragon8000 » Tue Aug 05, 2014 8:19 am

10373715_10204300700386816_2413294708541575314_n.jpg
bmx mushies
10373715_10204300700386816_2413294708541575314_n.jpg (47.7 KiB) Viewed 7384 times
Hi guys. Ive made 2 DD hub motor ebikes and decided I'd have a go at RC mid drive. I ummed and erred about it but then i saw the electricbike write up about it and was inspired when i saw this pic:
Image
As i hade a couple head sets/stems spare already I droped into CBC bearings near my place and grabed some high rpm rated sealed Japan made bearings $7 each and put them in to see how it looks, then made a shim and cut the head set so I could mount it on the frame.

OK, how about i just continue with a YT vid...



*Turningy SK3 6374 149kv
*sentilon controler
*Arduino Nano to drive throttle signal to controller (input-throttle, rpm, thermistor , accelerometor and battery voltage)

xl timming belt 10mm wide 20t-50t
219 chain 9t-64t
top speed expected 30kph with relitevely high acceleration around 10-15 kph considering the total mass.

arduino code to go here:
---------
variables
throttle_min=10
throttle_max=170
current_0=readpin(current_pin)
current_lim=4
regen=0
upramp= 8 // degrees per 10mS


do
pin(throttle_out_pin) = throttle_out
if ebrake = 1 then throttle_out = regen
if ebrake = 0 then throttle_out = 0

if throttle_in<throttle_out then
throttle_out=throttle_in
end if

if current_in>current_lim then
throttle_out=throttle_out-int(sqrt(current_in-current_lim))-1
loop
end if

if milliseconds()=>10 then
fast_ramp=0
if speed/6000-.2 > throttle_in/180 then fast_ramp=18
if throttle_out>throttle_in then throttle_out=throttle_out+upramp+fast_ramp
t=time
end if

loop

------- (need to convert from basic to arduino, easy)

that obvoisly need work, I just thre that together just now of the top.
Last edited by pendragon8000 on Mon Aug 11, 2014 4:16 am, edited 2 times in total.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
gwhy!
1 MW
1 MW
Posts: 1780
Joined: Wed Jun 08, 2011 3:47 pm

Re: Free Agent 2 stage rc mid drive

Post by gwhy! » Tue Aug 05, 2014 9:11 am

this is the tread that the picture of the headstem came from, for ref : https://endless-sphere.com/forums/viewto ... +old+build

here is a link to a thread for a RC esc arduino throttle interface ( you may /may not find useful ) https://endless-sphere.com/forums/viewto ... =2&t=61407

yawstick
100 W
100 W
Posts: 146
Joined: Thu Oct 31, 2013 3:41 am

Re: Free Agent 2 stage rc mid drive

Post by yawstick » Tue Aug 05, 2014 2:42 pm

I hadn't seen that headset trick before..... thats pretty slick.... I just recently bought some 1/2 inch bore by 1 1/8 OD ball bearings. I just may have to try to use that on something.

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Tue Aug 05, 2014 4:27 pm

gwhy! wrote:this is the tread that the picture of the headstem came from, for ref : https://endless-sphere.com/forums/viewto ... +old+build

here is a link to a thread for a RC esc arduino throttle interface ( you may /may not find useful ) https://endless-sphere.com/forums/viewto ... =2&t=61407
Excellent. I'll have a good look at those threads.

Yawstick , yeah do it :)

YouTube video added to first post.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Sat Aug 16, 2014 7:27 am

At last I got a PC to program my arduino.....



Then the motor....



Sorry for mumbles. I'm tired.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
gwhy!
1 MW
1 MW
Posts: 1780
Joined: Wed Jun 08, 2011 3:47 pm

Re: Free Agent 2 stage rc mid drive

Post by gwhy! » Sat Aug 16, 2014 9:36 am

cool.. making some progress... one suggestion ... put a pull down resistor on the analog input of the throttle, its not a good idea to have the input floating should the throttle become detached in anyway.. a 10k resistor is good enough..

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Sat Aug 16, 2014 5:29 pm

gwhy! wrote:cool.. making some progress... one suggestion ... put a pull down resistor on the analog input of the throttle, its not a good idea to have the input floating should the throttle become detached in anyway.. a 10k resistor is good enough..
Yes, excellent suggestion. I'll do that.
Between neg and signal as close to the board as practically possible I guess.
I really need a high tensile 8mm bolt for the jack shaft. The one I have is plain steel and there's a noticeable wobble. Its minimal and I could get away with it for a while but it will wear the belt and chain quicker.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Sat Aug 23, 2014 8:44 pm

the top chain line just touches the frame under full tension . so im thinking a block of nylon to guide it slightly lower , about 5 mm. Rix?
chain under tension:
chain3.JPG
chain3.JPG (31.47 KiB) Viewed 6766 times
chain1.JPG
chain1.JPG (49.58 KiB) Viewed 6766 times
chain slack:
chain2.JPG
chain2.JPG (29.54 KiB) Viewed 6766 times
chain4.JPG
chain4.JPG (47.4 KiB) Viewed 6766 times
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
ferret
1 kW
1 kW
Posts: 351
Joined: Sun Aug 04, 2013 1:58 pm

Re: Free Agent 2 stage rc mid drive

Post by ferret » Sun Aug 24, 2014 5:50 am

The top part of the chain is under high tension when the motor is pulling and will have a lot of friction against a nylon block. It will cause power loss, noise and wear.
Consider using a sturdily mounted roller or pulley instead of a nylon block if you can't change the motor position to change the chainline and avoid the problem.

Avner.
Don't believe everything you think.

Cove GNG-Spot build thread

Astral Rune build thread

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Sun Aug 31, 2014 8:22 am

heres the moded code ive got so far. the ramp takes about 1.5 seconds to go to full speed.
turns out the cord i was using was dodge FML so yeah i cound the proper cord my mate gave me rather than the one i used to use for my camera and now im back in business. rocking ubunu ftw

Code: Select all

// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott> 

#include <Servo.h> 

Servo myservo;  // create servo object to control a servo 

int potpin = 0;  // analog pin used to connect the potentiometer
int val;   // variable to read the value from the analog pin 
int phase=1;
int ramp=2;
int thr_i=0;
int thr_o=5;

void setup() 
{ 
  myservo.attach(3);  // attaches the servo on pin 3 to the servo object 
  pinMode(13,OUTPUT);
} 

void loop() 
{ 
  thr_i = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023) 
  if (thr_o <thr_i) thr_o=thr_o+ramp;
  if (thr_o >thr_i) thr_o=thr_i;
  val = map(thr_o, 50, 850, 0, 179);     // scale it to use it with the servo (value between 0 and 180) 
  myservo.write(val);                  // sets the servo position according to the scaled value 
  val=val/phase;
  if (val >= 16) digitalWrite(13, HIGH);
  if (val < 16) digitalWrite(13, LOW);
  phase = phase + 1;
  if (phase > 10) phase=1;
  delay(5);                           // waits for the servo to get there 
} 
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
gwhy!
1 MW
1 MW
Posts: 1780
Joined: Wed Jun 08, 2011 3:47 pm

Re: Free Agent 2 stage rc mid drive

Post by gwhy! » Sun Aug 31, 2014 11:04 am

you dont need the 5ms delay for the servo to get there as it dont need to physically get there :D

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Sun Aug 31, 2014 4:24 pm

gwhy! wrote:you dont need the 5ms delay for the servo to get there as it dont need to physically get there :D
Yeah. Its acting as a time frame for the ramp.
I could or should do :

If ( T+5>=time milliseconds){
.......
thr_o=thr_o+ramp
........
T=time Milli seconds
}
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

yawstick
100 W
100 W
Posts: 146
Joined: Thu Oct 31, 2013 3:41 am

Re: Free Agent 2 stage rc mid drive

Post by yawstick » Mon Sep 01, 2014 8:29 pm

I hadn't been following this and I'm more of a hacker (modifying existing code) than a programmer but if if this is your first arduino project I would just get motor control part working before adding delay and such. I have used the sentillion ESC quite a bit and I cant remember if I calibrated the throttle to the controller or not. But I think you'll find that you can control this ESC with the servo output mapped to somewhere in the 45 to 130 range instead of 0 to 180. This will save you a lot of deadband below and above 45 to 130. I recently learned that the car type ESC almost require something closer to 0 to 180 if you have forward and reverse or 90 to 180 if you don't have reverse. Its also handy to have some serial print of your values so you can use the serial monitor to see what values you are sending to your controller and where it actually starts running and what value gives you full speed.

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Mon Sep 01, 2014 10:10 pm

Thanks. In the video you ca see I did get it running.
I found the range on the ESC to be 40 to 160 ish

In the code above I have the onboard led fade pulsing proportional to the throttle out.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

yawstick
100 W
100 W
Posts: 146
Joined: Thu Oct 31, 2013 3:41 am

Re: Free Agent 2 stage rc mid drive

Post by yawstick » Tue Sep 02, 2014 2:55 am

Oh ok, my bad... good job... I've had good service from that drive. My trike probably on the heavy side but easily pull 75 - 80 amps on 44 volts when accelerating before I added current limiting. You can current limit pretty well just by being gentle on the throttle. Sometimes easier said than done.

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Mon Oct 06, 2014 5:10 am

More progress soon.
Working full time again I can get some LiPo.
2 x 6s heavy duty 60c
Its a fun little bike. Looking forward to sorting it out.
I need a chain breaker for the 219 chain I think, so I can bring the axle forward, as it well help a little with the chain line and tension.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Sun Dec 07, 2014 4:44 am

8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Fri Dec 12, 2014 1:51 am

My new big short term goal is arduino Bluetooth Android app.
Hopefully look something like this....
Image
Probably not with all the GPS bizzo.
But on the arduino I will implement (at least attempt) a wheelie assist mode using a 3 axis giro I just ordered.

Edit
Oh yeah. Funny story.. My first phone app was using the giro sensors, when all are approximate zero it says in computer voice "I'm falling" , because zero g on every axis. So there I am after a few beers having made my ffirst app throwing my phone in the air laughing like a... Drunk programmer...? Yeah
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Thu Dec 25, 2014 9:10 pm

The terrible vibration noise is the large belt pulley on the jack shaft. I think it needs a second grub screw.

https://www.youtube.com/watch?v=LNsNliJ ... ata_player
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Thu Dec 25, 2014 9:17 pm

Also I put the new pedal chain on and it is slightly better but still needs a tensioner. I like the idea of a tensioner bringing the chain in toward the bottom bracket from underneath. Chain slap on the frame may be more of an issue but it will engage more teeth on the rear than pulling the chain away from the rear axle, and should give a cleaner look.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Sat May 02, 2015 8:13 am

http://i.imgur.com/xznqWF0.jpg
xznqWF0.jpg
xznqWF0.jpg (118.1 KiB) Viewed 4426 times
I found a group called
"hacker space Adelaide"
I took my bmx and worked on it. i got a powered low speed ride around the room after I moded the controller settings and my arduino code.
controller was programed for fast start and arduino was slowed down quite a bit for safety for now.
only running 6s today. soon upto 12s (50v) . need to make some encolsures and chain guides and its basicaly useable. I think bluetooth phone app HUD is definately a goal for the near future.
Last edited by pendragon8000 on Fri May 15, 2015 5:00 am, edited 1 time in total.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Mon May 11, 2015 9:06 am

progress, a few more parts to print. bit of wiring. Also Ive decided to add a idler chain guide to move the chain line around the seat stay, ill use some nylon on the chain stay. should be a simple welding of 10mm nut to frame and lathe down a skate board wheel. the chain line is sort of ok, but over time it will become an issue.
bmx_box1.jpg
bmx_box1.jpg (38.88 KiB) Viewed 4583 times
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Thu May 14, 2015 8:11 am

more progress on the enclosure
11255023_10206946875179532_8486724624740145143_n.jpg
3d printed battery enclosure, side
11255023_10206946875179532_8486724624740145143_n.jpg (49.81 KiB) Viewed 4473 times
11246979_10206946874979527_6899659619786968864_n.jpg
3d printed battery enclosure top
11246979_10206946874979527_6899659619786968864_n.jpg (49.23 KiB) Viewed 4473 times
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

User avatar
sn0wchyld
1 MW
1 MW
Posts: 1712
Joined: Fri Mar 18, 2011 8:27 pm

Re: Free Agent 2 stage rc mid drive

Post by sn0wchyld » Thu May 14, 2015 10:05 am

pendragon8000 wrote:more progress on the enclosure
11255023_10206946875179532_8486724624740145143_n.jpg
11246979_10206946874979527_6899659619786968864_n.jpg
looks bloody awesome mate... but how long did that take to print?!?!

User avatar
pendragon8000
1 MW
1 MW
Posts: 1794
Joined: Fri Sep 28, 2012 3:29 am

Re: Free Agent 2 stage rc mid drive

Post by pendragon8000 » Thu May 14, 2015 3:46 pm

sn0wchyld wrote:
pendragon8000 wrote:more progress on the enclosure
11255023_10206946875179532_8486724624740145143_n.jpg
11246979_10206946874979527_6899659619786968864_n.jpg
looks bloody awesome mate... but how long did that take to print?!?!
Thanks, 16hrs for the main piece. Other parts about 2hrs and lid was 4 hrs i think. I just ordered some carbon Kevlar for the sides.
8)HYENA high power ebike kits
My builds
scott 29er + Hyena kit, mon-goose to MON-STER 6KW, Free Agent RC Mid Drive, videos

my bike goes so fast 'cos it charges the battery while I pedal

Post Reply