View Single Post
Old 09-06-2014, 08:22 PM   #1089 (permalink)
e*clipse
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 314 Times in 215 Posts

Glad to see you're a fan of those old machines. Games are what first got me interested in this stuff too... I LOVED "Astroids" and locked myself in some basement closet of the physics dept (my dad taught physics) and attempted to get those advanced for the time Commodore PETs to move a spaceship around the screen...

Well, I did learn an appreciation for efficient code.

I do think that making sure we're not wasting (computer) time in unrelated places, like figuring out where the rotor is, we can spare a bit more in critical places. BTW, are you using interrupts very much?

I'm forming the carrier signal based on a simple 50% duty cycle 0-5V 20kHz square wave. Nearly any pin on the PIC can make that. If you're doing the "heartbeat" monitor, we could use that signal as a base. Therefore, if we NEED an AtoD pin, we could use the QEI INDEX pin.

Regarding this project, the power requirements are actually pretty loose. I originally thought the resolver "required" a bipolar input signal. However, I've learned - and you've probably delt with some of this 'cause you're using transformers as part of the IGBT driver: you can't pass DC. Thus the "rotating transformer" is going to center the output at 0, no matter what the DC offset of the input signal is.

This is one thing with my original resolver interface design: I put in a +/- 5V (centered at zero) signal and then pulled out a signal with a total amplitude of ~ 5V p-p. The output amplitude decreases and the carrier signal frequency increases. Now what I've realized is that the input signal doesn't HAVE to be bipolar - it could be, for example 0 > 10V and the output (whether I want it to or not) will be centered at 0. Hmmmm, that at least makes the circuit for the resolver driver (carrier signal) easier. With this, I only need a +12V or so power supply for a single sided op-amp!

Ok, what about the output? What I've learned over the last few days is that, while the circuit I designed did work, it's far from optimum because it critically relies on resistor tolerances and stuff like that. A big improvement would be to use a buffer circuit to immediately offset the signal so it's centered at 2.5V (for the AtoD converter), then filter the noise. Now the signal would range from 0>5V, and the analog switch would only have to be single ended (much cheaper, and the power supply is simply +5V) So, by adding some op-amps, I'll make the circuit much more stable, accurate and less expensive.

This will take a few more days than I planned, but I think it's worth it.

- E*clipse
  Reply With Quote
The Following 2 Users Say Thank You to e*clipse For This Useful Post:
MPaulHolmes (09-06-2014), thingstodo (09-06-2014)