Show Posts
Pages: [1] 2
1  Using Arduino / Installation & Troubleshooting / Re: alternative ways to load programs on: December 07, 2013, 09:49:04 am
After a lot more work and a custom built serial to t/l interface I have resolved most problems. One of the main problems was that the software does not do something that I assumed it did. Assumption being the mother of all f#$k ups and my infrequent use of Arduino.......  Well I am used to industrial PLC's that when you create a program you also define the type of processor and hardware and that becomes a part of the program so that when you call up the program with the software it also sets the communication parameters automatically. Arduino does not do that. It defaults the board type to UNO with a new software install. So while the serial monitor would show data camping from the board and the green light on the board would blink when uploading, you would get an out of sink message at the end and the program would not load. Setting the correct board type cured the com error and the processor load.

This was on 2 mac's running Mavericks and using Arduino 1.0.5.   An old machine running 10.5.8 on a PPC has a mutitude of java comm errors but it is not a machine I need to use so I will jive up on it. I have successfully used the the spark fun usb to 6 pin header FTDI cable with the Mac Mavericks machines. Both Java 7 and Java 6 are loaded on these so I do not know which is actually being used. I also used the Keyspan USB to RS 232 adaptors that I have several of. I constructed a straight through DB9 Female to Female cabe and used a DeccanRobots RS232 to TTL converter. Got these some where off the internet. They have a DB9 Male on one end and a 4 pin header for coms and a 2 pin header for power.  Since I have the crimpers and pins and connector bodies I constructed a 6 pin header ( arduion 5 volt 328 pro ) to the RS232 header.  Connection are as follows with A for Arduino end and R for RS232 convertor end:  R-Tx to A-Rx     R-Rx to A-Tx    R-RTS to A-reset   R+  to A  5 volts    R-  to A  common.   This worked great ,  just like the cable for loading programs and on the serial monitor. The only difference is the arduino board will have to get power from some where else since the USB cable would power up a stand alone board and this will not. So If you have a real 9 pin serial port on your computer and want an alternative to the cable this is viable.

My next test to to load the latest version of the software 1.5.5 and try that. I was going to last night but the site hosting the download ( the actual Arduino site ) was slowed to a crawl..   I downloaded 1.0.5 in 2 minutes ( 75 mb file )  but the 135 mb 1.5.5 files was going to take 23 minutes and was running under 60 mb.   Had to be something at there end because I test my end and was getting 40 meg download speeds  and 15 mb uploads and all other sites were running fine.

2  Using Arduino / Installation & Troubleshooting / Re: alternative ways to load programs on: December 06, 2013, 06:52:35 pm
I have been working on it for 3 days on 3 different macs running mavericks. Won't load a program on any of them. Using an old mac running 10.5.8 on a ppc and Java 5 and arduino 1.0.1 and the FTDI cable works. Nothing else will. All 3 of the above mac workrd fine under 10.8.x  with the same cable and the same arduinos and java 6 and 7 and the newer version ov the arduino. What EXACT version on 10.9.x. And version of Java and version of audio and what cable connection and what arduino board board are you using. Would be glad to know that info so I can research further. I am almost positive it is the specific cable and java and arduino combo but I do not know what to attack next.
3  Using Arduino / Installation & Troubleshooting / Re: alternative ways to load programs on: December 06, 2013, 02:00:47 pm
The programmer looks nice. 1 major problem. None of my arduino boards have the ms pins unused and the 6 pin header does not exist. I need something that works over the existing serial port.
4  Using Arduino / Installation & Troubleshooting / Re: alternative ways to load programs on: December 06, 2013, 01:58:52 pm
As my original post states, the tripp like Keyspan units work just fine under java 7 and mac mavericks and have there own drivers and do not use FTDI. So if people do things right  It can be made to work. As far as work  or home and windows, I allow it at neither and after 40 years of electrical engineering experience I have the right and background to hate windows. I did coax a neighbor with a windows laptop to attempt to get the arduino and ftdi cable and download to work. He was not successful. The arduino software just has some major bugs that need addressed by the developer and soon. Right now it is a really bad product.
5  Using Arduino / Installation & Troubleshooting / Re: alternative ways to load programs on: December 06, 2013, 12:37:58 pm
Thanks for the suggestions. Thoses are way 2 complicated. I need a hardware cable that actually works. No SD cards. No bypassing the boot loader. I can't even understand the concept on the first suggestion and I am not going to do another layer of software. On the second item. Does someone just make the card reader loader that would plug into the t/l port on the arduino ? And is there a simply way to compile the sketch and save it to the sd card ?
6  Using Arduino / Installation & Troubleshooting / alternative ways to load programs on: December 06, 2013, 12:07:05 pm
I have been using the FTDI cable with the RS232 TTL header to load my arduinos.  This cable will no longer work on the newer Macintosh operating system ( Mavericks )  because the FTDI drivers and java and arduino software do not conform to industry standards. I can and do use the Tripp Lite Keyspan adaptors with JAVA apps all the time on Mac's. The output of those USB to serial devices is standard rs232 and not t/l level. What I need is a way to program the arduino boards with the 6 pin header t/l level interface that will work under Mac mavericks. The FTDI cable is not an option. Could I use and RS232 to ttl level converter somehow or is there an arduino option of some sort. Money is no option. Anything that will show up under the tools menu as a workable serial port and cannect to  the arduino and work is fine. Iwould pay big bucks for that black box right now if one existed. And don't even suggest a Windows computer, they are not allowed in the house. My current work around is I still have one very old Macintosh PPC running 10.6.8 and the old version of arduino that works with the FTDI cable. I am guarding it with my life.
7  Using Arduino / Installation & Troubleshooting / Re: Arduino in OS X 10.9 Mavericks - Serial Port Issues on: December 06, 2013, 10:46:22 am
Having the same problem. This solution did not work on 2 different Macs. At this point we must consider that Mac Mavericks will be unusable on Arduino. The Arduino home page should list there products as no long compatible with Macintosh until this is fixed. Such a shame. I was really getting into using Arduino products but will have to quit until this is resolved.
8  Using Arduino / Installation & Troubleshooting / Can't upload to Pro with Mac Mavericks on: December 04, 2013, 10:22:43 am
Been using the Pros and Pro mini  for awhile.  Using the USB to 6 pin header cable. I updated 2 of the 3 Macs I use to program the Arduinos to Mavericks and they can no longer upload programs. I get the Upload done  message and then a message about out of sync. The program does not load and the old program is still in and running on the Arduino. I can use my old  Mac G4 mini running Leopard and it will load the boards just fine. I know this worked on the newer Macs under Mountain Lion. So I know a lot of things it is not. It is not the Arduinos or anything to do with therm. It is not the cable. I have valid drivers loaded on all of the Macs. The old Mac is running JAVA 5 the new ones are running java 7. The old mac is 32 bit and the new ones are 64 bit. Any ideas.
9  Using Arduino / Programming Questions / Re: Moving analog data over serial on: January 07, 2013, 09:01:04 pm
I found the binary math problem later. Doesn't help the speed any but did fix the logic.
10  Using Arduino / Programming Questions / Re: need to move 1 unsigned long serially really quick on: January 07, 2013, 08:58:37 pm
Here is the receiver code

Code:
int  redpin = 3;
int  greenpin = 5;
int  bluepin = 6;
int  amberpin = 9;
int  pinkpin = 10;
int  outA = 2;
int  outB = 4;
int  outC = 7;
int  outD = 8;
int  outE = 11;
int  outF = 12;
int  outG = 13;
int  red = 0;
int  green = 0;
int  blue = 0;
int  amber = 0;
int  pink = 0;
int  valuecmd = 0;

void setup ()
{
Serial.begin(9600); 
pinMode (redpin, OUTPUT);
pinMode (greenpin, OUTPUT);
pinMode (bluepin, OUTPUT);
pinMode (amberpin, OUTPUT);
pinMode (pinkpin, OUTPUT);
pinMode (outA, OUTPUT);
pinMode (outB, OUTPUT);
pinMode (outC, OUTPUT);
pinMode (outD, OUTPUT);
pinMode (outE, OUTPUT);
pinMode (outF, OUTPUT);
}

void loop ()
{
readserial ();
}

void  readserial ()
{
  while (Serial.available() > 0)
  {
    red = Serial.parseInt();
    green = Serial.parseInt();
    blue = Serial.parseInt();
    amber = Serial.parseInt();
    pink = Serial.parseInt();
    valuecmd = Serial.parseInt();
    if (Serial.read() == ';')
    {
      output128 ();
      output64 ();
      output32 ();
      output16 ();
      output8 ();
      output4 ();
      output2 ();
      output1 ();
    }
  }
}

void output128 ()
{
  if (valuecmd > 128)
  {
    valuecmd = valuecmd - 128;
    digitalWrite (outA, HIGH);
  }
  else
  {
    digitalWrite (outA, LOW);
  }
}

void output64 ()
{
  if (valuecmd > 64)
  {
    valuecmd = valuecmd - 64;
    digitalWrite (outB, HIGH);
  }
  else
  {
    digitalWrite (outB, LOW);
  }
}

void output32 ()
{
  if (valuecmd > 32)
  {
    valuecmd = valuecmd - 32;
    digitalWrite (outC, HIGH);
  }
  else
  {
    digitalWrite (outC, LOW);
  } 
}

void output16 ()
{
  if (valuecmd > 16)
  {
    valuecmd = valuecmd - 16;
    digitalWrite (outD, HIGH);
  }
  else
  {
    digitalWrite (outD, LOW);
  }
}

void output8 ()
{
  if (valuecmd > 8)
  {
    valuecmd = valuecmd - 8;
    digitalWrite (outE, HIGH);
  }
  else
  {
    digitalWrite (outE, LOW);
  }
}

void output4 ()
{
  if (valuecmd > 4)
  {
    valuecmd = valuecmd - 4;
    digitalWrite (outF, HIGH);
  }
  else
  {
    digitalWrite (outF, LOW);
  }
}

void output2 ()
{
  if (valuecmd > 2)
  {
    valuecmd = valuecmd - 2;
    digitalWrite (outF, HIGH);
  }
  else
  {
    digitalWrite (outF, LOW);
  }
}

void output1 ()
{
  if (valuecmd > 0)
  {
    red = red /  4;
    red = constrain (red, 0, 255);
    analogWrite (redpin, red);
    green = green / 4;
    green = constrain (green, 0, 255);
    analogWrite (greenpin, green);
    blue = blue / 4;
    blue = constrain (blue, 0, 255);
    analogWrite (bluepin, blue);
    amber = amber / 4;
    amber = constrain (amber, 0, 255);
    analogWrite (amberpin, amber);
    pink = pink / 4;
    pink = constrain (pink, 0, 255);
    analogWrite (pinkpin, pink);
  }
  else
  {
    analogWrite (redpin, 0);
    analogWrite (greenpin, 0);
    analogWrite (bluepin, 0);
    analogWrite (amberpin, 0);
    analogWrite (pinkpin, 0);
  }
}

    and here is the transmitter code



Code:
int  bcd1 = 2;
int  bcd2 = 3;
int  bcd4 = 4;
int  bcd8 = 5;
int  analogpinred = 0;
int  analogpingreen = 1;
int  analogpinblue = 2;
int  analogpinamber = 3;
int  analogpinpink = 4;
int  red = 0;
int  green = 0;
int  blue = 0;
int  amber = 0;
int  pink = 0;
int  valuecmd = 0;

void setup ()
{
Serial.begin(9600); 
pinMode  (bcd1, INPUT);
digitalWrite (bcd1, HIGH);
pinMode  (bcd2, INPUT);
digitalWrite  (bcd2, HIGH);
pinMode  (bcd4, INPUT);
digitalWrite (bcd4, HIGH);
pinMode  (bcd8, INPUT);
digitalWrite (bcd8, HIGH);
}

void loop ()
{
readanalog ();
buildbcd ();
serialoutput ();
}

void  readanalog ()
{
  red = analogRead(analogpinred);
  green = analogRead(analogpingreen);
  blue = analogRead(analogpinblue);
  amber = analogRead(analogpinamber);
  pink = analogRead(analogpinpink);
}


void  buildbcd ()
{
  valuecmd = 0;
  if (digitalRead(bcd1) == LOW)
  {
    valuecmd = valuecmd + 1;
  }
  if (digitalRead(bcd2) == LOW)
  {
    valuecmd = valuecmd + 2;
  }
  if (digitalRead(bcd4) == LOW)
  {
    valuecmd = valuecmd + 4;
  }
  if (digitalRead(bcd8) == LOW)
  {
    valuecmd = valuecmd + 8;
  }
}

