Jump to content

Custom hardware / simpit repository. For people who take KSP a little too far.


Mulbin

Recommended Posts

And THAT is how these are supposed to look! :D

Glorious green! The "Kerbalish Kolor"! :sticktongue:

KerbalLEDGreen.jpg

And 6 of the 12 LED modules have dead segments... Haven't gotten the other 12 modules yet... 50% failure rate!?! Dang it China... :mad:

** Update **

And I've tested the second batch, which arrived today...

4 of the 12 LED modules were bad, for a total of 10 bad modules out of 24. Seriously... :mad: You've got to be kidding me! :huh:

Edited by richfiles
Link to comment
Share on other sites

And THAT is how these are supposed to look! :D

Glorious green! The "Kerbalish Kolor"! :sticktongue:

And 6 of the 12 LED modules have dead segments... Haven't gotten the other 12 modules yet... 50% failure rate!?! Dang it China... :mad:

** Update **

And I've tested the second batch, which arrived today...

4 of the 12 LED modules were bad, for a total of 10 bad modules out of 24. Seriously... :mad: You've got to be kidding me! :huh:

Nice colour! :D

RE: Module.

Can you swap them out? make complete 'working' sets?

[assuming the LED modules aren't soldered]

Or is it the complete module that's FUBAR?

Link to comment
Share on other sites

The LEDs are 4 digit modules that are socketed to the board, two per board. The MAX7219 boards all appear fine, so far... it's the replacement LEDs that are 10 of 24 bad! Swapping out the red LED modules for green ones was my solution for the original issue. Its just that the replacements are garbage!

This one was the worst... It's ridiculous. Pop in a good green, or the old red ones, and it's all 8s. Definitely the LED, cause the bad segments follow the module, regardless of if it goes into the right or left socket, or even another board.

GreenLEDdead2.jpg

Edited by richfiles
Link to comment
Share on other sites

Have you tested the displays separately from the driver module?

Green LEDs have a voltage drop of around 2.1 Volts while red usually is around 1.7 Volts. It could be that the driver voltage is too low to light the segments of some of the green LEDs. I've experienced that problem when swapping out single green LEDs in a build, one green LED lights up fine and another won't light up at all but it works with any red LED im trying. When testing with a lower resistance value all green LEDs turn out to be working.

Edit: You asked me about what keyboard I used for my project. I found one on AliExpress that might be it. I'm not sure it is exactly the same but it looks identical as far as I can judge from a picture.

http://www.aliexpress.com/item/Mechanical-keyboard-cherry-84-compact-mini-G84-4100-cherry-ML-Black-switches-portable-game-keyboard/32448772989.html?spm=2114.01020208.3.10.VryVDc

Edited by Antipaten
Link to comment
Share on other sites

In case anyone is interested I take the liberty of promoting myselft in this thread... but that's what it's meant for anyway, isn't it? :-)

I've begun a little article series on my simpit project in my blog here on the forum. The first part is about the construction of the enclosure and the module interconnect. Nothing radically fancy, rather a study in simplicity. I will post more further on with descriptions of each module when I got some spare time. Hope you enjoy.

http://forum.kerbalspaceprogram.com/entries/3710-K-42-The-hardware-part-1-Backplane-and-enclosure

Link to comment
Share on other sites

Crap, as a Flight Simulator deck builder, this gets my "bug" itching again and makes me want to build a pit for KSP...

Question is, what style to choose. I fly a lot of different mission profiles from straight ascents, to interplanetary and SSTO, so I'm a little in doubt whether I should keep myself to a single 'cockpit' design or universalize it.

I have a stack of 10" TFT screens on hand that need a new home, so that's a good excuse to make something that externalizes RasterPropMonitor or connects to Telemachus...

Aside from that? How about throwing in some gimmicks to 'Kerbalize' the deck? I mean, NASA thought of *everything* in every single detail, you can't expect Kerbals to do the same. So there would be a large amount of scavenged components and sticky tape to keep the deck together. Maybe even use a 5,25" floppy drive or a tape deck wired into an Arduino to load and store kOS scripts...

Link to comment
Share on other sites

How about throwing in some gimmicks to 'Kerbalize' the deck? I mean, NASA thought of *everything* in every single detail, you can't expect Kerbals to do the same. So there would be a large amount of scavenged components and sticky tape to keep the deck together. Maybe even use a 5,25" floppy drive or a tape deck wired into an Arduino to load and store kOS scripts...

I like your approach to this. Can't wait to see the result. A tape puncher/reader from an old Teletype would be even better than a floppy drive but is probably hard to find these days.

Don't forget the snacks compartment. :-)

Link to comment
Share on other sites

I setup a burn in program and wired up 8 of my displays into a chain. The reason you see red LEDs in the bottom one... Is because what you see is ALL the green LED modules I had that didn't show signs of dead segments. I left enough wire length between each group of 4 to support both vertical (1x8) or horizontal (2x4) orientation.

The program cycles through my sine wave program, generating the PWM sine wave output, and displaying the PWM value on an LED screen. The screen that displays the output cycles after a specific number of screen updates, and the screen updates only happen after so many increments of the sine output value. All other screens display 8.8.8.8.8.8.8.8. so that I can see if any segments are dim or dead.

Sadly enough... Since starting burn in earlier today, I already have seen intermittently dim segments and a dead decimal point across two additional LED modules... This brings my failure rate back up to an inconceivable 50%. This photo was taken before the second display defect was detected. It looks like I found the ONE seller from China that can't get a good LED... That was the one thing I always had luck with... Oh well... :(

Still, it is progress, and I have the displays pretty much wired up and ready to use.

KerbalGreenLEDx8.jpg

Link to comment
Share on other sites

Anyone have $179 US Dollars? You can buy ONE whole Honeywell tab lever toggle switch... Just found it on ebay... it's just one though, you'll need to hope one or two dozen more pops up someday, for any reasonable simpit project. It's not even the enclosed type, just an open frame aviation grade switch... New, these retail for around $400 each. :0.0:

http://www.ebay.com/itm/Honeywell-Microswitch-23AT473-T2-Aircraft-Toggle-Switch-2PDT-On-On-5A-NOS-/171310459602

$_57.JPG

I still think this lever style needs to be mimicked by China and their "top quality" manufacturing. :rolleyes:

I'd still buy cheap replicas. :sticktongue:

If you are cool with plastic tab levers... These ones are "only" $33-36 US Dollars... :rolleyes:

"only" :P

http://www.ebay.com/itm/HONEYWELL-32NT391-1-C08-Toggle-Switch-DPDT-6-Conn-On-Off-On-/381021675889

http://www.ebay.com/itm/HONEYWELL-32NT391-7-C08-Toggle-Switch-DPDT-Mom-On-Off-Mom-On-/221560783935

i still think if a mold can be made, it ought to be possible to replicate the correct style tab lever and essentially mold it around switch levers using something like grey epoxy. You can see clearly that these plastic tab levers are pretty much exactly that, but with plastic, instead of epoxy.

I'll be sticking to my cheap Chinese switches... cause I sure can't afford any of those puppies!

Still, they are darn purdy, particularly that authentic tab lever style one! :D

I'll admire from afar. :cool:

Edited by richfiles
Link to comment
Share on other sites

I'd say it would be far more efficient to 3D print the negative, and then just mold the tabs to the switch levers. With a couple molds, and a 5 minute epoxy, you could mix a small amount of epoxy, do a couple switches at once, let it cure and pull the molds, then move to the next couple switches with a new quick mix. You'd need to bond a 3D printed part to the switch anyway (likely with epoxy anyway), so i'd say, skip the extra step, and time to print for every single switch. If you printed, say 5 negative molds, I bet you could just do one, then the next and so on, and repeat with the first mold done by the time you've gone through 5 or so. I also know that some epoxies are already metallic colored, which even saves you the effort of painting.

Link to comment
Share on other sites

i still think if a mold can be made, it ought to be possible to replicate the correct style tab lever and essentially mold it around switch levers using something like grey epoxy. You can see clearly that these plastic tab levers are pretty much exactly that, but with plastic, instead of epoxy.

That's pretty much what I've been thinking for a while. Although, I'm thinking 3D printing.

Question is - can it be done relatively cheaply? A spool of about 700gram ABS is roughly AU $30 ~ $40.

Such a cover would likely be about 15 ~ 25 grams (depending on fill, and how you designed it).

I'll let you know how I go ;):P

Link to comment
Share on other sites

moved here from stibbon's thread. Made a few passing comments there. Didn't wanna hijack his project thread.

I might start a thread of my own at some point here though, but I have nothing actually really put together yet... Just bits and pieces.

Regarding the trig calculations: Those synchros work on a phase difference, right? Doing trig calculations *in* the AVR is slooooooow, so you really don't want to do that. If you can find a way to precalculate the phase shift for each indicator synchro you want (AFAIK, they're linear with pitch/roll/yaw), you can just pull them out of a look-up table if the table has sufficient resolution.

Small tip: Use multiples of 120 degrees to calculate the look-up values to begin with, so you only need to look up a total of three values, and find the rest of the accompanying synchros by simply skipping 120 degrees in the table. So for example, have a table that has 7200 entries, and for a synchro reading zero, the first coil would get a DAC value at entry 0, the second at entry 2400, and the third at 4800.

That saves you memory and calculations because you only need one table which is the same for every synchro (including the reference one).

I can cook up some AVR/Arduino code that does this for three values easily, it's only a few dozen lines of code.

The only element involving phase is simply the phase angle of the rotor (reference), and how it places the rotor windings in relation to the stator (outputs). Synchros are not wound like a 3 phase motor... They use slip rings The output is not generally viewed as bing an actual phase difference applied to the 3 outputs, rather it's only attenuation and polarity of the reference. All synchro signals have peaks that are in phase with all other peaks (regardless of if they are positive or negative polarity peaks). If I'm not mistaken, it ought to be possible to also replicate synchros using a crankshaft, and three linear slider potentiometers attached to the crank in a mechanical "Y" configuration, if that helps you visualize what's being done inside. It's purely about attenuation and polarity. I think I could have used digital potentiometers, had i found ones with high enough resolution, but there were severe limitations because of the low resolution of every pot i'd come across. The benefit, would have been that I could have generated the reference from one of those MAX... whatever the number was signal generator chips, and not had the arduino do anything but adjust the pot levels... Save for resolution... Because each of the 9 synchro outputs would have to be on the wiper, tapped between the positive and negate of the sine wave, you only get half the resolution from peak to zero (the middle of the tap). That meant that an 8 bit pot only had 128 steps per side of the output polarity. Still 256 steps, cause positive and negative polarity is both used, but that doesn't even add up to 360° worth of rotation! 10 bits just gives you the resolution to split the degree ticks up into multiples at most points of the ball's rotation. You rely on the phases not at peak to give you fine detail, while peaks have poor per degree resolution. 12 bits is probably utter overkill, but that's what my DACs came in. If it's possible to use the resolution, then I may as well, as long as memory on a Mega can do it.

I'll be VERY honest... I am VERY new to programming C. Mostly, I look at example code online, copy and paste it, figure out how it works, look up some details here and there, and modify it until the compile button throws no errors and the code actually does what I want it to do! :sticktongue:

You are more than welcome to help me out in any way you see fit. I won't turn down help from someone more skilled at this stuff than I am at this. My plan was to do the trig calculations in a spreadsheet, and do a lookup table, like you said. The hard part is getting that from and idea into working code! :D

I've got to be able to read the three attitude values over serial, coming in from another arduino. that needs to convert to the 9 multiplier lookup table locations (3 per each of the three attitude values). The program needs to regularly look up the values for a sine wave from the reference table. The trig calculations (prepared, with the results in a lookup table) determine a multiplier (attenuation and polarity... basically a decimal value between -1 and 1, I think) that is multiplied with the reference. It's basically lookup a sine value, and multiply that by 9 different multiplier values, then send the original reference, plus nine results to the DACs over I2C.

The reference is not generated by a synchro... It' a steady sine wave, and all the synchro's apply attenuation and polarity to that reference. it means that you have two sets of lookup values. The sine values are the actual sine wave. The multipliers are (as stated before) a decimal value between -1 and 1 (again... I think), that both attenuates the signal (reduces the output value) and leaves it either flipped or not flipped in polarity.

I have wondered, given how buy this thing will be, if it's better to send 9 values over serial (calculating the differences in lookup table values not he first arduino), or if I'd have the leeway to simply calculate the values of the three attitude values into the three lookup table offsets.

Man... it's like 4 AM for me... I'll get back to this... To tired. :confused:

Edited by richfiles
Link to comment
Share on other sites

...hardware assembled, and it's come along a little way since then. :)

Oh hey look! You found a monolith! It's next to your Kerbal Kontroller! :sticktongue:

That thing is looking nice! :cool:

just don't get upstaged by that really good looking K9 in the background! :D

Link to comment
Share on other sites

moved here from stibbon's thread. Made a few passing comments there. Didn't wanna hijack his project thread.

