Category Archives: Autonomous Vehicle

The Elcano2 project — an autonomous recumbent tricycle built for Embedded Systems courses.

August Build update

Hi, I’m John Paul. I’m a student assistant to the CSS department, and I’ve been assigned to assist Josh on this project.

It took me a couple days to get up to speed on the project, but things are improving, and I’ve made some great progress. My first task was to figure out how RC signal works. I found that it sends a pulse between 1 millisecond and 2 milliseconds, with 1.5 ms being ‘neutral’.

Next, I went through each of the receiver’s channels to figure out which channel corresponded to each RC controller’s input. On a side note, the RC controller’s name is Bob, and the list of inputs-to-channels can be found in the Google Drive folder that is linked at the bottom of the post, along with some other pictures and notes.

I then proceeded to learn more on how to program Arduinos and to begin to have our arduino handle all of the receiver output. Hopefully, by doing it this way, it will be easier to have the RC controller and the self-guide system not interfere with each other, or, what I’m thinking will probably happen for now, is to have the RC controller be able to override the self-guide system for safety’s sake.

Along the way, I helped Josh wire up the controller to the motor, and test the controller for proper responses. I also hacked together a braking rig for temporary use until we can get some pulleys.

2013-08-27 13.26.47

Josh had a breadboard to use for some of the wiring, so I’ve found that using it helps a lot with attaching all of the servos and such. I found that the servo actually can power the breadboard and through that can power the other components.

In order to start mounting the components to the trike, I had a wooden frame built that can rest on the rear rack and secured as needed.

2013-08-27 13.39.20

 

I have temporary code that I use to test the outputs and that can also be found in the Drive folder as RC translator. I also included some comments in the code that explain which pins the arduino uses for interrupts. More details about interrupts or other arduino functions can be found on the official website.

There are a couple things left to do before we can actually take it out and test it. We have to mount a servo to be used to steer the trike (kind of important); program the arduino to use both the servo brake and the motor brake simultaneously (this could prove to be a challenge); and figure out how the controller does reversing, and make sure that the arduino doesn’t try to reverse while moving forward and kill our motor.

https://drive.google.com/folderview?id=0B-U6Mu7SsMazTFlxQUFLamhZdTQ&usp=sharing

Small progress

Not much to report yet. Some more parts came in:

  • An RC transmitter/receiver combo for remote control and remote kill switch
  • Another 12v battery and charger for the servos and pretty much everything else except the motor and controller.
  • A voltage regulator to split the 12v servo battery into 12v and 5v, the 5v being for the arduinos and servo controllers and such (the motor controller also provides a 5v supply, but not enough current to drive all the 5v equipment, I think).

And I went to McLendon’s and picked up some wire, 1/4″ female spade connectors (for the battery terminals), a 30 amp fuse and holder, and some other bits and bobs, enough to wire up the batteries and chargers, at least. I wired up the batteries and cut the alligator clips off the chargers, replacing them with powerpole connectors which matched the ones I’d put on the batteries. I also put powerpole connectors on the voltage regulator. The 36v battery pack is charging now, and that’s about all the progress I have for today.

On the powerpole connectors, black is ground, red is +36v, orange is +12v, and pink is +5v.

Electric wheel and controller

I’m going to start trying to test some of the electronics this week prior to mounting them on the frame. We don’t have a throttle, so this might be tricky. It looks like all the throttle does is provide a 0 to 5v signal, though, so I should be able to rig something up pretty easily. I’ll see. Right now, some quick notes on components.

The hub motor is a Leaf Bike pre-built 20″ wheel, probably this one. It didn’t come with any documentation that I can find, so I’m hoping the connectors are standard.

The controller is a Kelly Controls KEB48201X. The user manual is available online, and explains that the model number means this is an e-bike controller with a nominal voltage of 48v (hrm; I thought this was a 36v system), maximum output power of 200kW (I must be reading the manual wrong; I’m sure that’s 2kW, not 200), regenerative braking, and “extended performance”, whatever that means.

