Jump to content

Kerbal Cockpit Simulator


Kotagi

Recommended Posts

Any kind of label on it at all?

Do you have a power supply with current limiting? You could turn it to 5 volts, set it to full current limit, then attach it. Slowly turn up the current limit (don't let the meter peg) and see if the meter rises. You want to slowly adjust the voltage and current up, but stop if the needle pegs, or if the movement isn't responsive (then adjust the other dial). Once you have the meter needle at the maximum position, note the voltage and the current settings. If the meter has a linear response to voltage adjustments or current adjustments. You can fine tweak it at the top, but you're testing to see if the meter is current or voltage limiting the power supply when it's at max readings. You can then double check to see if voltage adjustment or current adjustment gives you a linear response on the needle.

If you don't have a bench meter with current limiting... Hmm... You might have to experiment in other ways. You could try feeding it power through a potentiometer and see what it does.

Edited by richfiles
Link to comment
Share on other sites

46 minutes ago, richfiles said:

Any kind of label on it at all?

Do you have a power supply with current limiting? You could turn it to 5 volts, set it to full current limit, then attach it. Slowly turn up the current limit (don't let the meter peg) and see if the meter rises. You want to slowly adjust the voltage and current up, but stop if the needle pegs, or if the movement isn't responsive (then adjust the other dial). Once you have the meter needle at the maximum position, note the voltage and the current settings. If the meter has a linear response to voltage adjustments or current adjustments. You can fine tweak it at the top, but you're testing to see if the meter is current or voltage limiting the power supply when it's at max readings. You can then double check to see if voltage adjustment or current adjustment gives you a linear response on the needle.

If you don't have a bench meter with current limiting... Hmm... You might have to experiment in other ways. You could try feeding it power through a potentiometer and see what it does.

It says international instruments and it has a couple different numbers on it

91145174

FS50DCUA

8949

patent no. 2871450

I have family coming in from out of town so I probably wont get to play around with it for a few days. I def dont have a bench meter but it looks like one would be very useful. They are pretty pricey though. It registered about a third of the scale with a aa so maybe its a 5v that would be awesome but I couldnt know that for sure until I play around a little more..To bad it was the last 1 on amazon :(

Edited by Kotagi
Link to comment
Share on other sites

2 hours ago, Kotagi said:

It says international instruments and it has a couple different numbers on it

91145174

FS50DCUA

8949

patent no. 2871450

I have family coming in from out of town so I probably wont get to play around with it for a few days. I def dont have a bench meter but it looks like one would be very useful. They are pretty pricey though. It registered about a third of the scale with a aa so maybe its a 5v that would be awesome but I couldnt know that for sure until I play around a little more..To bad it was the last 1 on amazon :(

Well, if you're into history, you can find the patent information here.

I haven't been able to find any information via google on those numbers.

The international instruments panel meter 'brochure' is here. Though, visually, your meter looks different to the examples in that brochure.

Going off the code "FS50DCUA" - as a bit of a gamble, given the brochure link, I would potentially hazard a guess that the "50DCUA" would be identifying it as "50-DC-micro amperes".

Possibly a place to start?

Of course, that could just be a coincidental link - but what are the chances of that? :P:wink: 

 

Link to comment
Share on other sites

Voltmeters are the easiest to work with. When you get your meter, check if it has an internal shunt resistor. If it does, then it's a volt meter reading across the shunt. If it doesn't, then you'll have to build or buy a circuit that converts a voltage to a current. I've seen a circuit that does this on ebay for about $4-5. I can go into more details later, but it's about... 2 hours before I have to get up for work! :0.0:
Need some sleep! :rolleyes:

Welp... It's later now! :sticktongue:

+ o--vvv--•--vvv--
      a   |   b   |
          |       |
          >       |
        s >      (m)
          >       |
          |       |
          |       |
- o-------•-------

So this is a simple schematic of the meters that I got. These meters, were incredibly conveniently modable. The resistor "s" is a shunt resistor, and is how my meters can measure current. Most of the electricity goes across the resistor "s". The meter "(m)" measures the tiny voltage across "s". Resistors "a" and "b" are basically to calibrate the meter and to set it's ranges. You may or may not have "a", "b". or "s", depending on how your meter is wired inside the actual meter winding.

If you have the "s" resistor (any resistor that goes across the "+" and "-" sides of the meter circuit), then it means you have a voltmeter that is measuring voltage across a shunt. It'll be far easier to control a voltmeter from your controller than to control an ammeter. If you remove the shunt resistor, then you convert your meter to a voltmeter. You'll need to adjust "a + b" (this can be replaced with a single value) to adjust your range so the meter peaks at 100% when you output 5 volts. Once you've done that, you'll have an easy time controlling the meters.

if you do not have a shunt ("s") resistor in your meter, then the meter is wired fundamentally as an ammeter. You'll need to convert the voltage output from your controller to a current output. I've been playing with an ohms law calculator, and I think you can do this easily. One thing you should do is measure the resistance across the meter, and then put a resistor in series with it. If your control voltage is 5 volts, you want the TOTAL series resistance to be 100K ohms. If your control voltage is 3.3 volts, you want the total series resistance to be 66K Ohms. At 5 volts, passed through 100K, you get 50 microamps. Turns out, thanks to ohms law, reducing the voltage gives you a linear conversion to microamps on your meter. 5 volts gives you 50 microamps, 4 volts gives you 40, 1 volt gives you 10, and 0.1 volt gives you just 1 micro amp. Even at 5 volts, you're also only drawing a quarter of a milliwatt through your meter+resistor. I think most controllers out to be able to direct drive that! (don't quote me on that) I think you can make that meter work!

Edited by richfiles
Link to comment
Share on other sites

On 10/23/2016 at 1:02 AM, richfiles said:

Voltmeters are the easiest to work with. When you get your meter, check if it has an internal shunt resistor. If it does, then it's a volt meter reading across the shunt. If it doesn't, then you'll have to build or buy a circuit that converts a voltage to a current. I've seen a circuit that does this on ebay for about $4-5. I can go into more details later, but it's about... 2 hours before I have to get up for work! :0.0:
Need some sleep! :rolleyes:

Of course I got the 1 thats harder to work with...lol. So is this something that will work?

http://www.ebay.com/itm/Voltage-to-Current-Signal-Transmitter-0-3-3-5-10-15V-to-4-20mA-Linear-conversion-/182050042476?hash=item2a6307326c:g:vuoAAOSwu1VW4YYe

I see it has a 20ua max so its about half of what is needed correct?

Link to comment
Share on other sites

Nope, that's about 400 times more current than your meter draws. That device puts out milliamps, not microamps.
Correction... That device is one of the MANY mislabeled ones on ebay. Chinese to English translation doesn't always parse word order correctly, so a lot of mistakes are made with voltage to current vs current to voltage... If you look at the PC board, you see it takes current in, and outputs voltage... It's backasswards. :rolleyes:

I edited the post above with more correct info though, so check it out. I think you just need a series resistor, so the total series resistance of the meter, combined with your controller max voltage, passes only the max 50 microamps.

You using a 5 volt or a 3.3 volt controller output?

Edited by richfiles
Link to comment
Share on other sites

Or this?

https://www.amazon.com/gp/product/B01FBGOSEQ/ref=ox_sc_mini_detail?ie=UTF8&psc=1&smid=A2TOL213PF2CAG

5 minutes ago, richfiles said:

Nope, that's about 400 times more current than your meter draws. That device puts out milliamps, not microamps.
Correction... That device is one of the MANY mislabeled ones on ebay. Chinese to English translation doesn't always parse word order correctly, so a lot of mistakes are made with voltage to current vs current to voltage... If you look at the PC board, you see it takes current in, and outputs voltage... It's backasswards. :rolleyes:

I edited the post above with more correct info though, so check it out. I think you just need a series resistor, so the total series resistance of the meter, combined with your controller max voltage, passes only the max 50 microamps.

You using a 5 volt or a 3.3 volt controller output?

Ok I will have to completely disassemble the meter and find out. Thanks for the input :D

Link to comment
Share on other sites

That one's the correct configuration, but still 400 times too much for your meter. The simplest solution actually makes your meter nearly as easy to drive as a volt meter. That's a simple resistor in series. You will need to measure the resistance of your meter. Add a resistor in series so the total resistance of both combined is either 100 k ohms, to 66 k ohms (for 5 volt or 3.3 volt control, respectively). That resistance, combined with your control voltage will mean a restricted current will flow through the meter, as calculated by ohms law: I = V/R

If voltage is 5 volts, and total series resistance is 100 k, then: 5 / 100000 = 0.000050 (50 microamps). If you plug that in, you find you get a linear response.

VOLTS kOHMS µAMPS
5 100k 50
4.5 100k 45
4 100k 40
3 100k 30
2 100k 20
1 100k 10
0.5 100k 5
0.2 100k 2
0.1 100k 1

As you can see, you get a very linear response when you input different voltages. You might find you need to add a small filtering capacitor to your PWM outputs to smooth the PWM values. putting a small capacitor across the meter should do the trick. This is functionally equivalent to putting the cap between the resistor and the meter, and the other end to ground. You can experiment there. It's hard to calculate the exact value, but it can be calculated ideally if you know the controller's PWM frequency, the meter resistance (and the resistor that will be added to make it 100k or 66k) total, and the operating voltage (5 or 3.3 v).

regarding shunt resistors and series resistors... If you have an internal shunt resistor, removing it will turn the meter into a volt meter (range unknown without measuring). If you do not have an internal shunt resistor, then it's an amp meter, but we can still use it easily, as is. You can measure the meter resistance simply by measuring across the external terminals. That's all we need (even if the meter has an internal shunt resistor, we could leave it be, and still use it in this configuration, as an amp meter). The series resistor is added externally, to get a total series resistance. PWM smoothing cap is added across the meter terminals. This is generally a small cap, something like 0.1µf to 10 µf.

Edited by richfiles
Link to comment
Share on other sites

1 hour ago, richfiles said:

 

Thank you for the info. It all makes alot more sense now. I will let you know if I run into any problems getting it to work. BTW I saw your updated meters with the lights installed. It looks awesome. Keep up the good work

 

Link to comment
Share on other sites

Assuming zero is zero on both sides, and the scale is linear, all you need is a resistor - in series for voltage to current, parallel for current to voltage. You only really need a converter/loop driver board if using a non 0-x scale, e.g. 4-20mA.

Link to comment
Share on other sites

Is it even possible to do this with a raspberry pi? Its looking like arduino would have been the way to go...Could the pi access the variables on my windows pc from kerbal?  Maybe I just havent read enough yet but if anyone could point me in the right direction that would be great :D

Link to comment
Share on other sites

I have no idea how to use kRPC, but I hear good things spoken about it. Might wanna check it out and see if it's more up your alley for a Pi based build.
Honestly though, if you know the Pi well, and know how to handle the GPIO, then you should be fine. I don't know if Pi has PWM or DAC outputs. Could be a hassle to do manually controlled PWM if it don't. Arduinos do tend to excel at embedded applications. You can always do serial communication with a DAC chip, or you could send a serial data stream to an Arduino, and have the Arduino handle the hardware, and have a Pi doing other tasks.

Link to comment
Share on other sites

Just now, richfiles said:

100K is for 5 volts. 66K is for 3.3 volts. if you use the other, you'll get more range. (60K is close enough).

I had a 100k sitting in front of me so I used that. Its awesome how easy it is to control the range though. This is so rewarding when you get something working like this. And once I get 1 working in game, it will be just repeating the process over and over I assume. This is exciting

Link to comment
Share on other sites

21 minutes ago, richfiles said:

I don't know if Pi has PWM or DAC outputs. 

It has 1 hardware pwm and the rest can be used as software pwm. As far as I know, you have to buy a breakout board for DAC though(from the 5 minutes of research I just did) There is also breakout boards to add hardware pwm outputs if I needed them

Link to comment
Share on other sites

 

6 hours ago, Kotagi said:

https://vid.me/zdwC

So the meter works perfect. Thanks for the help. Now I need to dive into krpc and figure out how that works. But this was a big step. Thanks again

Don't you mean: 

 

 

:P 

5 hours ago, Kotagi said:

It has 1 hardware pwm and the rest can be used as software pwm. As far as I know, you have to buy a breakout board for DAC though(from the 5 minutes of research I just did) There is also breakout boards to add hardware pwm outputs if I needed them

 

6 hours ago, richfiles said:

I have no idea how to use kRPC, but I hear good things spoken about it. Might wanna check it out and see if it's more up your alley for a Pi based build.
Honestly though, if you know the Pi well, and know how to handle the GPIO, then you should be fine. I don't know if Pi has PWM or DAC outputs. Could be a hassle to do manually controlled PWM if it don't. Arduinos do tend to excel at embedded applications. You can always do serial communication with a DAC chip, or you could send a serial data stream to an Arduino, and have the Arduino handle the hardware, and have a Pi doing other tasks.

I haven't looking into kRPC (I really should) -- however, if I was going to go down that route, I would still use Arduino + Electronics connected to 1 or a few arduinos (connected serially), and have kRPC piping stuff to the Arduino(s) via the raspberry pi (possibly something like this - https://oscarliang.com/raspberry-pi-and-arduino-connected-serial-gpio/ - thought richfiles might give some more technical input why that might be problematic :P

Not sure bout lag-time from sending signal via arduino to 'pi, to kRPC, to the game (ie. switching buttons, adjusting throttle).

 

Link to comment
Share on other sites

I cant get krpc to work at all. I spent all day. The server turns on..Just cant connect to it. From the pi or local machine. This is aggravating..Its probably user error but the instructions seem pretty simple :(

 

Edited by Kotagi
Link to comment
Share on other sites

So my brain hurts..lol. Im going to take a break for the day. I fully controlled my craft from the pi by running a script. Tomorrow I will try to connect some switches and the meter and see what I can get working. We will see. Mission accomplished today though  

Btw, I wasted the whole day because I only copied the gamedata folder from the krpc zip. Once i copied all the files everything worked like a charm. And it was almost instant response. My pi is only connected over wifi so I thought I would get some delay but I guess not. Maybe as the pragram gets more advanced I will run into that.

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...