Segfault Update 4: Fancy Ass-Inclinometer Lives

As promised, I went back to revise the sensor logic for Segfault. I am proud to annouce that I now have a stupidly overcomplicated inclinometer.

WOOOHOOO I AM SO SWITCHING MAJORS TO COURSE 6

Just kidding.

The first order of business in the new construction is creating negative 5 volts. As I mentioned before, having balanced power supply rails is tantamount to approaching more theoretical performance from op-amps.And when you’re used to crashing through EE projects like very small silicon-based china shops, textbook debugging is invaluable.

So here’s the negative-5-voltificalator.

It’s a 555-based switched-capacitor dealie found all over the blagotubes in myriad configurations. I ran the 555 at 30kHz. Maybe it should be faster, maybe not – I didn’t run any numbers, like a bad engineer. The converter takes +12 volts and yields -11 volts or so. Both are regulated using the appropriate 5 volt regulators to yield stable, double-sided rails.

Who knew it was such a pain in the ass to get a negative voltage? Why can’t I just plug it in backwards?!

So much smaller. My goal with this board was to put everything pertaining to sensor signal processing on it so I can make a simple robot-on-a-stick to test the concept. It took a while to cram the componenets that tightly. The circuit up to this point produces a voltage out that corresponds to tilt angle.

No, I didn’t calculate how many volts per radian. Bear with me as I machine-gun into the darkness with exploding electrolytic capacitors.

The hardware configuration of the sensors means that I’d actually have to run the breadboard edgewise on a robot (sensors at the bottom, edges facing front and rear). Segfault itself will have the sensors mounted more appropriately.

Hey, let’s take a look at the outpuHOLY SHIT WHAT IS THAT I DONT EVEN

Well, that’s certainly disappointing. It looks like at least some part of the -5voltificator’s 30,000hz switching frequency is making it through to the output. Strange, because it doesn’t happen anywhere else. What the heck is this? Shoot-through? That’s 3 volts plateau-to-abyss!

Piling bypass caps by the gross onto the circuit didn’t help one bit, so I tried pumping up the volume on the switching converter…

…to around 220kHz. I figure I could knock it out of the range of the op-amp’s break frequency. But no, the LMC6484 is unity gain up to 1.5Mhz.

What did the ripple look like now? Maybe I knocked it instead out of the range of whatever is resonating.

Uhh, no. In fact, I think it got closer to resonating, because the wave is now significantly more sine-like. The ripple has been reduced to around 1 volt p/p.

That’s still pretty intense, though. This can probably be lowpass filtered out without affecting the circuit operation because it occurs at hundreds of kHz, and I will hopefully not be moving fast enough to warrant conveying angle information that fast. Since the motor driver PWM frequency will probably be around 20kHz, this ripple might not even matter because the motor drivers will “sample” much slower. I use “sample” loosely here, as techically a PWM comparator would be running all the time.

Oh well. I’ll just crank the horizontal sweep way up to 1ms and pretend it isn’t there. Here’s a video demonstrating quite a few improvements over the last sensor rig:

  • No nonlinearity or weirdness around the zero crossing! Probably because zero is zero, and I properly buffered the sensor outputs.
  • Symmetrical about zero!
  • No drift! If the gyro integrator is too far off base, the DC offset of the signal increases slightly and that’s it. Same for the accelerometer. The last version would slowly drift – not significantly, ultimately settling at a small DC value, but still visibly drift.
  • Real zeroing, not “leak rate control”. The accelerometer zeroing potentiometer will be available on the user panel to adjust the rest angle. The gyro zero will be glued shut in the position of least drift. I already mined every 10-turn miniature precision pot at MITERS for this.

It’s almost time to put together the bot-on-a-stick. Since this is comparatively easy, mechanical work on the Segfault chassis is continuing. In Course 2 news,

Shazam.

After round 1 of Segfault JetMachining™, the baseplate and some minor frame structral components are done. The parts on the left are spacers for the motor mounts, and the little things on the right are vertical standoffs for the eventual upper deck, for which aluminum plate has yet to arrive.

Yes, I did cut that whole piece out from a single large sheet of aluminum.

Something is just not right when your scrap weighs more than the part. I’m sorry, Kaiser and Alcoa. I bet you’re mad at me for wasting good metal like that.

Actually, who the hell am I kidding – you probably want me to keep making large, flat unibodies so I’ll buy more aluminum.

The bigger squares will be reused for little widgets.

Hey, it’s the upper control box! This is looking pretty crazy. After a few knocks with a belt sander, the tabs and slots just sort of fell into eachother.

They will be assembled by t-nutting, but this is the sort of thing I could seam weld and get great results from.

Check THIS out! The 7-LED battery bar graph slides into its final mounting location. There are two red LEDs, a yellow, and three greens. LED bar graphs on anything just makes it look epic.

The midpoint shown here is about 34 volts or so. All the LEDs are lit at 40 volts, and all go out at about 27. Since the Koooooooolmorgen motors are actually rated for 33 volts, the midpoint is an excellent “time-to-go-find-a-charger” reference.

The chase is on. The most difficult part of the project as I envisioned it, the analog inclinometer, has been conquered. More aluminum is on the way, and the end of the semester draws close.

Bot the fuck on.

5 thoughts on “Segfault Update 4: Fancy Ass-Inclinometer Lives”

  1. How did–? But I thought–? WOW. Just, WOW. Charles you are a God among men. Just remember what peter’s uncle said. “With great power comes anything you want” (that’s what he said right?)

  2. So, my previous smart-alec comment about using something other than a 555 to generate your negative reference didn’t make the moderation threshold, eh? I’ll try to be a little more circumspect in the future … after all my PhD in EE is only from a fly-over state that starts with M.

  3. Aaron,

    I accidentally cleaned out about the past year or so of comments while cleaning up spam. So it wasn’t just you…

    Before it all got razed, I noted that the switching noise had been greatly attenuated by more judicious use of bulk capacitance, as well as filtering. I might still go for an IC designed for the job later on.

  4. Well the short of it was I was giving you the advice I got from the Horowitz&Hill text as an undergrad … don’t design a switch mode supply unless you really have to. These days there are a gazillion integrated switch-mode supply chips that are dead simple to use … just go over to digi-key and pick one you like, then move on. On the other hand, if you did get it to work … cool.

    OK, get back to work … reading blogs by guys like you is as close as I get to messing around with circuits these days :-/

    Aaron

  5. Part of rigging my own is the thrill of the chase. In my Power Electronics class, we learned about SMPS design. In fact, most of what I build I try to do as an extension of the stuff that makes it into lectures and problem sets

Comments are closed.