Show Posts
Pages: 1 ... 435 436 [437] 438 439 ... 579
6541  Using Arduino / General Electronics / Re: LED clock display on: May 06, 2011, 10:03:22 pm
Thanks John,

I had seen those models but after a mind-numbing hour or so looking at spec sheets I missed the fact that the three extra DPs had separate pins. I can use them and blank out the "degrees" LED.

I'll revisit them, they are smaller than i'd like though.

There are a stack of displays on the Mouser site and some that look good, but when you try to find the part on the manufacturer's site they don't exist, for example the MSQCxxxx is listed as an Everlight product, search for that on the Everlight site and you get nothing. Not very confidence boosting. The product is actually from Fairchild but I think Everlight has bought the rights to the LEDs from them, maybe they just haven't updated their web site or maybe they intend to retire many of the products.

Now realistically I will probably never use more than about 10 displays so I could just buy them now, but it goes against the grain to use an orphaned or hard to find product with no second source.

Who would have thought such a simple thing would be so hard?

Maybe the best thing to do is use discrete digits and a few LEDs.

______
Rob
6542  Using Arduino / Networking, Protocols, and Devices / Re: Arduino as SPI slave on: May 06, 2011, 09:45:32 pm
2500Hz is indeed very slow and you'd have to wonder why that is.

Certainly if you've been using shiftOut() it won't be that slow and I doubt you could get it to run that slow. You'll have to bit bang the data.

I like the idea of an on-board serial EEPROM (or flash for that matter) chip, the only thing is that the data structure has lat and long so by using telemetry you can find the plane (is that a requirement?).

______
Rob
6543  Using Arduino / Programming Questions / Re: Need help with an "IF" statement ... on: May 06, 2011, 09:36:36 pm
A line like

Code:
if((dht_IN_Temp >= Temp_IN_Value + Temp_IN_Value_Threshold && dht_IN_Temp - dht_EXT_Temp >= 5) || dht_IN_Hum - dht_EXT_Hum <= -15 || millis() - ActiveAerationPreviousStateChangeMillis >= ActiveAerationOffDuration){

Is so confusing I don't think there's a chance it's doing the right thing. And if it is it's totally unmaintainable.

I'd at least try to put the tests on separate lines

 
Code:
if( (dht_IN_Temp >= (Temp_IN_Value + Temp_IN_Value_Threshold) &&
(dht_IN_Temp - dht_EXT_Temp >= 5) ||
(dht_IN_Hum - dht_EXT_Hum <= -15) ||
(millis() - ActiveAerationPreviousStateChangeMillis >= ActiveAerationOffDuration)
{

But it's not clear if is should be

a && (b || c || d)

or

(a && b || c) || d
 
or whatever. Now I'm sure you could look into the operator precedence but you shouldn't rely on that anyway. I'd be included to split the calculations from the tests

Code:
int a = Temp_IN_Value + Temp_IN_Value_Threshold;
int diff_temp = dht_IN_Temp - dht_EXT_Temp ;
int diff_hum = dht_IN_Hum - dht_EXT_Hum ;
int d = millis() - ActiveAerationPreviousStateChangeMillis ;

   if(dht_IN_Temp >= a && diff_temp >= 5 || diff_hum <= -15 || d >= ActiveAerationOffDuration) {

This needs better variable names and still needs ()s to force the order of tests but I think it's a lot clearer.

______
Rob
6544  Using Arduino / General Electronics / Re: Powering from AREF issue - (DS18B20) on: May 06, 2011, 09:01:02 pm
I would think that using the internal AREF as a power supply is dodgy practice anyway.

______
Rob
6545  Using Arduino / Sensors / Re: Sensing tank fullness on: May 06, 2011, 08:48:11 pm
You wouldn't get a secondary reflection would you, I would think glass is opaque to ultrasonic?

Also, as I understand those sensors only provide for a single response.

______
Rob
6546  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Slave to Arduino Master SPI on: May 06, 2011, 07:59:45 pm
Quote
i presume to select other slaves on your BUS you can substitute the any DI pin as an SS pin to select a slave?
Correct.

_____
Rob
6547  Using Arduino / General Electronics / Re: LED clock display on: May 06, 2011, 10:33:38 am
That's probably why they are so cheap smiley

I can't play with cutting tracks because this could be a product, and also I need to be able to alternate between time and numbers under program control.

So this display is useless. I thought I'd found a better one at Mouser but just realized it's common anode smiley-sad

I can't believe these are so hard to find.

______
Rob
6548  Using Arduino / General Electronics / Re: LED clock display on: May 06, 2011, 03:43:39 am
I haven't got one but the photos show 12 pins so I'd say yes.

I've emailed the distributor (no answer yet), but as it stands this is totally useless, how could they make such a thing and have it on the market?

______
Rob
6549  Using Arduino / General Electronics / LED clock display on: May 06, 2011, 02:11:04 am
I'm thinking of using this LED clock display (data sheet attached) to display either numeric data or the time.

But from what I can see the DP2 and colon LEDs are wired in parallel. This would mean that they can't be individually controlled which in turn makes the display totally useless for either.

Have I missed something?

______
Rob


6550  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Slave to Arduino Master SPI on: May 05, 2011, 10:58:42 am
That's exactly the method I suggested in a thread a couple of days ago. The only hassle is that you have to "reconstruct" the data because you get 8 bytes in with all the "0" bits in one byte,  all the "1" bits in the next byte etc. But depending on the application that may not be an issue.

You could to up to 8 devices this way (or more if you use a second/third/etc port).

I haven't done the maths though, because you would have to bit bang the SPI it may still be faster to daisy chain and use the SPI hardware, or use the standard technique with N select lines.

Did you measure any speed advantage?
______
Rob
 
6551  Using Arduino / Networking, Protocols, and Devices / Re: Gonna bother you folks about RS485 on: May 05, 2011, 03:21:53 am
Nicely done.

I love the power savings you got by controlling the peak/off peak usage. What a difference.

Quote
I called the power company and they were amazed.
Were they happy?

I live on solar so haven't had a power bill for 10 years, of course I effectively just paid in advance because I had to buy the gear.

______
Rob
6552  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Slave to Arduino Master SPI on: May 05, 2011, 12:45:32 am
There's a theoretical increase in performance with daisy-chaining because you don't have a select for each slave. Also if there are a lot of slaves there's a saving in pins.

Apart from that it just seems like a neat idea.

______
Rob
6553  Using Arduino / Programming Questions / Re: Memory corruption bug, how to find it? on: May 05, 2011, 12:23:06 am
I've had similar problem just yesterday when compiling outside the IDE, I swapped from a 328 to a 2560 but I was still using the .o files from the 328. It compiled and even ran a bit but the following

Code:
setup () {
   Serial.begin (115200);
   Serial.print ("123456789");
}

Printed this for ever

12345123451234512345

It turned out the code was constantly reseting because the linked .o files were for another processor.

______
Rob




6554  Using Arduino / Programming Questions / Re: persistent values? on: May 04, 2011, 11:57:58 pm
Save it to EEPROM, have a look in the reference, there's a library to do this.

_______
Rob
6555  Using Arduino / Programming Questions / Re: Serial.read/write doesn't work as i excpect on: May 04, 2011, 09:19:34 pm
Code:
  while (Serial.peek()!='~'){
    sb = Serial.read();             
    str[i] = sb;
    i++;
  } 

As the loop runs 10000 times faster than characters are received I think you will only get the first one here. The second iteration probably occurs half way through the start bit of the second character at which time there is nothing to read and the loop exits.

______
Rob
Pages: 1 ... 435 436 [437] 438 439 ... 579