I might start a thread of my own at some point here though, but I have nothing actually really put together yet... Just bits and pieces.

The only element involving phase is simply the phase angle of the rotor (reference), and how it places the rotor windings in relation to the stator (outputs). Synchros are not wound like a 3 phase motor... They use slip rings The output is not generally viewed as bing an actual phase difference applied to the 3 outputs, rather it's only attenuation and polarity of the reference.

I had a re-check there and found out that synchros are actually 3-phase synchronous motors, which have a wound rotor (instead of a permanent magnet one). Usually the rotor is excited with DC to make it work like a motor or generator, like in your car alternator, but when the rotor is excited with AC, the output voltage on each winding is proportional to the rotor position.

Your approach with a look-up table seems to be OK with that.

As an alternative, you can use a DAC with higher resolution (like the Microchip MCP4921/4922 series) or use a separate DAC to create the reference voltage for the first DAC set. In that case, the easiest approach would be to generate the reference sine wave with a single I2C DAC, and use that sine-wave voltage as the reference voltages for the other DACs, which only output a static gain which you can easily fetch from your look-up table. This takes a lot less processing power than looking up the sine wave and multiplying it for each synchro coil output.

The chained DAC approach is described in more detail in application notes from the various DACs, basically you just hook the output of one DAC to the reference input of your other DACs.

Link to comment
Share on other sites

As an alternative, you can use a DAC with higher resolution (like the Microchip MCP4921/4922 series) or use a separate DAC to create the reference voltage for the first DAC set. In that case, the easiest approach would be to generate the reference sine wave with a single I2C DAC, and use that sine-wave voltage as the reference voltages for the other DACs, which only output a static gain which you can easily fetch from your look-up table. This takes a lot less processing power than looking up the sine wave and multiplying it for each synchro coil output.

The chained DAC approach is described in more detail in application notes from the various DACs, basically you just hook the output of one DAC to the reference input of your other DACs.

Link to comment
Share on other sites

But then, can that flip the polarity of the outputs?

Yes. The output polarity does not neccesarily have to be with respect to ground, if your final amplifier stage is differential.

You can have a 2,5V bias on one input of the amplifier and a 0-5V voltage swing on the other, resulting in a -2,5V output when the DAC is set to zero. For the output voltage to read zero, you need the DAC to be at exactly 50% of full scale input. Most DACs support this built-in and some can even understand negative numbers coded in two's complement (signed) integers.

If you have your DAC board already assembled, you may be better off programming the DAC board as a 'dumb' slave which accepts 9 gain numbers over the serial link, and do all of the arithmetic on a remote controller. With a decent refresh rate (50Hz), you need at most 18 bytes per data cycle, or 7200 bits per second of data transfer rate, which is well in the range of AVRs.

Link to comment
Share on other sites