void serialoutput ()
{
  Serial.print(red);
  Serial.print(",");
  Serial.print(green);
  Serial.print(",");
  Serial.print(blue);
  Serial.print(",");
  Serial.print(amber);
  Serial.print(",");
  Serial.print(pink);
  Serial.print(",");
  Serial.print(valuecmd);
  Serial.print(";");
  delay (300);
}

Notice the delay 300. It I decrease it to 200 the receiver no longer works.  


For the uninformed, 9600 baud using FSK for data transmission is the limit at 900 Mhz since you must modulate the carrier wave. Going up to 2.4 Ghz radios will not work because while the data rate can go up considerably, the range falls apart becasue 2.4 Ghz will not penetrate more than 1 wall reliably. I need to transmit from inside the house to receivers in the yard ( several receivers actually ).

I am going to go to the single long integer. I will use 5 groups of 4 bits to run 5 outputs in PWM which will give 16 steps of dimming to those outputs. Then I will use 7 more bits to control the remaining outputs as on and off only.

I am going to try the example at the Arduino web site    http://arduino.cc/en/Tutorial/Dimmer

Do you all hate that example also.


Moderator edit: [code] [/code] tags added.
11  Using Arduino / Programming Questions / Re: Moving analog data over serial on: January 07, 2013, 05:04:32 pm
The example I was using is from the web site.

http://arduino.cc/en/Tutorial/ReadASCIIString

12  Using Arduino / Programming Questions / Re: need to move 1 unsigned long serially really quick on: January 07, 2013, 04:54:12 pm
9600 baud is a necessity. I will be sending from one Arduino as the transmitter to multiple Arduinos as recievers. And this will be done using 900 Mhz RS232 wireless serial radios. They top out at 9600 baud. Without the delay in the transmitter program and using the serial monitor on the software to see what the transmitter is putting out with the present 6 integer, comma delimited stream, the speed ismore than quick enough. But the receiver cannot read it and stuff it back into 6 sets of integers.  Right now for testing I am just connecting the Tx out of the transmitting Arduino to the Rx of the reicever on my workbench. I will put the radios in later but they are not part of the equation now. I will be using the 32 bits of the single long integer in various ways. 5 groups of 4 bits will be scaled from a binary 0-15 to a integer of 0 - 255 to drive 5 PWM outputs. 7 bits will directly control 7  outputs of the Arduino directly. Either on or off.  One of the bits will be a system on - off bit. When off all of the outputs and the PWM values will be set to 0 . The rest of the 32 bits are spares for now.


 
13  Using Arduino / Programming Questions / need to move 1 unsigned long serially really quick on: January 07, 2013, 01:17:42 pm
I need to move 1 unsigned long integer over the serial port from one arduino to another , over and over, without stopping, as fast as I can. Basically I will encode the bits of the integer in one arduino and then send that unsigned long integer to another arduino to decode them. I will do this over the serial port at 9600 baud. This is to control christmas lights next year so it has to happen really fast to keep the lights up with the music. I am currently doing this with a string of 6 integers, comma delimited and ending the string with a ;   It works but I have to put a 300 ms delay on the transmitter or the decoding fails on the other end. And the data rate is to slow. I have read all of the libriaries and find the definitions for the serial stuff very confusing. I can get the serial print statement to work nicely at all speeds even with the delay between print statements eliminated. But getting the receiver to decode it without the delay of at least 300 ms between transmissions falls flat on its face. I came up with the idea of just using the single 32 bit unsigned integer instead of the 6, 16 bit integers withe the comma delimiter because I thought that should be more simple to speed up. But I am unsure how to proceed.
14  Using Arduino / Programming Questions / Re: Moving analog data over serial on: January 02, 2013, 06:29:46 pm
No. I don't even understand this. I am using an exact copy of a way to read a serial buffer from an example on the auduino web site.
15  Using Arduino / Programming Questions / Re: Moving analog data over serial on: January 01, 2013, 05:18:30 pm
Yes it does. Apparently the voltage levels on the pins 0 and 1 do not work for ttl. Rs232. When I jumper the tx pin on the header going to the Macintosh USB cable header on the arduino board to the Rex pin on the programming port on the reciever board the signal get there okay.

What kind of circuit do I have to use to get the pins 0 and 1 to have the correct voltage levels to communicate.

Pages: [1] 2