Author Topic: Trying to emulate three synchros using Arduino  (Read 47704 times)

0 Members and 1 Guest are viewing this topic.

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #25 on: July 22, 2015, 09:04:31 am »
Wow this is getting complicated! It doesn't need to be!

Offload as much as possible to analog circuits. 400hz sine generator? Couple of op-amps. Easy. SPI digital pots? Cheap and simple to drive. Small look up table in the AVR. You wont need much current to drive the synchro, a nice low impedance driver coupled to an off the shelf mains transformer will do.

If you are using an Arduino, it becomes even easier as there are Sine/Co-sine math libraries available.

No need to generate multiple 400hz signals (in phase) from the AVR.

The issue with the digital pots though, is they attenuate just fine, but I need to be able to actually reverse the polarity of the sine waves as well, without losing resolution. Even if I do that, I'm looking at ganging a minimum of two d-pots together, and selecting them with a mux. I'd have to generate an inverse of the reference, and select (with the mux) the wiper attached to the inverse sine wave. The middle of the two d-pots would be grounded.

[uninverted sine]-vvvv-[Gnd]-vvvv-[inverted sine] A mux selects which wiper to read, to output the inverted or uninvited sine.

The reason that [uninverted sine]-vvvv-[inverted sine] isn't viable, is that even though the two waves ought to cancel each other out at the center wiper position (I think), it's be such a significant drop in resolution, that the peaks would see a few degrees between d-pot steps. And that could mean the navball would jitter and/or jump around at those peaks. 10 bits of resolution is already barely tolerable, and still leaves poor resolution at the peaks. I can't even find d-pots better than 10 bits yet. a DAC isn't bad, as you can easily find 12, 14 and even 16 bits of resolution.

Relying on d-pots puts me at requiring a minimum of 18 d-pots, 9 channels worth of mux (probably 2-3 chips worth, cause OF COURSE I'm using more than 8 channels), a sine generator that can create synchronized inverted outputs (a pair of op-amps in opposing polarity from the sine source), and my output amplifiers that lead to the output transformers...

...

Versus figuring it out in software... the software being the more complicated option...  ::)
With software, all I think I'd need is a tuned LCR type filter at each of the PWM outputs, fed into my output amplifiers that lead to the output transformers... It'd skip all the d-pots, muxs, and the hardware sine source altogether.

I AM a hardware guy... My first instinct was to rely on support hardware, but even I am seeing that the support hardware is gong to add up very fast, in terms of complexity. As I stated earlier in this thread, I'm trying to do this as a low cost alternative to spendy commercial units that are sold by companies that won't even publish the unit's price without a quote request... This project is intended for people like me who manage to snag the un-likely FDAI/ADI unit on ebay, but have no means of controlling it.

Now... if you want a SIMPLE hardware solution, the easy method is to just buy three synchros, three motors (stepper or DC, with encoder), and just run them together with a simple mechanical linkage. Position motor, navball moves. That's simple hardware. The reason I haven't done that already, is that most of the cheap synchros are in the 11-28 volt range. I'd still need to run those signals through 9 transformers to bump up the voltage for the FDAI I have. I only need one reference sine source and one step up transformer if I snag 115 volt synchros. Most of the 115 volt synchros are spendier, and I haven't received my next paycheck yet. The FDAI wiped out all the spare change from my last paycheck... and the one before that...  :o

**Edit**
Later on, I come to find info that suggests only the Reference/Power is 115VAC @ 400Hz. I belive the rest of the inputs are lower voltage, probably 28 volts or less.
« Last Edit: November 07, 2019, 03:41:38 am by richfiles »
 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #26 on: July 22, 2015, 09:47:31 am »
From what i'm getting... My structure would need to be something like this:

