web counter
web counter

Our Second Electric Vehicle

RSS

I really preferred the look of the segway with its motors behind him, but arrived at the conclusion earlier tonight that I had no choice but to flip the segway 180 degrees, moving the handle bar to the back. Was able to perform this change rather quickly and was very surprised to see that the software required absolutely no changes.

Encouraged by these successes, decided to calibrate the steering gyro & accelerometer and re-enable my code to get the IMU to steer the segway when the handle bar is pushed down on either side. The internal springs always returns it to level.

Another success: I can now steer the segway just by pushing on the left or right side of the handle bar just like James suggested, designed and fabricated that option! The segway can spin in place clockwise or counterclockwise.

Oh, one more thing, decided to disable the gain potentiometer and just set that variable to max power, one less element to deal with.  …for now.

Trying creatively to add weight to the front to compensate for the fact that even standing at the very front edge of the segway when the motors engage, we have a “nose lift-off” which throws me off balance repeatedly.
So, OK, I (temporarily) gave up and tried adding a training wheel to see Pronto the segway perform and …surprise, surprise, real stable forward and backward movement. This (should) mean the software is working fine!

Trying creatively to add weight to the front to compensate for the fact that even standing at the very front edge of the segway when the motors engage, we have a “nose lift-off” which throws me off balance repeatedly.

So, OK, I (temporarily) gave up and tried adding a training wheel to see Pronto the segway perform and …surprise, surprise, real stable forward and backward movement. This (should) mean the software is working fine!

Oct 9
After quite a few iterations of tweaking the code, I think I may be getting closer to a working Segway.. As per the image above, it looks like a) the IMU is pretty stable and b) the motors will output a good representation of what IMU is picking up… The top graph shows the Filtered Angle captured by the Gyroscope/Accelerometer pair with a weighted average of 80%/20% in favor of Gyro. The bottom chart shows the Motor power applied as a result… Note, Steering functions are still disabled until straight motion is mastered…
We’ll see tomorrow night how it behaves…

After quite a few iterations of tweaking the code, I think I may be getting closer to a working Segway.. As per the image above, it looks like a) the IMU is pretty stable and b) the motors will output a good representation of what IMU is picking up… The top graph shows the Filtered Angle captured by the Gyroscope/Accelerometer pair with a weighted average of 80%/20% in favor of Gyro. The bottom chart shows the Motor power applied as a result… Note, Steering functions are still disabled until straight motion is mastered…

We’ll see tomorrow night how it behaves…

Oct 9

After a busy evening rewiring the Segway so the ground would never be interrupted (I can now use the Arduino On/Off Switch installed last night) and performing another series of tests to understand why our Segway just doesn’t perform like J.D.’s (which I was able to try at the Atlanta Mini Maker Faire this past Saturday), I finally decided to move the IMU down to the battery level (from the handle bars where he was located till now).

Oh wow! It felt immediately more stable, and with some more tweaks on the code, we may be on to something….

Oct 9

Another Poof!

Guess What?!? Yesterday, while hooking up a Voltage Regulator, I blew up the USB/Serial connectivity of my Arduino Uno. Well today, while re-wiring everything (according to image above) so I would not interrupt the ground anywhere, I somehow short-circuited 24 Volts to ground and blew up up my brand new Voltage Regulator… Poof!. Blue Smoke, good scare…

Turns out nothing else got fried, but my dog insists on keeping her distances with the Segway… Killed the ground, replaced the Voltage regulator and off we go with more testing…

Oct 8
So we need to order a replacement for our injured Arduino and I wonder if the “Ruggeduino” (www.ruggedcircuits.com) at $39.95 isn’t the ticket… Looks like this version is solidly protected against all the harm I can bring him. If they would have had any in stock tonight, I would have already placed my order…

So we need to order a replacement for our injured Arduino and I wonder if the “Ruggeduino” (www.ruggedcircuits.com) at $39.95 isn’t the ticket… Looks like this version is solidly protected against all the harm I can bring him. If they would have had any in stock tonight, I would have already placed my order…

Oct 8

Poof!

Well, just like Shazam! the Electric truck (evmaker.tumblr.com) blew up 2 weeks ago, tonight was Pronto the Segway’s turn to go Poof!

