Friday, January 13, 2012

MKI: Motor Controller

At some ill-defined point in time routing becomes art, I think. I've spent the greater part of the last week transforming that schematic from my last post into the pretty pictures you will see below. It's my first motor controller so I don't want it to suck. Call it MKI if you like (i.e. motor kontroller one or MKI like the VW GTI). The point is I've hung around Shane too long and am beginning the motor controller phase of my life; which is sure to see many iterations.


This first - shield - controller is being produced for TOBL2 and is therefore stupid compact. I know this because routing was a beach. It's contained within a 1.65" x 1.85" form and will plug directly into the headers on XPWMShield I created last year.

MKI has some things that I'm proud of:

There are isolated ground planes on the bottom layer of the board. This technique was suggested by Shane, of course. The logic pins are tied to a ground plane (SGND) which is only connected to the main power ground plane (PGND) by an 0805 resistor. This resistor is sized such that it will explode when too much current is drawn, acting like a fuse to protect the current-sensitive pins on the logic end. In this case running at 6V and fearing 2A gives a 3ohm resistor.

Power ground plane.

Signal ground plane.

Each motor has three diagnostic LEDs. One to indicate forward, one for reverse, and another for over-current. The latter I cannot tout until I write the software for the controller. This LED is not connected to the actually current sensing pin but will use feedback from it to illuminate. More on that once I have a board to test.

It's not visible now but originally several traces wove through the seven-pin header; which the DRC did not like. Moving these traces basically meant ripping up half the wires and starting fresh...#firstworldproblems. (<-- first and last time I will hash tag...yuck...Twitter)

Things I'm not proud of:

Looking at the images above the ground planes are pretty well-contained save for a few wires that need to reach the top header. We'll see if any noise results from this, shouldn't be too bad.

There are 50 f***ing vias. On a via/area basis that isn't bad at 16.4/in^2. However, this board is being ordered 4pcb Bare Bones which allows 35/in^2 maximum, and I'm sure you could pick a given 1" x 1" where that is the case. Hopefully they don't check that so carefully but regardless, that is a shameful quantity of vias.

Switching to the mechanical realm the Robot Marketplace order is in and I suspect so is the McMaster order. In addition I have been working on the frame design. Don't believe me?

Boom.

This wasn't meant to be in the "things I'm not proud of" section but now that I think of it I'm not proud of how little attention the mechanics have received. Maybe I can make it up by over-engineering servo-automated belt-tensioners...

Wednesday, January 4, 2012

Space Invaders and Motor Controllers

The first order of business to address in buildapalooza is TOBL2's motor controller -that way the new chassis can be built while the board and parts are being shipped! This is the first motor controller I've designed and it's based off of the L298 Dual H-Bridge, PowerSO 20 package. Essentially it's an Arduino shield...shield, because it will stack onto XPWMShield. Here's the schematic:


Actually this is the schematic, but it does kinda look like the Space Invaders alien:



It will drive TOBL2's two new FingerTech motors at 6V, which promise not to ask for any more than 2.6A combined if both motors stall. The L298 is rated to handle up to 4A, but to be safe the current sensing pins will be in effect and there will be more status LEDs than one could ever need. Oh, and automated belt tensioning/detensioning....yeah I really don't want any more slipping or breaking (which were all part of TOBL1's charm). More details on the controller once I have a physical controller in my hand to test. Just a little amuse-bouche before the feast of blogposts and building commence.

Tuesday, December 27, 2011

< Buildapalooza 2012 >

Did I mention I'm an undergrad? Apparently junior year is is a buttload harder than sophomore year, but after a long semester I'm back for what I call Buildapalooza 2012 (on vacation now won't be building until after the New Year). Here is the plan:

gMeter, the amount of time it will take to write your software, including all the LCD code, was just not feasible this semester. And now that I finally have a break, I simply don't hate myself enough to plow through the datasheets. Unfortunately, I'm putting you on the back shelf until the summer rolls around.

TOBL, you break too much. In the middle of September I brought TOBL to World Maker Faire in New York. Before I could even set up a demo I watched a five year old strip an internal gear on the left servo, by rolling it around like a wind up toy. Maybe that little tyke was trying to tell me something, like "get rid of the servos!" So that's what's going to happen.

Introducing TOBL V2.0 or TOBL2 if you like...there was already a V1.1 when counting the revised XPWMShield board. Some new things I'd like to incorporate into this version:
  • Gear motors
  • Belt/Pulley drive
  • Automated tensioning/clutch
  • Aluminum plates (replacing acrylic)
  • Bearings and proper supporting
  • Revisit the wireless updating on XPWMShield V1.1
  • New control interface (on iPhone)
By swapping the modified plastic geared servos for gear motors the possibility of breaking gears on back-loading should be eliminated. Further to this end, an automated clutch system is in the works to tension and de-tension the drive belts when summoned. The gear motors will also increase TOBL's top speed from a fraction of an MPH up to about 4.6 of them by my maths (using the motors linked above). Swapping the acrylic should work towards the goal of making TOBL more durable, not to mention I'll feel better pressing bearings into aluminum. Oh yeah, and because she'll be running motors I need to design a motor controller to interface w/XPWMShield. So there will be some electronics to keep things interesting too.

Okay, there you have it, Buildapalooza 2012 starts in T-minus one week. Until then I'm gonna go sit on a beach ;-)



Friday, August 19, 2011

gMeter: Electronics

The electronics for this project are simple. So I asked myself, why spend money on a board from Advanced Circuits when I can make my own? After completing the etching process I have plenty of answers to this question, which I will address on a rolling basis.

First, the circuit itself. Laying a board out for single-sided etching adds some headache to the design process. Without vias you have to think a little harder about trace traffic, to minimize using jumper wires. It's a fun game until you realize that's probably something they play at EE parties. I scored a 7 (I think it's like golf). Other modifications for achieving etch-spec: minimum trace size of 24 mil and minimum clearance up to 16 mil. I really wouldn't etch a board that's any more complex than this unless the form factor is less constrained and bigger.

Export to png (monochrome) and...
...ready to be printed.

There are hundreds of DIY PCB etching tutorials out there so I'll spare you the step-by-step procedure. Besides, after etching one board I'm far from pro! I went the iron-on toner transfer route, messing up three blank boards before getting one that was "etchable." Partially that was not my fault because the laser printer I used was good but not great, leaving thin spots of toner here and there. Mainly I wasn't putting enough pressure on the iron. To get it to work, I literally put all of my weight on the iron for two minutes solid. Then 4-5 minutes moving the iron around giving the interior a lot of attention, and still maintaining absurd pressure.

I used a sharpie to touch up the spots the toner missed.

The etching part is where things got really sketchy though. The copper took at least 45 minutes of continuous agitation to etch...? That's at least 15 min longer than what I read online, so I'll need to hunt down the ferric chloride MSDS, perhaps it was diluted more than usual (around 60%). More likely rubbing it with a sponge probably would have cut the time, instead of waiting for the copper to dissolve on its own. As much work as this is, there is an unbeatable zero day lead time and low cost. Having the ability to wake up with an idea for a cool board and use it that day is plain awesome. With practice I'm confident it will take less time and it's far superior to leaving your project at breadboard status.

Soaking in ferric chloride...

Stipped of toner courtesy of spray carb cleaner

Finally got some use out of my Dremel drill press, I think this is what it was designed for.

Next, I soldered it all together and bam....no, who am I kidding it didn't work first shot. Again, I would advise against etching with 24 mil traces, especially in confined spaces. I made this mistake and spent a lot of time with a multimeter and an x-acto knife peeling up traces to resolve about ten different shorts. Finaly I got it to light up.



Ok, the board works. Now there are zero excuses left to procrastinate from coding. Well maybe that classes start next week, but I will do my best not to drag this project too far into the semester. Putting on my software hat...

Monday, July 25, 2011

gMeter: ...

Oops, it's August and gMeter is very incomplete. That's probably because the part I really care about (tangible mechanical things) are not the important part. Alas, progress has still been made and to satisfy the self-imposed minimum project SolidWorks/machining time, I came up with a cool sheet metal enclosure. I've never made one before, but SolidWorks has a great tool for laying them out, with a nice "flatten" tool to get a drawing of the part for construction. Got all the materials, time to cut, mill, and bend!


You'll notice a right flange is omitted, motivation for which will become more apparent later. Out of context, I'll admit, it's not very exciting. Especially following my last project, which could do wall flips! Though, anyone who has ever programmed a microcontroller will appreciate the inherent awesomeness of that itself. Which brings me to my next point -> electronics.

The board containing the logic and everything else is ready for fabrication. I'm going the DIY route and etching it tomorrow, so look for an electronics/etching post soon. I used an Arduino Nano to prototype everything before porting it all over to the ATtiny2313. This would have gone a lot quicker if I hadn't fried the regulator on the Nano and consequently the not-so-cheap ADXL335. Fortunately the Nano still runs off of USB power and a brave friend has loaned me an accelerometer. I look forward to having a nice clean pcb to replace this sea urchin looking setup.

I need to invest in normal-sized breadboards.

On the flip side of all this procrastinating, my attention has been finely concentrated into the sexiest thing on four wheels. In our 5th year of ECSEW, the tinyKart is a sub-50lb e-cart you can essentially wear. The idea being to make it lighter than a single battery from the original cap kart, circa 2008. Mainly this is done through prevalent, if not exclusive, use of 6061 aluminum. Without a driver it will have a better power-to-weight ratio than a Lotus Elise, with a -healthy- driver the figure is more comparable to an E92 BMW 328i. I say will because as you can see it still needs to be wired up. More to come on that and gMeter very soon as the August building marathon begins! Leaving for school in 11 days, bring this.

Tuesday, June 14, 2011

Grand Prix du Canada, done right.

The past weekend marked the only North American stop on the Formula 1 calendar - until 2012 at least - held at Circuit Gilles Villeneuve in Montreal, Quebec. The circuit skirts tiny Île Notre-Dame and features some famous corners, including a hairpin and one named after racing deity Ayrton Senna. The course is a driver's favorite although this year's GP may have temporarily spoiled that sentiment, due to an unprecedented 2-hour rain delay. Quick recap: Mercedes Mclaren's Jenson Button stole what would have been another victory for Vettel, in lap 70. Out of 70! Button deserves the credit though, working his way from dead last at one point, making up for many pit stops, a tussle with team mate Lewis Hamilton, a speeding violation (they have those), weather etc. Also of note, is a 4th place finish from Shumacher, who is on the rise in his second season back from retirement. Hamilton, who has been successful here historically, was forced to retire. Kinda had that coming to him. Anyways, the point of this post is to shed some light on what to expect at a GP and how to do it right, and cost effectively.


Tip number one on the weekend: Do NOT plan a trip last minute. I decided to go to the Canadian Grand Prix just two days before the event. I had an amazing time, and being spontaneous is fun, however, you can save a lot of money if you book in advance. Fortunately I was able to cash in on some frequent flyer points, and didn't pay a cent for lodging. Had it not been for this though, the only hotel less than $100/night was 40 miles away from the race. The city takes the GP very seriously and staying downtown becomes a $500/night affair. Hostels are in the range of $30/night and a good option if you are traveling in a group, but they're almost exclusively 3-night minimum rental, so plan for that. Definitely book on Expedia and maybe they'll mess up and give a free upgrade to here...

Second: Buy general admission tickets. Well sure, if you have the money buy grandstand seats, over by Virage Senna being the best to watch overtaking. For the rest of us, a 3-day GA pass costs $110, which is cheaper than a single day in the stands. You will have to get to the track early to secure an un-obscured spot on the infield, but it will be worth it -there are other races while you wait. If you heed the advice from tip two then you will also need to follow tip 2a: BUY EARPLUGS. We sat about 15 feet from the cars mid-straight and I thought my ears were going to bleed.

Number three: BYOR (bring your own radio). Being at a Formula 1 race is kind of like observing a golf tournament from the 9th hole. Unless you can cover a lot of ground really quickly (~200mph), or are willing to shell out hundreds for seats you will have no idea what's going on. Alternatively you can camp out by a screen but you will be hard-pressed to do so unless you get there seriously early. No matter what time you arrive, you will be able to see the action, though. The earlier the less likely you will be looking through a tree.

Final tip: Pick your transportation wisely. Having a car is essentially useless because there is nowhere to park and there is a metro stop which lets you out right at the front gates of the track. I say this with somewhat of a bias after my car suffered a freak break-down, costing me a couple thousand dollars more than I had planned to spend in one weekend. Even still, there are metro stops scattered all around town and buses to take you to the stations, if you can catch them. Busing up is definitely the most reasonable way to go, $75 one-way from Boston at least, which is currently what you would pay in gas anyways.

Even if you do not follow Formula 1 going to a race is an incredible experience. The sounds of howling V8s revving to 18,000rpm and the brutal shotgun-esque downshifts alone are worth the price of admission. It truly is a symphony but watching the race unfold you realize that this sport does not exist solely for our entertainment. It is a business and a showcase of modern engineering for the companies who sponsor the teams. The cars have presence, they command your respect. Watching the drivers chase down the car in front of them is like watching a really loud game of chess. As was the case with Sebastian Vettel the simplest mental error can lose you a race. The Montreal atmosphere is great too, the locals get really into it and appreciate every ounce of heroic late-braking and high-speed overtaking. I highly recommend the Canadian Grand Prix to anyone and will certainly be back next year, definitely smarter, hopefully dryer.