I have at least ten LM675 op-amps... They are a 5 pin power op-amp with inverting and non inverting inputs, a positive and negative rail, and an output (it's a 5 pin device). It's about the only differential input amplifier I have that likely can also power the final output stage as well. I don't exactly have a whole lot of budget left, thanks to a TRIPLE hard drive corruption I just dealt with... Bought a new 4 TB to do restoration to. :mad:

Anyway...

The DACs that I have are 12 bit, but they are powered by the reference, as in the reference is Vdd... The reference/Vdd can't go below 2.7v, or the DAC will power off. The range of operation is 2.7 - 5.5v. If I'm going to simply generate a single sine wave, and don't need to perform any calculations to the value of that sine wave inside the Arduino, I'd just as soon get a MAX038 waveform generator. Then the arduino ONLY needs to pull attenuation values from a lookup table and send them to the DACs.

I've been dealing with computer issues too much though, and I can't think straight... :confused:

How would I invert the reference sine wave (output low peak when the input peak is high)... I should know this... I actually had considered a setup similar to this earlier, but using digital pots, and the resolutions just weren't good at reasonable costs. I already planned to use my DACs in a 0-5 volt configuration, with that feeding into an amplifier, and the amp feeding signal to ground through a small set up transformer, with the other side of the windings wound in a Y. I still need to be able to invert the reference for select outputs though.

It's not just making the reference attenuate between full and nothing, or shifting the sine between a 0 to positive reference range. I also need to make a peak of the reference output as a trough in the output for selected outputs, and vise versa.

Like this:

Example 1: Reference peak high

R╭╯5v

Aâ•°â•®* 0v

B╭╯3.75v

C╭╯3.75v

Example 2: Reference peak low

Râ•°â•®0v

A╭╯* 5v

Bâ•°â•®1.25v

Câ•°â•®1.25v

In the example 1, Output A not only is an attenuated value of the reference, but it is also inverted. The example here would be voltage values where reference is at peak, A would be 0 volts, and B and C would be each at 3.75 volts, half way between out neutral (2.5 volts) and 5 volts. Likewise, in example 2, if the reference happens to be at 0 (remember, this is representing the "negative" phase, A would have to be 5 volts, and B and C would both be at 1.25 volts, halfway between 2.5 volts and 0.

Anyway, I think I'll come back to this later. i'm tired,a nd I could be all wrong. I don't know... I gotta sleep now, so I'll think about it later. I don't get another day off till the 19th, and I'm working 2 jobs, and my computer is being stupid and corrupting disks and not taking an OS install... And I just can't think right now... If you have any thoughts on this, please share. I seem to be lacking in brainpower today. :(

I do thank you for all the ideas! :)

Edited by richfiles
Link to comment
Share on other sites

I think you may be 'stuck' thinking in single-ended voltages here. All of your voltages are with respect to ground, but since op-amps are differential, you can have these voltages to any "zero" reference level you may want.

If your op-amp has an inverting input at 2,5V and a non-inverting input at 2,5V, it will output zero. Put the non-inverting input at 0V, and it will output -2,5V, multiplied by the op-amp's gain. (The power supply to your op-amp needs to be symmetrical, of course.)

For the 400Hz excitation sine wave signal, you don't need a fancy waveform generator. Just a pulse generator is more than enough, meaning you can switch the gain of all of your amplifiers between 1 and -1 with a 400Hz pulse. All you need from there is an RC filter (or RL filter, since it's a current-controlled device) to enable some low-pass filtering.

In your first example, the absolute output of A would be 0V, but its gain would be -1, which is correct if your synchro is pointing all the way up, since the excitation and coil currents are in opposing phases, they will attract with maximum force.

The gains for coils B and C are directly related to the gain of the A coil, since these are part of the same cycle, only shifted 120 degrees out of rotation. Therefore you only need a single look-up table which contains sine values from zero to 360, to get coil A gain, you index the table directly, to get B gain, you use the angle + 120, and for coil C, you use the angle + 240, taking wrap-arounds into account.

This is no different from driving an AC synchronous or asynchronous motor - an AC synchronous motor is identical to a synchro, with a static field (DC) excitation. A synchro has an AC excitation in the rotor, which is more beneficial for holding a position instead of rotating at high speed.

If you want to go the *really* easy route, you can generate the excitation and the gain waveform in one go. To do that, you need to switch the index of your look-up table by 180 degrees (or use a separate lookup table for the 'high' and 'low' levels) every half-cycle of 400Hz. As an alternative to that, you can also multiply the value you looked up by -1 if you are in the far 'low' half of your 400Hz cycle.

The whole she-bang of looking up and transmitting over I2C can be done at an interrupt.

Damn, now I want my own synchro dial indicators to play with and test it out. ;)

Edited by Stoney3K
Link to comment
Share on other sites

This post is 50% shameless plug and 50% relevant!

I have been working on another project for a little while now - a total immersion simulator of the Mercury program using the Oculus Rift (although there will be a version for Monitor too).

As I piece this game together it's occurred to me that I might prototype my simpit layout in VR first to get it right before I build! In other news just 3 weeks until a new home with room for a simpit ;)

More info on my other project here www.goforlaunch.co.uk

Xn429ms.jpg

Link to comment
Share on other sites

Any of you guys involved in this panel on the Sydney Maker Faire 2015?

Both the same controller, and that was my build. I had a pretty hectic few weeks trying to get it ready in time for Maker Faire, but it was a really awesome weekend. :)

There's a pretty good chance I'll be taking my controller along for the open hardware miniconf at linux.conf.au in Geelong in February too. Come hang out at the open day if you're in Victoria. :D

Link to comment
Share on other sites

Both the same controller, and that was my build. I had a pretty hectic few weeks trying to get it ready in time for Maker Faire, but it was a really awesome weekend. :)

There's a pretty good chance I'll be taking my controller along for the open hardware miniconf at linux.conf.au in Geelong in February too. Come hang out at the open day if you're in Victoria. :D

I'm gonna try get to this - if only to see this thing in real life, and talk to its creator! :)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...