The steering and brake servos are a pair of 12v, 50mm and 100mm stroke, 25lb thrust, heavy duty servos from Servo City. They come with digital controllers which I don’t see any documentation for. I’m assuming this is because they take the same input as, say, radio controlled airplanes’ servo controllers do, and it’s assumed that anyone buying one of these already knows what kind of inputs they should be feeding them. Time for me to read up.

For microcontrollers, we’ve got four Arduino Mega 2560s and four Arduino Nanos. Sensor-wise, there are five XL‑MaxSonar‑EZ2 ultrasonic rangefinders, a UM6-LTorientation sensor, and a
ACS758LCB-050B-PFF-T linear current sensor. We’ve also got a pair of SparkFun CAN-BUS Arduino shields, a LinkSprite GPS shield and some joysticks.

Still to buy: another 12v battery (we have three, which will provide 36v for the motor, but I don’t want to tap one of them to power the servos, since that’ll result in uneven discharge across the set), a bunch of wire and connectors, some aluminum sheet or good plywood for mounting everything on, pulleys for the steer-by-wire linkage I have in mind, and who knows what else. I’ll keep a list.

Measurements

A few quick measurements of tube diameters on the trike frame:

  • Main boom: 51.25mm
  • Seat supports & horizontal strut between them: 26mm
  • Chainstays: 32.25mm
  • Fork supports (what is this part on a trike called? The bit where the axle would be if there were one): not exactly round, but close to 45mm either way
  • Steering linkage rod: 12.65mm (.5″)
  • Boom extension, main: 45.3mm
  • Boom extension, riser: 32.3mm
  • Headlight/accessory mount: 25.4mm (1″)

I think those are the tubes I’m most likely to be wanting to attach things to.  

Adding a rear rack

I’m beginning to have some doubts about the cycle shop where we got this trike. When we asked about a rear rack that would work with this trike, they sold us a Topeak Super Tourist DX Disc. There’s nothing wrong with that rack on its own — I’m pretty sure that’s the model I have on one of my own bikes at home, and it works great. But the bike I have it on at home has 26″ wheels. This trike has 20″ wheels. If you mount the rack to the point on the frame where a rack would normally mount, there’s no way to make the rack level; it sits at a severe backward tilt. So they gave us some angled extenders to move the mount point back a few inches, too. In order to mount the extenders where they’re supposed to go, you’d have to grind off a corner to fit it against the dropout. (Instead, I mounted them to the inside of the dropouts, where they would get bound up in the gears and chain if there were a cog on the motor hub.) And to attach the front struts to the frame, you either have to mount them sideways (shop guy’s recommendation, and I can’t quite figure out how you could make it work without tipping the rack forward, which is the opposite of the original problem) or undo the 90-degree bend in the struts. I opted to put the struts in a vice and remove the bend.

And then the plastic shims he gave us to use to attach the front struts to the frame have zero traction against the frame, and slide laterally under load. I’m going to replace them with a couple layers of old inner tube later, which should help. But even with that, this arrangement just isn’t going to be as strong as it ought to be. This is a good rack, but it’s the wrong one for this frame. We’ll see how it handles a bunch of heavy lead-acid batteries. I suspect it’ll wobble some, unless I distribute those towards the bottom and split them between the two sides.

Oh, and while I was working on this, a piece fell off the handlebars, because either it never had a nylock nut installed, or it was installed less than finger-tight and fell off somewhere. Again, this isn’t a big deal since I’m stripping those bits off anyway, but it bothers me how many loose bolts I’ve found on this. The loose brakes were especially bad. At this point, I’d almost prefer it if they’d given us the unassembled frame and components, and let me put the whole thing together from scratch, because now I can’t trust anything and I’m going to have to take it all apart and put it back together anyway. Hrmf. I hope we got a discount on the shop time, at least.

Anyway, here are some photos of the rack, now that it’s on.

Electric wheel installed

I brought in the pipe cutter and trimmed about 2mm off each hub spacer today, bringing the hub spacing down to more like 131mm. It was still a tight fit between the dropouts, so I suspect the frame spacing was 130mm, not 132.5mm like I thought. I also swung by Gregg’s Cycles in Lynnwood and picked up some headset spacers so I could take off the handlebars. I must have mis-measured how tall the stem was, because 30mm of spacers left a gap before the stem cap. 40mm worked fine, though, so I’ll exchange the two 10mm spacers I got for another pair of 20mm and do the other handlebar later.

Notes:

  • The drive-side hub spacer can’t be removed without first removing the connector at the end of the control cables. I opted not to do that, and just cut it with the cable inside. Wrapping a rubber band around the end of the spacer tube made it possible to rotate the tube in the cutter by hand.
  • The rear dropouts are extremely shallow. I’m not sure they’re even as deep as the entire axle of the hub motor. This probably won’t be a problem for an unmanned vehicle, but I’d be concerned about slippage if this were a build for something a person were going to ride a lot. I probably want to pick up a torque arm so that the dropouts aren’t taking all the torque from the motor.

Catrike Pocket frame spacing issue

I took 15 minutes and stripped the idler pulley and chain guides off the trike frame today. Then I took the handlebars off and realized I’d need to pick up some spacers to keep the headsets happy without handlebars, and put them back on. Total time, around half an hour.

Then I removed the rear wheel, transferred the tire, tube, and rim tape over to the electric wheel (I can’t believe it didn’t come with rim tape!) and tried to install the electric wheel. Should have taken about ten minutes, max. After about half an hour of trying to get the electric wheel installed, I gave up for the day. It turns out that the electric wheel (a Leaf Bike conversion wheel) has 135mm spacing. The Catrike Pocket does not have a 135mm rear spacing. It’s more like 132mm, and the frame is so stiff that I simply could not get it pried apart enough to drop the wheel in. I tried spreading it with an Irwin quick-grip clamp in spreader mode, except that there isn’t enough room to do that with the wheel inside the rear triangle.

I’m going to bring a tube cutter in to work tomorrow and cut about 1mm off each spacer shim on the electric wheel, to bring its spacing down a little. I don’t think trying to spread the rear triangle on a thick-tube aluminum frame is a good idea.

(While I was stripping off the chain guide and such, I realized that the brakes and speedometer sensor mount hadn’t been installed properly. I hope the bike shop did that on purpose because they knew we were going to be stripping it; otherwise, that’s just sloppy.)

Elcano2 Autonomous Vehicle

Professor Stiber included for scale.

Hi, I’m Josh, IT support for the CSS program. I’ll be documenting the build of an autonomous vehicle this summer for use in upcoming CSS 427 and CSS 428 classes (Introduction to Embedded Systems and Advanced Embedded Systems). Those classes will be taught by Dr. Tyler Folsom, who is currently finishing the build of the Elcano Autonomous Vehicle Mark 1.

Janet and I went down to Angle Lake Cyclery in SeaTac today, where we picked up a Catrike Pocket recumbent tricycle stripped of most of its drivetrain and controls. We’ll be using this as the base for the Elcano2 robot. I’ll post more about the other components as I unbox and get familiar with them.

After picking up the trike, Janet headed back to Bothell and Tyler and I headed over to the Jigsaw Renaissance maker space at Inscape to check out the current Elcano build. I took some photos of Elcano, but my cameraphone is pretty blurry, and I mainly took them for my own reference when I’m putting together Elcano2. I’ll take better pictures during the Elcano2 build and post them as I go.

I’m looking forward to learning a lot on this project, and sharing what I find. If you have any questions along the way, please feel free to leave a comment and I’ll try to answer as best I can.

Catrike Pocket and assorted boxes of components.