While we were connecting the 12 Volt Voltage Regulator to the Arduino Uno, I shorted one of the USB Header pins and …Zap!, Psst!, Smoke, …and Oops!

After some troubleshooting, looks like the whole Duino is fine except for his USB/Serial chip which is dead. No more recognizing the Uno from the PC, which means no more IDE programming via USB. Seriously injured Arduino…

Ordered our next Arduino (compatible) board tonight: A $36 72 MHz ARM Cortex M3 board. Isn’t it a coincidence that it happens to be Red just like the Canadian Maple Leaf (flag)?? We’ll soon see how it behaves with our projects…

Ordered our next Arduino (compatible) board tonight: A $36 72 MHz ARM Cortex M3 board. Isn’t it a coincidence that it happens to be Red just like the Canadian Maple Leaf (flag)?? We’ll soon see how it behaves with our projects…

Lots of Arduino Sketch work!

After quite a few hours (and days!) tweaking and data-modeling the Arduino sketch to fully understand the IMU (Accelerator & Gyroscope) values (just to to go forward & backwards - we already disabled all steering functions), we feel we are getting somewhat closer to a working Segway: but we are not there yet!

We find it very tricky to obtain the proper ratio between IMU movement and DC motor power…

More welding!
After an exhaustive week-end of testing the segway, we came up with a few conclusions:
#1 - Segway needs to be balanced without power so it can ride easily. (That’s what we achieved today by pushing forward the riser & steering handle bar. -Pictured above, the part that is not Auburn Orange…)
#2 - The Arduino Sketch needs to exponentially match the angle to the motor speed to auto-balance. (This is what we will focus on this week).

More welding!

After an exhaustive week-end of testing the segway, we came up with a few conclusions:

#1 - Segway needs to be balanced without power so it can ride easily. (That’s what we achieved today by pushing forward the riser & steering handle bar. -Pictured above, the part that is not Auburn Orange…)

#2 - The Arduino Sketch needs to exponentially match the angle to the motor speed to auto-balance. (This is what we will focus on this week).

Second Electric Vehicle in the bed of our First Electric Vehicle.
Pronto the Segway is in the bed of Shazam! the Electric Truck for a 10 mile ride to the 12 mile trails… (go to evmaker.tumblr.com for more details).

Second Electric Vehicle in the bed of our First Electric Vehicle.

Pronto the Segway is in the bed of Shazam! the Electric Truck for a 10 mile ride to the 12 mile trails… (go to evmaker.tumblr.com for more details).

SUCCESS! Completed the assembly & soldering of the Segway today!

After a busy lunch building the Segway and soldering it after work hours, we finally got to test our second electric vehicle tonight. After an extensive run of tests and a few tweaks, we are happy to report that aside from steering, everything else just works awesome. However, we learned that the more balanced the segway is as you build it, the better!

Katchow!

While waiting for Sabertooth 2x25 to arrive, it gave us the opportunity to paint the Segway with some colors that will be visible from a (long) distance [Auburn Orange!], then, once Sabertooth was finally in our hands, Integration testing started…

Disappointment… the code we had tweaked & fine-tuned was only spinning one motor. Decided to call Sabertooth Technical Support and Surprise, Surprise, not only did a live person answer, she was ready, willing & able to help me figure this out…

Turns out that the way I was (serial.print) sending values to Sabertooth was wrong and I just needed to look at their library/examples and modify my sketch. Well, in no time we had our sketch ready for integration into Segway and tomorrow will tell how all of this works together…

After a quick Primer spray paint job and re-assembling the batteries in their support braces, temporarily laying the power & data wires, we have something that starts to look like a Segway.
Now, if I could receive that Sabertooth 2x25 motor controller…Scheduled for tomorrow delivery. Can’t wait!

After a quick Primer spray paint job and re-assembling the batteries in their support braces, temporarily laying the power & data wires, we have something that starts to look like a Segway.

Now, if I could receive that Sabertooth 2x25 motor controller…Scheduled for tomorrow delivery. Can’t wait!

Time to weld & drill the handle bar receiver. With the attached spring, the handle bar will also be able to pivot left to right and be (hopefully) used for steering purposes (thanks to another 2 DOF from the IMU).