1: Initially set my variables and what not up, preferably setting them to a default zeroed state, since the game won't necessarily be sending ANY data until I am in a vessel. This would set my yaw, pitch, roll, and any other statuses that I have the arduino handle to default values... North facing yaw, level pitch and roll. I'd initially calculate the multipliers for the nine synchro outputs based on these three initial values (I can actually do this the easy way and PRE calculate them... I'd just preload 9 constants, and some of them might actually all be the same, since the ball is effectively set to "home"). This would also set the sine wave timebase to a starting value of zero.

2: I'd have a process that creates the reference sine wave, point by point, based on either a lookup table or the library that adds sine functions. this function would look at the time between the last time the timebase was set and the current moment, to determine the change of angle of the sine wave. the timebase is reset as well.

3: I'd take the existing calculated value of the sine wave and multiply it by the 9 multipliers to get the 9 synchro outputs. negative multipliers would flip the waves for those outputs that need to be flipped.

4: I would scale and round the 10 waves to values to be sent out to the PWM channels. The outputs would be updated with the new values.

5: the process is repeated from the step 2. The time base has been counting all the while from the completion of step 2. This provides step 2 the means to calculate the change in the sine wave's amplitude over time based on the exact angle of the sine wave at the moment of it's calculation. It also accommodates any delays that might occur in regular processing, due to, say, interrupts...

6: such as receiving serial data and updating the multipliers. I'm guessing, from my limited knowledge on modern programming, that one could use interrupts to redirect focus on the serial port if an incoming data steam is detected. Upon receiving updated values for the angle of yaw, pitch and roll, it would perform the 9 trig calculations to calculate the multipliers for the 9 outputs based on those 3 values, and then store those values, returning to step 2.

In this structure, you could have the program take extra cycles to receive data over serial, and update the multipliers. The next sine calculation might have a hiccup in the resolution, but would not screw up the timebase, and the external passive filters should smooth it all out.

I think?!  :-// 
*Not :--

Obviously, this is a FAR way away from code, but does the structure seem reasonably valid?
« Last Edit: November 07, 2019, 03:44:46 am by richfiles »
 

Offline BennVenn

  • Regular Contributor
  • *
  • Posts: 160
  • Country: au
    • BennVenn's site
Re: Trying to emulate three synchros using Arduino
« Reply #27 on: July 22, 2015, 10:02:45 am »
In regards to inverting the sine wave, use the inverting input of an op-amp? I'm sure you could rig up a differential op-amp with say... 1/2 original sine wave then depending on the amplitude of the reference sine (sine passed through digital pot) it would output anywhere from in phase at full amplitude to 180deg out of phase at full amplitude varying as much as your digital pot has resolution.

Op-amps are cheap, PCB transformers can be had in a fairly small form factor.

Also available are SPI driven 6 channel audio DAC's used in CD/DVD players. These are only a dollar each on aliexpress and have something like 14bit resolution and can all by sync'd to a master clock so they remain in phase. That is if you are set on using an arduino to generate waveforms.
 

Offline bench_knob

  • Regular Contributor
  • *
  • Posts: 81
  • Country: 00
  • Disc Inside Ionized Atmosphere - Mexico 1994
    • SETV
Re: Trying to emulate three synchros using Arduino
« Reply #28 on: July 22, 2015, 11:18:33 am »


>

Quote
richfiles
07-21-2015: 05:56:40 AM

I'm trying to emulate three synchros using Arduino. A synchro is a type of rotary transformer that takes an AC input and generates three amplitude adjusted outputs that represent the angle of the rotor. It looks a lot like a three phase motor winding. My application is to drive this: A 3 axis FDAI (Flight Director/Attitude Indicator).My goal is to use the Kerbal Space Program SerialIO mod that outputs the game's vessel telemetry to an arduino over USB. I have a nice big pile of meters, switches, and other goodies, but the FDAI is my prize collection piece! Almost no one has done a physical "navball" in Kerbal SPace Program. I know that these are very commonly installed in flight simulators. That's actually where mine came from, in fact. A lot of flight sims only use a 2 axis model. 3 axis models are more frequently used in fighter jets, stunt planes, and space craft.These devices take a reference 115 volt ac, 400 Hz signal for both power and as the reference. Each of the three axes have three inputs that come from the synchros on the gyro gimbals. When the synchro transmitter transformer sends the 400 Hz ac sine wave over the three wires, it represents the angular magnetic alignment of the rotor. Inside the FDAI, three synchro receivers output the null error from their rotor, which feeds into a servo amplifier that drives a servo paired to each synchro receiver to zero out the error.

Hi there.  When I was a kid I lived down the street from a Nike (Ajax & Hercules) guided missile training area where I had befriended some Army personnel in an Arcat target-drone shoot-down shop. Those guys gave me bunches of stuff including some old 60Hz synchro transmitters and receivers. I did all kinds of kewl things with those motors. Steppers have their niche, but synchros are truly special.

However, why don't you just bypass all the high-voltage stuff and go straight to the servos? Or maybe even replace them with RC servo-motors?  Just keep the display.

Commercial synchro converters can get a bit pricey especially for a hobby toy project, there's lots of commercial solutions..if one is wealthy.

In any case have fun...

bench_knob

skupe: zeebra_xray
 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #29 on: July 24, 2015, 05:32:31 am »
Hi there.  When I was a kid I lived down the street from a Nike (Ajax & Hercules) guided missile training area where I had befriended some Army personnel in an Arcat target-drone shoot-down shop. Those guys gave me bunches of stuff including some old 60Hz synchro transmitters and receivers. I did all kinds of kewl things with those motors. Steppers have their niche, but synchros are truly special.

However, why don't you just bypass all the high-voltage stuff and go straight to the servos? Or maybe even replace them with RC servo-motors?  Just keep the display.

Commercial synchro converters can get a bit pricey especially for a hobby toy project, there's lots of commercial solutions..if one is wealthy.

The servos are still pretty unique. They are a 2 phase motor, with a synchro mechanically linked into the gearing. The amplifier on the rear of the unit already is designed to drive the servos based on the synchro error. As for RC servos... They will never be as durable, or as quiet as the existing precision gear train. Furthermore, there are plenty of misconceptions about RC servos. Put simply... RC servos and servos are not the same thing. They have no absolute position feedback. That is necessary for accurate ball positioning.

Besides... Two of the motors and two of the synchros are actually inside the ball! That's precision engineering you don't want to screw up by taking it apart.   :-/O

Since this is a hobby project, my aim is very simply to see how low I can keep the costs. Worst case scenario, All I really need is three synchros, a function gen made into an inverter with an amplifier and a transformer, and mechanical linkages to three stepper or DC motors with encoder wheels. Then I could use the standard motor libraries to position the ball.

That's relatively simple, but it still requires getting synchros and putting together mechanical linkages and stuff. I'd still need to do the inverter for the reference sine source. I want to try to do this all solid state, and all on the cheap. Quite frankly, I want to build something CHEAP for hobbyists BECAUSE of how freakin' expensive a lot of this "premium" aviation equipment is. I get it, planes are expensive... Doesn't mean a hobby grade sim should be too. The way I figure, the FDAI is expensive enough to get, all on it's own... If I can do this with an arduino, a handful of cheap op amps, optional DACS, preferably some passives, and some $1 surplus transformers (I found some that I think will work... They have the right ratio to bump arduino level voltages up to 115 volts)... Well... That's my goal. I want to do this cheaply, and share how I did it, so if anyone else decides they want to do this, they can.

That's my goal anyway.

Also, it's a learning experience. Can't argue with that!  ;D

I think I might give a homemade navball a shot someday. I want to get/make a 3d printer, or to fix the Z axis on my mill, and actually get my current project done before I even remotely begin to consider that.
 

Offline Wolfram

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: no
Re: Trying to emulate three synchros using Arduino
« Reply #30 on: July 27, 2015, 11:32:38 pm »
As suggested earlier, a pair of regular op-amps would make a more than adequate 400 Hz sine wave oscillator, no need to use anything as fancy as the MAX038.

The inversion of the waveforms could be done by making an inverted version of the 400 Hz reference, then selecting between the non-inverted and the inverted version before each pot. This way you wouldn't need any extra digital pots. Something like a 4053 multiplexer could be used here.

To spread the resolution out over the entire range of the synchro, you could modify the "law" of the digital pots using a resistor like shown here: http://www.geofex.com/article_folders/potsecrets/potscret.htm
 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #31 on: July 28, 2015, 02:53:14 am »
I found the MCP4725 12 bit I2C DAC is more than sufficient for the resolution I need, and it's relatively cheap. I have an offer submitted (via ebay) to get 10 for $30 USD. I'll have to manually address them with the external address set pin, since the chips only support 8 addresses, AND two of the bits are factory set. :palm: I have plenty of I/O for that though.

I'll feed the output of each DAC to an amplifier that can drive the 10 small transformers, and that'll be it for hardware! DAC, amp, transformer, FDAI.

Software wise, I will have all the precalculated sine values in a table stored in flash. I will then multiply the current value of sine with the 9 calculated multipliers and then update the DAC value for each of the 10 DACs. Every time I receive updated yaw, pitch, and roll angles from the serial port, it'll calculate the three new multipliers for each of the three axes, and then each step of the sine wave will then use the new multipliers, till the attitude data is sent again and received over serial.

The hard part, for me, is simply that I have so far to go in terms of learning C. I get the gist of some parts of existing code, much of the time, but I simply don't have the skills to understand it all, much less create original code, yet.

On a completely unrelated note, I ordered a bunch of other stuff too. Chips for driving my 4-20 mA GE 180 series edgewise meters, a dozen 8 digit green LED display modules, some really dirt cheap amplifier boards that I'll give a shot at driving the DAC output (so cheap, it's worth the gamble if it works, and no loss if it doesn't), a pair of proto shields, and one of those vacuum part picker-uppers. I hear they rock for SMD components. I also found a similar series of military spec sealed switches practically identical in style to the ones that they used on Apollo. Honeywell makes them, and OH MY... Some of those switches were $60-130 USD!!!   :wtf:

Fortunately I found some Chinese switches at 10 for $7 USD, that while not identical... ARE PERFECTLY GOOD ENOUGH to satisfy my wallet!  :-DD
« Last Edit: November 07, 2019, 03:50:28 am by richfiles »
 

Offline daveatol

  • Regular Contributor
  • *
  • Posts: 136
  • Country: au
Re: Trying to emulate three synchros using Arduino
« Reply #32 on: July 28, 2015, 03:39:49 am »
So you're going for separate DACs for each channel? I kinda liked the multiplexed version.

I have one thing to add which may make things simpler. With three phases, you can get away with only two transformers. You only require two DACs per three-phase motor, for a total of seven DACs and transformers for three motors and a reference. The third phase is simply held at a reference voltage (which can just be 0 volts, or floating), and the other two phase voltages are referenced to that point.
 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #33 on: July 28, 2015, 04:23:19 am »
With three phases, you can get away with only two transformers. You only require two DACs per three-phase motor...

Sorry, synchros are not motors, and there is no phase difference. It's the amplitude and polarity relation between the three windings that creates a current in the rotor of the sensing synchros that is non zero, and polarized to the direction of the error of offset. That feeds into an op-amp circuit that drives a 2 phase servo motor to adjust out the error till it nulls out to zero.

Synchros are used in pairs. A synchro transmitter, and a synchro receiver. They connect over the three windings, with the reference fed into the transmitter, and the rotor of the receiver compared to the reference to find the error of the rotor angle between the two.

All three windings are required to represent the rotor angle. You might be able to cheat a little on motors, but not on synchros. Remember... All nine output sine waves are at matching phase relation with the reference. Those angles do not deviate. Even saying 180° for the reverse polarized waves is misleading... It's an actual polarity flip, and not a shift in phase. If you had a glitch in the reference, it would still happen in phase with the reference... just polarity flipped, and not 180° out. There is a three way differential effect that directs current in and out of the three windings that represents the angle of the rotor, with no phase shift in the signal.

Synchro sensing also has a poor "resolution" at the sine peaks. It relies on the other two windings to fill int he detail during these peak reversals, where there is low change of the signal. having a winding sit at reference actually carries angular information, in relation to the other two windings.
« Last Edit: July 28, 2015, 05:15:58 am by richfiles »
 

Offline daveatol

  • Regular Contributor
  • *
  • Posts: 136
  • Country: au
Re: Trying to emulate three synchros using Arduino
« Reply #34 on: July 28, 2015, 06:12:37 am »
Sorry, synchros are not motors, and there is no phase difference.
Sorry, I miswrote (and I'd switched back to thinking of three-phase motors). I believe what I stated still applies (if you substitute "three-phase motor" with "synchro").

If you have a set of windings set up in star configuration, as you would for a synchro, with the three connections named A, B and C, and the junction point named J, then I would say that the following equations hold true (if I understand what you said in post #13). I have tied point C to ground (0V) to simplify the equations to only two variable amplitudes. Phi is the "null" angle, x(t) is the 400Hz sinusoid.
« Last Edit: July 28, 2015, 06:17:30 am by daveatol »
 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #35 on: July 28, 2015, 07:32:54 am »
Okay, so what you're saying, seeing as how the 3 windings are floating independently from the reference going into the rotor and the sampled rotor winding from the receiver synchro... You're basically just saying you are "un-floating" it, buy binding one winding to ground, and letting the other two windings effectively compensate by integrating the difference that would normally be carried by the now fixed winding. The Y ends up carrying the amplitude value against the now fixed winding, putting an offset on both other windings.

I think I get that.

How does that effect my resolution though, particularly when one winding goes to a peak? Yes, reducing the count of windings cuts costs of extra hardware by almost a third, but I don't know how that will effect my signal at those peaks. It does reduce the data transmitted by 1/3 as well. The two retained phases don't gain additional data density. Of course, 12 bits is NOT a bad resolution at all. It's a far cry from the measly 8 bits the Arduino can generate by PWM, that's for sure. Even 10 bits was still not sufficient for even a degree per unit of resolution at the sine peaks. 12 will cover that. I have not calculated for 11. My goal was a minimum of 1/3 degree per unit of resolution, but despite the poor peaks, the other two outputs sit at areas of finer degrees per resolution, I think making up for that. Cutting down to one other winding to make up for the resolution isn't ideal. Parts are ordered anyway. Maybe it's something I can experiment with. See if the two phases can maintain smooth rotation of the ball. *Naw, I'd rather just build the best option up front and just get it working

One of my concerns, and a reason for going with a higher resolution hardware option is that these FDAI devices can hum. It is a mechanical device with a 400 Hz signal being pumped in. Ideally, it's not prominent, but it can be, particularly if it is oscillating between coarse degree divisions, that hum could become louder. I'd like to avoid that.
« Last Edit: November 07, 2019, 03:58:20 am by richfiles »
 

Offline daveatol

  • Regular Contributor
  • *
  • Posts: 136
  • Country: au
Re: Trying to emulate three synchros using Arduino
« Reply #36 on: July 28, 2015, 08:00:12 am »
How does that effect my resolution though, particularly when one winding goes to a peak?
My quick calcs in a spreadsheet show that when the value of the phase A-C is changing slowest, the rate of change of the value of phase B-C is changing fastest. This may not be what I should have been calculating....

You should work it out yourself to see if it's good enough for your application and not take my quick calcs into account though.
 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #37 on: August 27, 2015, 09:43:24 pm »
Well, i have the DAC + Amp wired up. I think i actually will need more current for the Reference, as it also appears to power the FDAI, but I have some LM675 power op-amps in reserve that I can drive in a  a unity gain configuration. I still need ten transformers to perform my step up. Anywhere between 70-115 volts is my aim. The blue boards are small LM386 audio amplifiers. The red boards are the 12 bit DACs. Yes, i went old school and wire wrapped the puppy up!

Pics are ALMOST final... I took these before one last connection on all but one output. They are actually done now.
« Last Edit: December 12, 2021, 03:38:39 am by richfiles »
 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #38 on: October 21, 2015, 06:30:11 am »
 :blah: *Please Note: This is mostly copy paste, with some edits, from my post at the Kerbal Space Program forums... I occasionally over explain things that we ALL ought to know around here!* :blah:


So, I was doing some math... and I believe I have a major issue... and it is major... I don't think my current DAC design has a chance of working.

It puts 100% of the workload on the Arduino to generate all 10 of the sine waves required, all at 400 Hz, with realtime waveform generation. Some basic math tells me this is a gargantuan task. Besides monitoring a serial input for axis updates, I need 10 sine waves. I can do MOST of the work using lookup tables, but I still need to calculate the offsets of yaw, pitch, and roll (by adding 120° and 240° to each of the three values) and looking up the attenuation values for each of the 9 results from a lookup table, for each data frame sent by the game, assuming 20-60 frames/second. I need to then multiply the reference sine wave (which can also be generated by lookup table) with the attenuation values (9 multiplications), and send the reference and the 9 results of the multiplications to the DACs, which requires 10 I2C transmits, with a digital out changed between each transmit to function as a chip select. These multiplications happen at the sampling rate of the sine wave, not the frame updates. I only update the multiplication values once (x9) on each frame update.

If I need even 256 steps in my sine wave cycle (that's a low resolution, but It's my attenuation resolution that defines the angle of the navball, and temporal resolution would be somewhat smoothed out by filtering), then the math works out as follows:

At 400 Hz, if I have only 256 "slices" of the sine wave over one cycle, and 10 sine waves to update, I have to write the I2C bus 1024000 times EVERY SECOND... I... Is that even possible? I am fairly certain this exceeds the maximum data rate for I2C. There appear to be 4 speed standards: 100 kbit/s, 400 kbit/s, 1 mbit/s, and 3.2 Mbit/s... Even the fastest speed wouldn't handle the bandwidth of just 8 bits sent at that rate, and these are 12 bit DACs! If I could get the resolution out of the PWM to do it, it might work, but the PWM resolution isn't even high enough for one whole degree of ball rotation per step! Ouch! That's one jittery navball there!  :--

I may reuse my DAC board for analog meter movement, if I can mod the amps to drive DC (they are audio amps, and can only drive AC, but I think that is only because they are AC coupled with a capacitor inline with the inputs and outputs). If I simply remove the amp boards and drive with a MOSFET or something, it will probably work fine. That could be a reasonable use for the I2C DACs. As it stands, the $40 or so dollars spent on my DAC board, and the time spent building it, are more or less wasted.  |O

So...

The solution is VERY simple and elegant, and thanks to some part finding by someone on the Kerbal Space Program forums, far less expensive than I thought! It's still more expensive than my original plan, and more complex, hardware wise. It REALLY DOES solve my problems though. That part, is the 12-bit MCP4912/22 DAC.

I need to use a totally different type of DAC. I need one with a proper adjustable voltage reference, and the MCP4922 has it. All I need to do is generate a single sine wave with a hardware sine wave generator (can be done with either an analog circuit, or the $7-12 MAX038 chip that swarms ebay). I just set it to produce a 400 Hz sine wave, and that's it. I need to feed that to a pair of op amps to create a differential pair (opposing cycle polarities), and use an analog switch to select either the un-inverted or the inverted sine wave to feed into the DAC's voltage reference.

This is:
1 hardware 400 Hz sine wave generator.
2 op-amps to create inverted and non inverted outputs.
20 analog switches (about 5 chips) to select whether to flip or not flip the reference sine wave.
9 DACs with adjustable voltage references.
10 power amplifiers driving transformers that drive the actual FDAI at the desired higher voltages.

So, the adjustable voltage reference input is the real trick to making this work. It's been brought up in pervious messages, and it WAS the correct path. If you have 0 attenuation, then the DAC is at maximum output, but the output will scale to the voltage reference, so as the sine wave applied tot he voltage reference rises and falls, the output matches it. If the attenuation were at 100%, then the DAC output would be at it's minimum, meaning no matter how high the input sine wave rises and falls, it's scaled down to nothing. As the attenuation scales between 0-100%, it scales the actual sine wave that is being input on the voltage reference.

The DAC basically just becomes a hardware attenuator. I MIGHT be able to reuse the amplifiers I installed on the DAC board by desoldering them. I may need to drive a power op amp though, to push enough current into the final transformer stage, in order to have enough power to actually drive the FDAI. I have around a dozen LM675 power op-amps that I hope can do the trick. Those were not cheap, but I already have them. I may end up needing to hand wind my own transformers, just to keep myself on budget. I have no idea what it'd cost me for 9 transformers to bump the voltages driven by the low voltage DAC circuit, to the 28 volts wanted by the FDAI.

This is actually an area where I am actively seeking advice. I need to take what will likely be a 0-5 volt sine wave (zero crossing at 1/2 Vcc), and will need to convert that to 28 volts. I DO have the LM675 power Op-amps that I can use as output stages. The transformers will all have one side of the primary tied to the signal, and the other side tied to ground. The secondary will have the center of the "Y" floating, with the other 3 wires tied to the FDAI inputs. The reference will be just a single winding between the output driver and ground.


One reason I never found this part on my own, was because it seems like Digikey and Analog Devices really like to return some VERY spendy chips when you specifically search for a multiplying DAC. You're guaranteed an adjustable voltage reference if you get one, but lots of chips can do the same, without costing $10 or more per DAC channel. Imagine, a company making it easier to find higher priced products... >:D  Turns out, external voltage reference input wasn't a search criteria that was easy to sort for. :palm: Thanks to someone else's knowledge, I was led to the MCP4922. Does what I need, since it has the all important external voltage reference input, handles a pair of 12-bit DAC channels per chip, and for just $2.76 a chip! Noice!  :-+

To top it all off, I have 90 74HC4066 quad bilateral switches on hand, 20 DIP and 70 in a variety of SOIC and SOP packages. I have no worries about dealing with the analog switches to select whether to reference the inverted or non-inverted reference sine. I think I'll have enough parts!  :-DD

Between the DACs having sufficient resolution to handle fractional degree increments of the navball, the sine being generated in hardware, the polarity flip being easily handled by the arduino using the analog switches and a pair of op-amps... I should have FAR less to process inside the Arduino, and I should be able to send out the data at a more than reasonable rate!

Even if I have a PEAK of 60 update frames per second, then I need to send 60 x 9 SPI transmits each second. That's only 540 transmissions per second! I'll need 5 Chip select lines, plus the SPI bus connections, and a single digital out to update all the DACs to their newly updated values. I'll also have an incoming serial bus that it will be watched for frame updates.

Again, I apologize if anything seems out of place, or if I explain things you guys already know. This post was a mix of two pieced together posts from a forum, plus some original typing. If I left any of those CSI: Wherever style "explain the crap real professionals would already know for the audience" moments, it's because I originally put it in for some of the people on the other forum, where not all the people are as electronically gifted as the people here.

Anyway, it's also 1:25 AM... Going to bed now!  :=\
« Last Edit: December 23, 2020, 07:38:21 am by richfiles »
 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #39 on: October 21, 2015, 08:44:02 am »
This is basically the simple schematic of what i'm trying to do.

« Last Edit: November 27, 2016, 11:10:23 am by richfiles »
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Trying to emulate three synchros using Arduino
« Reply #40 on: October 21, 2015, 12:38:27 pm »
If the requirements are too much for a single microcontroller (Arduino or whatever), then why not simply use "distributed processing" where each channel has its own micro generating the three phase signals, but under the control of the master, and operating from the same reference phase, etc.  Arduino-like clone boards extraordinarily cheap on Ebay, down into the $1-2 range.  Perhaps even a little board that does 3-phase generation might even be a "niche product" that you could sell to others.

This guy simply uses 8-bit R/2R resistor ladders as D/A conversion.
http://www.instructables.com/id/3-phase-sine-wave-generator-based-on-Arduino-Due/?ALLSTEPS
 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #41 on: October 21, 2015, 01:50:51 pm »
With waveform synthesis, I need to keep all three axes synchronized with the reference, so then I have the device watching a serial bus for incoming updates, and trying to maintain timing with a 400 Hz input... Not to mention, do I have one arduino work extra to generate that? It'd be a non symmetrical work load then. or one arduino just to do reference? The others still have to watch for serial input, and still have the added effort of watching an input that can "scan" the reference.

The simplest option that I can see, is the hardware solution, as it eliminates all this software complexity and multiple controllers with a single, simple solution. It took $13.80 to buy the 5 DAC chips. The 74HC4066 would have cost me about $2.50 for all the chips I needed. I'll need a dual op-amp chip, which I'm sure is under half a buck. The output stage would have been the same as with the software only plan, so I'd say this new design is actually already coming out ahead of the old software only design, cause I spent $30 on those 10 DACs I'd ordered before! It's also 540 data transmissions per second + watching one serial input for data with this hardware design, vs 307200 data transmissions per second plus watching a serial bus, plus staying synchronized with an input that has to be sampled fast enough to capture 102400 updates per second... If I use a wave resolution of 256 slices per cycle. Wouldn't you need a better sample rate than that to read it properly?

There's the argument of cutting back on the timebase resolution. Sure, I can add filters and possibly even do a square wave, but I wanna make sure that no unnecessary square wave harmonics are passing through... An FDAI CAN get loud, and pass those harmonics through as sound! Just the 400 Hz sine might drive some people nuts! I worked with it for years though. :scared:
 

Offline Dr pepper

  • Newbie
  • Posts: 4
  • Country: gb
Re: Trying to emulate three synchros using Arduino
« Reply #42 on: March 10, 2016, 12:14:58 am »
I know this thread has gone quiet, however I'm interested to know if the o/p has had any success.
I have messed with synchro's a few times, 3 phase and 6 phase, dc and 110v ac, my code and hardware is much simpler, usually just a L293 H bridge and a transformer for the ac ones, reading th eposition from a transmitter is a little more complex.
Instead of complicated maths calculations I just move the synchro a very small step at a time then keep track of the position using a register.
Heres one of my vids, this is a 6 phase, check my channel there are others:

 

Offline Dr pepper

  • Newbie
  • Posts: 4
  • Country: gb
Re: Trying to emulate three synchros using Arduino
« Reply #43 on: March 12, 2016, 08:30:16 am »
Heres a 110v 3 phase:

« Last Edit: March 12, 2016, 08:31:57 am by Dr pepper »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Trying to emulate three synchros using Arduino
« Reply #44 on: March 12, 2016, 08:56:41 am »
as for the I2C stuff, if the op is still ever around, i would suggest bitbanging the I2C, this way you can write all the data pins at the same time by writing to the port direction registers,

 

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #45 on: April 12, 2016, 07:06:32 am »
This is what I've been doing for the last few months...


I'm still around. I set this project aside for a couple months to design and build a mechanical keyboard. Actually, I had a LOT of frustrations happen one after another... First the cheap Chinese LED display drivers and display modules that I had ordered for the project lit up the wrong color! I ordered green LED versions. That cheap Chinese seller actually tried to weasel out of it by claiming he meant the PCB was green!  :bullshit: :-DD After that, I got ebay to force a partial refund (I explained the driver boards were fine, and socketed, so I could replace just the LEDs). That partial refund went to buying green LED displays to plug into the driver boards... Those cheap Chinese replacements had a worse than 50% fail rate!?!  :palm: |O After that, I did the math and learned that I2C can't even support the data rate required for the project, making the $40+ DAC/Amp board I built a paperweight.  :-- I still never found a use for it.  :-//

In the end, all the hype and talk about Kerbal Space Program 1.1 led me to decide to wait for 1.1 to come out, and to wait to see how the KSP Serial IO plugin develops under the new version. in the meantime, I had my hand at building a custom mechanical keyboard. It's a modified 75% layout (I call it 75%+1). It's an 88 key layout that can be populated using standard ANSI key cap sizes. It Uses a Teensy 2.0 controller, has uniform under key lighting (amber), has a blue anodized aluminum switch plate, and Gateron MX Blue switches, with the top switch housings dyed blue. It also has a magnetic connector on the side that allows an external number pad to be magnetically attached, as desired. I have not made the number pad yet.

Being mostly done with the keyboard (Still programming it), and with the release of KSP 1.1 on the horizon (it's currently in open pre-release beta), I expect to soon return to building the Kerbal controller. When that occurs, I will most certainly continue this thread... The sad thing, i sI was totally looking at Tachtronic synchro control transformers on ebay... Part of me was still tempted to do a controller involving something I actually once built... But I like the electronic controller better.  ;D

So yeah... The attached images are what i've been doing for the past few months, instead of this. I'm quite proud of the wire lacing that I did! I think wire lacing is a lost art that deserves some appreciation. I actually used unflavored waxed dental floss as my lacing cord. I did some lacing early on, but all the wiring from the teensy... that's one single piece of cord... And a LOT of pulling cord through loops to knot it!  >:D
« Last Edit: April 12, 2016, 07:10:35 am by richfiles »
 
The following users thanked this post: SeanB

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: Trying to emulate three synchros using Arduino
« Reply #46 on: April 12, 2016, 07:18:56 pm »
That is one nice looking piece of lacing, and dental floss works well there, the real stuff just is thicker waxed floss. Did you use a curved needle to get all that floss into place.
 
The following users thanked this post: richfiles

Offline richfilesTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #47 on: April 13, 2016, 02:09:02 am »
I used tweezers, fingers, and the right tongue angle.  :P
 

Offline sbennett1298

  • Contributor
  • Posts: 23
  • Country: us
Re: Trying to emulate three synchros using Arduino
« Reply #48 on: November 26, 2016, 09:34:55 pm »
richfiles,

  How far did you get emulating synchs with the arduino?
I am trying to do the same thing and I have some ideas.
I want to drive an attitude indicator. Very similar to what you were attempting.

Let's exchange some ideas.
Here is what I am thinking.
Build a 400hz oscillator and run that to an inverting op amp.
Use a SPDT relay to select 0 phase or 180 degree phase.

The arduino PWM outputs be could converted to true analog voltages using simple RC filter and that could drive a voltage controlled amp to get the desired amplitude.
Sound plausible? I considered digital pots but the arduino can only control two and I need three.
I am just starting and have not attempted any of this yet.

-Steve




 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Trying to emulate three synchros using Arduino
« Reply #49 on: November 26, 2016, 10:02:45 pm »
He mentioned that there where 3 clocks, a 0 degree, a 120 degree and a 240 degree, as its only 400Hz, i would think something like 3x AD9837 for the reference clocks, and just initialize them with delays to match the phase shift, all running off the one clock.

As for 9 or more amplitude modulated signals, use a digipot per channel on the AD9837 outputs, then AC couple it and amplify it to the voltage required,

The way you only need the arduino updating the digipots, everything else is already taken care of.

If needed you can add some filtering to the outputs to clean up the 10bit steps from the sine outputs,
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf