Show Posts
Pages: [1] 2 3
1  Using Arduino / Microcontrollers / Re: FT232RL Not in Sync Error on: June 10, 2013, 12:50:29 am
I can not be of much help but I have the same problem and I tried 2 different ftdi breakout boards one adafruit and one sparkfun. Still no good.
I post this becaise you might search my posts and see all the advice that was given to me, it may help your situation. That error mesage as you are no doubt aware is of no help.
2  Using Arduino / Programming Questions / Re: Can't get passed the example of SoftSerial on: February 06, 2013, 01:57:43 am
Sorry Michinyon I'm not sure how it can be different.
The example program runs between two different baud values one the hard serial the other the soft serial.
Changing the Serial monitor baud in the drop down menu should switch between the two.
When I choose a baud rate that is different from either nothing is on the serial monitor.
3  Using Arduino / Programming Questions / Re: Can't get passed the example of SoftSerial on: February 06, 2013, 01:39:31 am
I have a project which uses a sensor and Softserial to communicate with it. But like I said at the beginning of this post I am only trying to run through the Tutorial example of Softserial.
If I can't even get this to work and understand it so I have no chance on the next step.

4  Using Arduino / Programming Questions / Re: Can't get passed the example of SoftSerial on: February 06, 2013, 01:10:19 am
to PeterH i have tried your suggestion
the serial monitor shows  "ï­ÞÌ" at baud 4800 and "àà" a whole line of them actually.

PaulS I was trying to follow the distructions of the tutorial on the Arduino site that says "no circuit" and shows a picture of the uno alone with nothing connected. But why does it print "goodnight moon" on the hardwired serial port with no external wire. Is there an internal link?


5  Using Arduino / Programming Questions / Can't get passed the example of SoftSerial on: February 05, 2013, 04:17:33 pm
I want to start to work with SoftSerial but I can not even get the example to work.
The tutorial page says "no circuit required" Yet the code notes say
Code:
The circuit:
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)

When I have nothing on the board I get "goodnight moon" on serial monitor 57600 baud
Change baud to 4800 baud I get  " ÿÿþþÿ" on serial monitor

I put two jumper pin 10 to TX (pin1)   and Pin 11 to ( pin0 )

I get o continual stream of " ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ "

What am I not seeing? It is so simple an exercise I read over and over and I just can not see where I am going wrong. I have changed the uno chip for a new one. I don't have a second board to try.

Appreciate any time you can spare to tell me where I should be looking.
Thank you

The example is
Code:
/*
  Software serial multple serial test
 
 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.
 
 The circuit:
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)
 
 Note:
 Not all pins on the Mega and Mega 2560 support change interrupts,
 so only the following can be used for RX:
 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
 
 Not all pins on the Leonardo support change interrupts,
 so only the following can be used for RX:
 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
 
 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart's example
 
 This example code is in the public domain.
 
 */
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() 
{
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
 
  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(4800);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}


6  Using Arduino / Programming Questions / Re: how to escape from while control structure on: November 22, 2012, 02:13:11 pm
Problem has resolved itself. Unknown reason. Same code same circuit.

Sorry the latest code got changed to A2 and A3 because I had tried so often to solder and re solder the connectors that I had to jump to the next two analog pins, As I only have 1 digital pin not being used. The issue still occurred after I changed Analog pins I actually tried ALL the analog pins in case it was an issue with just A0 and A1 but still occurred, then it didn't.
Thanks for all the help.
7  Using Arduino / General Electronics / Re: How to stop PID controller flickering my room lights on: November 22, 2012, 02:02:27 pm
Thanks for the replies, I am working though your suggestions.
To dhenry I considered this when first designing the project I like the PID to limit the power to the element on start up the library allows to set upper limit this allows me to get the viscous liquid warm so as not to scorch and give off flavours, but it is the easiest solution so may risk the scorch to get the light steady.
The lights are ling tube with electronic ballast.
Incandescent bulbs do not flicker.
8  Using Arduino / Programming Questions / Re: how to escape from while control structure on: November 19, 2012, 11:31:43 pm
It can't be wiring because I took the sketch and loaded it into my UNO board with two jumpers to Ao and A1 and it still did it.

Here is the code if anyone wants to way in. Thanks

Code:

#include <Arduino.h>

#include <OneWire.h>
#include <DallasTemperature.h>         // temperature sensors.
#define ONE_WIRE_BUS 8


// Data wire is plugged into pin 8 on the Arduino
OneWire oneWire(ONE_WIRE_BUS);      // Setup a oneWire instance to communicate with any OneWire devices
DallasTemperature sensors(&oneWire); // Pass our oneWire reference to Dallas Temperature.
DeviceAddress  Rims = {
  0x28, 0xDC, 0x09, 0x22, 0x04, 0x00, 0x00, 0xBD}; //DS18B20 address Done!!
DeviceAddress  Mash = {
  0x28, 0xEB, 0x6A, 0x21, 0x04, 0x00, 0x00, 0x02 }; //DS18B20 address Done!!


#include <Button.h>
Button one = Button(10,PULLUP); // button on pin 7
Button two = Button(9,PULLUP); // button on pin 9
const int heaterpin = 6;       // output on pin 3 conected to heater
float tempC = 23;               // tempC will be asigned actual temp later
int cat = 0;  // electrodes to insure water level
int dog = 0;  // white and blue contect ot A4 & A5 Red central to +ve
int set = 0; // set will be setpoint to display purposes.
int ledpin = 13; // set led to pin 13
int heat = 0;  //
int safecat = A2;  // pin number A2 is connected the safety pin in the RIMS tube
int safedog = A3;  // pin number A3 is connected the safety pin in the RIMS tube
//int Maxpower = 200; // sets how hot the heating element gets when full on upto 255

#include <PID_v1.h>
double Setpoint, Input, Output;  //Define Variables we'll be connecting to
PID hltPID(&Input, &Output, &Setpoint,2,5,1, DIRECT);  //Specify the links and initial tuning parameters


#include <LiquidCrystal.h>                 // include the library code:
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // numbers of the LCD interface pins Analog as digital



void setup(void){
  Serial.begin(9600);  // start serial port if need to debug

  pinMode(ledpin,OUTPUT); //  warning light or buzzer

  pinMode(safecat,INPUT_PULLUP);   //  seting the Analog pins to digital input
  pinMode(safedog,INPUT_PULLUP);   // gnd------ probe---water or not-- probe------pin 
  cat = digitalRead(safecat);  // asigning cat & dog variables with the value
  dog = digitalRead(safedog);

  sensors.begin(); // Start up the DS18B20 library
  sensors.setResolution(Mash,10);// set the resolution to 10 bit (good enough?)
  sensors.setResolution(Rims,10);// set the resolution to 10 bit (good enough?)

  lcd.begin(20, 4); // set up the LCD's number of columns and rows:
  lcd.print("Rims Temp is :");
  lcd.setCursor(0, 1);
  lcd.print("Mash Temp is :" );
  lcd.setCursor(0, 2);
  lcd.print("   Set point :" );

  Input = tempC; //PID initialize the variables we're linked to
  Setpoint = 68.50;  // Setpoint entered here can adjust with buttons
   hltPID.SetMode(AUTOMATIC);  //turn the PID on
 //  hltPID.SetOutputLimits(0,Maxpower); // limits how hot the heating element gets when full on.




}
// button press sub-routine for increasing setpoint
void Up(){
  lcd.setCursor(14, 2);
  lcd.print(Setpoint = Setpoint + 0.5); 
}
// button press sub-routine for decreasing setpoint
void Down(){
  lcd.setCursor(14, 2);
  lcd.print(Setpoint=Setpoint - 0.5);
}


void loop(void){
 
 
  delay (200);
  sensors.requestTemperatures();      //get temperature
  float tempC = sensors.getTempC(Rims);//asign the temperature to tempC
  float tempM = sensors.getTempC(Mash);//asign the temperature to tempM

  lcd.setCursor(14, 0);               
  lcd.print(tempC);                   // print tempC to LCD
  lcd.setCursor(14, 1);               
  lcd.print(tempM);                   // print tempM to LCD
  lcd.setCursor(14,2);                 
  lcd.print(set);                     // print Setpoint temp.

  // ________________________________________________________________

  // lock up the sketch until RIMS is full of water
    cat = digitalRead(safecat); // re sample
    dog = digitalRead(safedog);
   
  while(cat == HIGH||dog == HIGH){    // both pins need to be conducting to ground
    analogWrite(heaterpin,0); // make sure heater is off
    digitalWrite(ledpin,HIGH);  // Big red led do not heat
    // may use a buzzer
    cat = digitalRead(safecat); // re sample
    dog = digitalRead(safedog);
    delay(1000);
    Serial.println("in while");   //debug shows it is in the "while" loop
    Serial.print("AO= ");
    Serial.println(cat);
    Serial.print("A1= ");
    Serial.println(dog);
    lcd.setCursor(5, 3);   
    lcd.print(cat);              // print 1 or 0 just to reasure me
    lcd.setCursor(8, 3);
    lcd.print(dog);

    heat = digitalRead(ledpin);   // prints to lcd state of heater
    if (heat=0){                  // may refine to show how much on
      lcd.setCursor(12,3);        // little-- medium-- full
      lcd.print("Heat ON");
    }
    else{
      lcd.setCursor(12,3);
      lcd.print("Heat OFF");
    }


    if(one.isPressed()){          // may remove this from loop as not needed.
      Up();
      Serial.print("button1");
    }
    else if(two.isPressed()){
      Down();
      Serial.print("button2");
    }
  }

  // __________________________________________________________________

   Serial.println("Out ");
   delay(500);
   digitalWrite(ledpin,LOW);     // RIMS tube is full good to go
   lcd.setCursor(12,3);
   lcd.print("Heat OFF");
   
  set=Setpoint;
  Input = tempC;                      // Asign TempC to PID input
  hltPID.Compute();                    // PID do its stuff
  analogWrite(heaterpin,Output);       // Adjust the output

    if(one.isPressed()){
    Up();
    Serial.print("button1");
  }
  else if(two.isPressed()){
    Down();
    Serial.print("button2");
  }
} // End


