Show Posts
Pages: 1 2 [3] 4 5 ... 361
31  Community / Bar Sport / Re: How do they weigh.... on: August 11, 2014, 11:32:01 pm
And in the crust. But the easy to get at in volume stuff is mixed in natural gas but not every pocket of NG.

The moon should have more helium-2 than helium-3. The sun doesn't spit out pure heavy isotopes.

And there is another source that won't run out soon, solar wind! You just need really BIG solar sails.

I have an old, now over 90, friend who flew anti-sub blimps in WW2. And then building and flying advertising blimps in post-war Germany, the US and finally Japan (painted like fish, so beautiful!) in the mid-late 70's. I'm not sure if he logged more hours in LTA than fixed wing but he's listed in the Delaware Aviation Hall of Fame.

I asked him if hydrogen would wouldn't lift a lot more weight and it turns out the difference isn't so great.

1000 cubic meters of hydrogen at 0C weighs 89.9 kg
1000 cubic meters of helium at 0C weighs 178.5 kg, 88.6 kg more.

1000 cubic meters of air at 0C weighs 1293 kg.
That's 1114.5 kg more than the helium 1203.1 kg more than hydrogen.
Neither the difference nor the cost are worth the danger of running with hydrogen.

Those antisub blimps were using 10,000+ cubic meters of helium, not like the ones we see now that Lou calls toys.

And BTW, those K ships were tiny compared to the Akron, Macon, and Savannah that carried defensive fighters.
32  Using Arduino / General Electronics / Re: Wiring Arduino Micro with Xbee Radio on: August 11, 2014, 08:18:59 pm
Oh my LULZ! I went back to make sure and this is The Thread where I first saw the diode trick!
See reply #3.

Quote
It also confuses me. I measured pin 1 and pin 3, both voltages were 3.3V (easily seen from your circuit). Then I measured pin 2 of Xbee, it was 4.8-4.9V. Then I removed the wire connecting pin 2 of Xbee to the Rx of Arduino and measured the output of Rx pin of Arduino, the Rx pin was 4.9V. That means Arduino pulled the Rx pin to HIGH. I cannot explain this.

Quote
Well it looks like SoftwareSerial enables the pullup resistor on the RX line:
https://github.com/arduino/Arduino/blob/master/libraries/SoftwareSerial/SoftwareSerial.cpp#L368

Question to me is can calling the constructor with inverse_logic as 1 work or would that mess up TX?
And if it would mess up TX then maybe derive a class with an overloaded setRX() that doesn't enable the pullup?

Code:
//
// Constructor
//
SoftwareSerial::SoftwareSerial(uint8_t receivePin, uint8_t transmitPin, [b]bool inverse_logic [/b]/* = false */) :
_rx_delay_centering(0),
_rx_delay_intrabit(0),
_rx_delay_stopbit(0),
_tx_delay(0),
_buffer_overflow(false),
_inverse_logic(inverse_logic)
{
setTX(transmitPin);
setRX(receivePin);
}

Code:
void SoftwareSerial::setTX(uint8_t tx)
{
pinMode(tx, OUTPUT);
[b]digitalWrite(tx, _inverse_logic ? LOW : HIGH);[/b]
_transmitBitMask = digitalPinToBitMask(tx);
uint8_t port = digitalPinToPort(tx);
_transmitPortRegister = portOutputRegister(port);
}

void SoftwareSerial::setRX(uint8_t rx)
{
pinMode(rx, INPUT);
[b]if (!_inverse_logic)[/b]
digitalWrite(rx, HIGH); // pullup for normal logic!
_receivePin = rx;
_receiveBitMask = digitalPinToBitMask(rx);
uint8_t port = digitalPinToPort(rx);
_receivePortRegister = portInputRegister(port);
}

I am definitely going to buy a couple dozen 2N7000's and a dozen SN7407's (and some more resistors).

The 7407's look like just the thing for leveling hand-rolled SD adapters... there are 6 lines needing leveled, IIRC.
33  Using Arduino / General Electronics / Re: Wiring Arduino Micro with Xbee Radio on: August 11, 2014, 01:28:26 pm
My thinking is that AVR INPUT_PULLUP current is through 20k-50k ohms, the 3.3V device should be able to take that below 1V without much problem. Maybe the .7V drop through the diode helps?