9  Using Arduino / General Electronics / How to stop PID controller flickering my room lights on: November 19, 2012, 11:26:40 pm
Hi I am building an electric brewery to make the best beer in the world in my shed. I have a dedicated 32amp 240v board to the shed for the purpose. I have a 3500 Watt element in a RIMS tube the PID controller ajusts the heat by PWM the load to the element, connected to a 20amp breaker.
When it does so the florescent lights in the room which are on the 10amp lighting breaker flicker constantly.

Question is can I add a smoothing Capacitor to the lighting circuit. What size and how.  But the most important question is that will it work?
10  Using Arduino / Project Guidance / Re: PC Can not upload to Barebones with FDTI breakout board on: November 19, 2012, 05:45:47 pm
I have built at least 3 different standalones one on a breadboard from http://oomlout.com/BBAC/BBAC-Assembly-Guide.pdf
and the last one is a PCB but I do not know how to include the circuit diagram here from a text doc.

The boards all work perfect if I use the Arduino - 328P chip as the interface, so how does the arduino FDTI circuit time the reset differnt from the breakout boards?

The 328's all come bootloaded

By external clock are you refering to the crystal and cap setup if so yes if something else then no.

Should I have the RX pulldown resister?
11  Using Arduino / Programming Questions / Re: how to escape from while control structure on: November 19, 2012, 05:26:30 pm
After dc42's help the sketch behaved well. Then out of no where when installing the electronics into the brewery the sketch exited the loop and would not re-enter.
I debuged it by getting  serial.print the state of the analog pins A0 and A1 at every step through the sketch. They start out HIGH ie. 1
The state of the analog pins changed from HIGH as set by INPUT_PULLUP to LOW at the end of the set up as the sketch entered the Loop no line of instruction was present at that point.
The last line of setup was serial.print A0 and A1 both were 1
the first line after void loop (void){   was  serial.print A0 and A1 both were 0

How can this happen?
12  Using Arduino / Project Guidance / Re: PC Can not upload to Barebones with FDTI breakout board on: November 19, 2012, 04:49:59 am
Be80Be
that is a good link the FDTI friend is the same as I have from Adafruit but I still get the same errors which ever way round I put the RX TX . when ever I press the damn reset. It is driving me mad it should be so so simple. five wires. And they work perfectly when pushed into a chip less arduino board.
13  Using Arduino / Project Guidance / Re: PC Can not upload to Barebones with FDTI breakout board on: November 19, 2012, 04:40:20 am
I have read the reset pressing stuff and tried pressing it as described but no help. Also both the sparkfun and adafruit fdti breakout boards boast that they now have DTR instead of reset which does the timing for you.
Kamerat-
You lost me with your discrption of RX on adapter to TX(pin3) on 328P ?? are you saying that RX from the FDTI connects to TX on the 328P
the circuit diagrams for the barebones  just bring RX to RX and TX to TX .  RX has the 10K resister.
14  Using Arduino / Project Guidance / PC Can not upload to Barebones with FDTI breakout board on: November 15, 2012, 04:05:15 pm
Hi
I have build breadboard, vero board and now purchased PCB barebones Adruino clones to use in standalone projects. I upload sketches by chip swapping or taking the chip out of the UNO and using that. Bulky and not very safe with all those jumpers.
So way back I bought a Sparkfun FDTI breakout. The 6 pins +ve, -ve, Rts , Rx and Tx   with CTS not used but when I try to upload I get the useful error  
avrdude: stk500_getsync(): not in sync: resp=0x00

The board in tools is still UNO
The port is recognised (it is a different port to the UNO's port) and selected.
When I do the loop back test it is fine am I right in thinking the loop back is testing the fdti communication?

I have even been convinced by my supplier (electronics not ..) to buy another fdti breakout this time a Adafruit which installs and is assigned a different Port but still returns the same error.
The boards upload when using the uno - chip so they work.

Any other thoughts would be appreciated I have had the problem for a year and have read a lot of posts around the subject but never found anyone with the same problem. I keep putting it on the back burner but would like it solved just so I know if nothing else.

Thanks for reading.
Max


15  Using Arduino / Programming Questions / Re: how to escape from while control structure on: November 13, 2012, 04:56:06 am
Sorry Paul didn't mean to be rude and not reply to your comment.
Yes my didgital pins are almost being used and I was interested in being able to use the analog pins as digital INPUT pins.
I have previously connected an LCD using just the analog pins set to digital OUTPUT which was useful for that particular project.

The code is always responsive in that it read the change just gets stuck looping in while even when showing 0's.
Pages: [1] 2 3