That's what my gut tells me too, but not so. It's about the voltage when the pin is high, not current when it's low. They're slicing things so thin these days (in a figurative sense, there's no slicing going on, but the transistor structures are extremely thin) that 5V can cause a breakdown when 3.3V won't. Electric field strengths (measured in volts/meter) can get pretty impressive when the size of the structure is measured in nanometers.

I'm thinking of the wrong setup totally. The diode would block the 5V and that would only work if the 5V side is doing the signalling, which it was on the other circuit. Yeah, you can't drag the pin low if you block current leaving it.

Smart thing is to add (a) function(s) to the library that doesn't turn the pullup on then and use that?
34  Using Arduino / General Electronics / Re: Wiring Arduino Micro with Xbee Radio on: August 11, 2014, 12:21:43 pm
Can't use a diode like on the MCU-to-XBee line, because the XBee will still have to pull down the 5V. I'd go with a MOSFET level shifter like this.

My thinking is that AVR INPUT_PULLUP current is through 20k-50k ohms, the 3.3V device should be able to take that below 1V without much problem. Maybe the .7V drop through the diode helps?
You're the one that first showed me using the diode and pullup for TTL serial to a 3.3V sound module (you may have gotten from Sparkfun).

Anyway I learn a bit more about MOSFET's that I haven't used yet. It makes sense *now that I think about it* that the voltage difference controlling the gate has to be relative to something! And that something is the source?

Quote
When the GPIO is 'high' the MOSFET is off (the gate-source voltage is near zero), and R2 pulls the 5V side high.

Am I understanding that right or just agreeing for the wrong reason?
The difference between tech and poetry is that poetry doesn't smoke and burn if it's not right, it often sells!

Quote
Q1 has a (hidden) diode between the source and drain terminals - if the 5V logic side is driven low, this will pull the GPIO low through the diode.  

That gate will always be HIGH won't it? Is that why there's a "hidden" diode? Because if the gate were to go LOW, there wouldn't be any current flow regardless of 5V or 0 on the drain would there?

Quote
When the 5V logic side is high, everything is off and the GPIO will be pulled to 3.3V via R1.

Is that because without flow through the MOSFET, the 3.3V pullup is the signal on GPIO?

If I have this right, I'm another step along in learning MOSFETs.
 
2N7000, 10 cents at Futurlec. But I spend $20 or more to justify the $7 shipping, and they have other goodies.
Or ~40 cents at DigiKey but I can get them in less than 3-4 weeks (days) and for less shipping last time I checked.

I could see keeping a bag of those in a parts bin and getting more 4.7k resistors.
35  Using Arduino / General Electronics / Re: Wiring Arduino Micro with Xbee Radio on: August 11, 2014, 09:47:45 am
diode?
36  Using Arduino / Programming Questions / Re: Non linear list and sensor values (that are not Integers) on: August 11, 2014, 09:38:26 am
Then it's down to accuracy and what code you feel comfortable with.
37  Using Arduino / Programming Questions / Re: Non linear list and sensor values (that are not Integers) on: August 11, 2014, 01:08:18 am
Yes, it does take a small fraction of a second to calculate the polynomial, using Horner's rule.

Did I mention "when you need speed"?  Oh yes, I did.

Quote
The reason to use tables is when you need speed and simplicity in your code.

Table lookup takes a small fraction of a millisecond, including interpolation if you don't use floats.

Which is better if you are running a live machine with PID? And maybe running other concurrent processes?

Which can be calibrated?
38  Using Arduino / Programming Questions / Re: Non linear list and sensor values (that are not Integers) on: August 10, 2014, 10:42:58 pm
There is a much simpler approach that does not involve a large table and interpolation. Those are very smooth curves that can be accurately fit with a simple polynomial, giving you a function P(T) or T(P).  For example, the pressure data for Refrigerant 12 can be fit over the range of 0-150 degrees with a simple cubic polynomial, accurate to about 0.2 PSI over that entire range.

I used MATLAB to calculate the fit, with the result that P(T) = 1.8586e-5*T3 + 0.003803*T2 + 0.51359*T + 9.1194 (see attached plot). So, you need to store only four numbers to calculate P for any T in that range (and outside of it as well). You could use a quartic polynomial for larger ranges.

Curve fits can be done with any spreadsheet, and there are also online services to do curve fits for you.

Edit: to fit T(P) for the range -10 to 150 takes a fourth order polynomial, and the result is accurate to about 2 degrees. However, as  you can see from the plot, the fit digresses outside of the temperature range used for the fit.

The reason to use tables is when you need speed and simplicity in your code. Speed factor goes up 100x just by not generating as simple as sine values.

This is especially true when it is running on a 16 MHz 8-bit processor with no FPU and completely lacks support for 64 bit or larger floats as opposed to a 2+ GHz 32 or 64-bit pipelined multi-core processor with FPU's and more L1 cache than any AVR has SRAM.  

When you don't need speed and don't care past 3 or 4 places on answers, then get that 2 degrees accuracy that a table would not have to be off by at all.

Oh yeah. Didn't I mention that tables can be calibrated?
39  Using Arduino / Programming Questions / Re: Combining Codes on: August 09, 2014, 09:56:22 pm
I saw code that is supposed to be Motor Code and I saw code that's supposed to be Servo Code.
Using the posted code, what happens when you run either with hardware connected?

Just curious and wondering how you get from there to dog feeder.
40  Using Arduino / Programming Questions / Re: Virtual shift register lacks the first bit... on: August 09, 2014, 11:52:07 am
the OP is trying to figure out how to get an Arduino to insert data onto the S88 bus that is already under control of his model railway controller.

That is hacking.

Quote
In principle this is perfectly feasible - when you know how.

When you have enough details to try something that might work.

Quote
And I think (?) the OP has in mind to use wireless to enable the master Arduino to collect data before it inserts it onto the bus.

What have you in mind?

...R

I didn't catch what the radio is for.

With all the proprietary stuff what can you do but hack?
See if the company name doesn't translate to Tandy.
41  Using Arduino / Programming Questions / Re: Virtual shift register lacks the first bit... on: August 09, 2014, 03:53:57 am
If you could hack the bus then you might send data back on it, which is what you're trying to do isn't it?
42  Using Arduino / General Electronics / Re: Wiring Arduino Micro with Xbee Radio on: August 08, 2014, 08:16:38 pm
Can the End Device talk back and if so, how? Because that is where you are having the problem, no?

43  Using Arduino / Programming Questions / Re: Virtual shift register lacks the first bit... on: August 07, 2014, 04:50:38 pm
If you could hack the S88 bus, you might not need the radio.
44  Using Arduino / Project Guidance / Re: program to find rpm on: August 07, 2014, 04:42:00 pm
Just created this on Excel!

That's cool. You can also make concentric circles with differing numbers of spokes.

With 2 sensors arranged so that when 1 has a spoke in the way, the other has between spokes it is possible to tell not just the turn but the direction.

Adding sensors can be used to raise the precision as well, but only as precise as the sensors are placed and there is another use of printing on transparency. A pattern of apertures (holes, make them bigger than pin holes!) in black can assure that light only gets through to the detector (back from the aperture, in a blackened inside tube even paper will do) from the carefully channeled path even if the emitter and detector bulbs are slightly off to one side -- the light path and if it is blocked or not is what matters.

Find out how verniers work and you have a key to a precise measuring technique.
45  Using Arduino / Project Guidance / Re: program to find rpm on: August 06, 2014, 08:21:44 am
Quote
where can i get such wheel printed ?

You make a graphic and take that to an office store and have them print a transparency.

You may or may not have trouble with scale X-Y, if a circle comes out ellipse but I did not.
Total scale, how big the printed is to the screen picture is pixels per centimeter or inch.

Finding a picture ready made, I dunno. A CAD package is your best bet to get everything
right.

On the same transparency sheet, put all the things you will need, like apertures for detectors.
Pages: 1 2 [3] 4 5 ... 361