Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver on: July 04, 2014, 08:50:12 am
Hi there,
I'm having some troubles using the testCarrier and testRPD functions.

In the scanner example, the testCarrier function is used and the data rate is left at default (1 MBPS). It picks up more or less constant chatter on some frequencies as expected.
If I change the data rate to 250 KBPS, nothing is detected, even though I have another nRF24L01+ next to me sending at 250 KBPS constantly.

The getting started example works fine, both with 250 KBPS as with 1MBPS.

Any ideas?
I really need the low Data Rate for range and the RPD for adaptive frequency hopping.

Thanks,
Robert
2  Using Arduino / Installation & Troubleshooting / What did I do wrong to get "avrdude: stk500_getsync(): not in sync: resp=0x00"? on: January 23, 2014, 02:49:22 am
Hi all,

to make it clear from the beginning, I do not need assistance in resolving this error and read up on the troubleshooting guides and tests. I rather would like to know your ideas on what actually caused this to avoid it in the future.

Here's the current state:
  • Device is an Arduino Uno R2, connected to a PC with Windows 7 x64 via USB
  • Arduino does not boot. LED on Pin 13 does not blink -> No bootloader or defective atmega
  • Device is recognized by PC on USB port and loopback test works fine

As far as these tests show, the board should be fine and can communicate with PC but the atmega is defective or missing a bootloader. Did I get that right so far?

Now what I did was the following:
I had Arduino running on 12 V external supply. I needed to change the sketch and upload again, so I connected the USB cable WHILE the 12 V external supply was running. As the Arduino should automatically switch USB power supply off when external supply is connected, I assumed that the device would just reboot and, running on external power, enable serial communication. It did reboot, but never came up again.

Before this, I was able to upload a sketch without problems.

Now why did I do this in the first place:
Following the adafruit tutorial to connect a RGB5050 LED strip to arduino, I connected a NTD18N06LT4G N-Channel, Logic Level MOSFET to my board, Source to GND, Gate to PIN11 (PWM) and Drain to the Blue Channel of the LED strip.
The 12V+ channel of the led strip was connected to Vin on Arduino.
See wiring: http://learn.adafruit.com/assets/2692

I uploaded the source code successfully to set PWM of PIN11 gradually from 0 to 255 and back to 0.
I disconnected the Arduino from USB and plugged in external 12V supply, rated 6 A. Sure enough, the strip lit up blue, but did not oscillate. I suspected that I should slow down the cycles and wanted to debug via USB port while external power is supplied, leading to this situation.

So what are your guesses? Is my arduino salvageable with a new bootloader? Did the IC go bye-bye? Was it because I had external power and USB at the same time? Or is my circuit bad?

Thanks for your thoughts...

Robert
3  Using Arduino / Networking, Protocols, and Devices / Re: OneWire issues with DS18S20 on: December 04, 2012, 09:54:27 am
Thanks for the hints, at least i knew that there was nothing wrong per sé with the OneWire interaction.
I removed all the extra stuff and started implementing it again bit by bit and found something:
You can see the "output" function that I thought would be perfect to set the cursor and write the LCD lines in order to not write lcd.clear(), lcd.setCursor(), lcd.print() over and over again.
That lead to the mania of putting the whole LCD lines together by adding strings ...

and the string adding is responsible for the lockups.
Code:
  lcd.setCursor(0,0);
  lcd.print(fstr("P" + String(probeselected+1),LEFT,2));
  lcd.print(fstr(ffloat(temp[probeselected]),RIGHT,5));
  lcd.print(fstr(ffloat(average),RIGHT,5));
 
works, while
Code:
  lcd.setCursor(0,0);
  lcd.print(fstr("P" + String(probeselected+1),LEFT,2)
        + fstr(ffloat(temp[probeselected]),RIGHT,5)
        + fstr(ffloat(average),RIGHT,5));
 
does not smiley-sad

So I'll be more careful with my strings. Problem is that I have a pretty elaborate menu navigation

Regards,
Robert
4  Using Arduino / Networking, Protocols, and Devices / OneWire issues with DS18S20 on: November 30, 2012, 10:34:02 am
I am having serious issues with my code when trying to access the DS18S20 probes.
Once I think I got it and get proper readouts, I start changing the next thing and suddenly my sketch freezes after getting the first temperature.
So I think "well, I coded something wrong", but when I comment out the call to the method that is reading the OneWire bus, everything runs smoothly. So I would appreciate if someone would have a look at what is happening in this method:

First of all, the following method scans for probes on the bus and saves their address into a 2-dimensional array probes[][]

Code:
void scanAllProbes()
{  
  probespresent = 0;
  ds.reset_search();
  while(probespresent < 8 && ds.search(addr))
  {
    if ( addr[0] != 0x10 && addr[0] != 0x28 )
    {
      output("Unknown","probe");
    }
    else
    {
      String address = "";
      for(int i = 0; i < 8; i++)
      {    
        probes[probespresent][i] = addr[i];
        address += String(addr[i],HEX);
      }
      output("Found probe:", address);      
      probespresent++;
    }
    delay(1000);
  }   
  //probespresent now contains the number of probes connected  
}

Code:
void getTemperature()
{  
  if(lastRequestTimestamp == 0) //no request done yet
  {
    for(int i = 0; i < probespresent; i++)
    {
      ds.reset();
      ds.select(probes[i]);
      ds.write(0x44,1); // start conversion, with parasite power on at the end
      temp[i] = 0;
    }
    lastRequestTimestamp = millis();
    return;
  }
  
  //check if last temperature request was over 5 sec ago
  if( (millis() - lastRequestTimestamp) >= 5000 )
  {
    //now data should be present for each probe
    average = 0;  
    for(int i = 0; i < probespresent; i++)
    {      
      byte data[12];
      ds.reset();
      //select each connected probe
      ds.select(probes[i]);
      ds.write(0xBE);
      for(int j = 0; j < 9; j++)
      {
        data[j] = ds.read();
      }
      byte MSB = data[1];
      byte LSB = data[0];
  
      temp[i] = ((MSB << 8) | LSB) / 16; //using two's compliment      
      average += temp[i];
      
    }
    average = average / max(probespresent,1);    
    
    //now make another request    
    for(int i = 0; i < probespresent; i++)
    {
      ds.reset();
      ds.select(probes[i]);
      ds.write(0x44,1); // start conversion, with parasite power on at the end
    }
    //set the timestamp to current time
    lastRequestTimestamp = millis();
  }        
}

The getTemperature-Method is executed on each iteration of loop() and places a request. On consecutives runs, no further action is taken until 5 seconds have passed since the last request, then it tries to retrieve the values from the scratchpad, save them into an array and calculate the average temperature. After that, a new request is placed and the timestamp saved.

I cannot see any problem with that, but if I output the temperature after each run of getTemperature, I get
1st run Probe 1: 0, Probe 2: 0, average 0
2nd run Probe 1: 24, Probe 2: 0, average 12 and the program freezes.
So it is actually not getting/writing the temperature from the second probe but goes on outputting the value
Then somewhere in the 3rd run it is freezing...

Any ideas about what's going wrong here?
5  Using Arduino / Motors, Mechanics, and Power / Re: Relay driver questions on: November 03, 2011, 09:49:01 am
It's not a hot plate, it's an induction cooker. That's why I'm worried about the induced current when the coil turns itself off.
Basically the cooker has the power selector (1200, 2500 and 3500 W) and you just plug it in and it gets to work.

Other users have used a commercial brewing controller(that's what it's gonna be used for) which cost some good money and it didn't work because of solid state relays, that's why it threw me off this idea.

But mind me, the judgement that it didn't work because of the SSRs came from a home brewer and not an electronics experts. And myself being a starter as well, maybe I'm completely off the track...

EDIT: Did you mean something like this?: http://www.crydom.com/en/Products/Catalog/p_f.pdf (PF380D25) Although it requires air cooling...
6  Using Arduino / Motors, Mechanics, and Power / Relay driver questions on: November 03, 2011, 07:58:37 am
Hi there,

I am trying to control a cooking plate with the arduino. A PT100 should provide the logic with the temperature signal and the arduino should switch a relay on/off to maintain the temperature.

As the cooking plate can consume up to 3500 W, the relay is going to be a fat one. Being an inductive load, I have read from several sources that I need to be extra careful with the load when switching the relay off, as it may deep-fry the logic components.

The basic schematics would be that illustrated in the picture



In this image (on the right), a MOSFET is switched by the Digital Out to close the relay.
The IRFZ34NPbF I chose has 29A drain current (cont.), a Gate Voltage of 2-4V and 16A avalanche current.
The diode MBR745PBF has a forward current of 7.5A and a surge current of 690A.

What do I have to do more in order to protect the logic circuits from the inductive loads? Which kind of array should I take?

Thanks for your help!
7  Using Arduino / Project Guidance / Transferring CMOS Camera image to handheld device on: October 25, 2011, 03:55:17 am
Hello,

I've been reading lots of posts of users who wanted to process an image from a CMOS camera module in arduino and it seems that speed is a limiting factor.
For my project I need a video from my robots camera with a decent framerate on the handheld remote control. As my robot is under water,  the video signal has to be brought to surface via cable.

I am planning for the use of two arduinos, one in the robot and one on a buoy which are communicating via cable. The buoy has a WiFi module attached so that I can connect a laptop or another wifi-enabled device and send commands to the robot and receive the image from the camera.

If i get a camera module from which I can read a JPEG image in QVGA resolution, how would you estimate the maximum possible framerate to receive via WiFi?
I imagine as the compression is done by the camera, there will be no problem with the avr's speed, more with the bus speed.

If this is not possible, the only other chance I have is to drop the WiFi part and the buoy and control the robot directly via cable. With this, I can send back an analog video signal directly from the camera to a GLCD in the remote.

By the way, using an S-FTP ethernet cable, can I count with the same cable lengths as specified in the Cat.5e standard?

Thanks for your comments

Robert
8  Using Arduino / Project Guidance / General understanding of Shields on: October 06, 2011, 02:20:23 pm
Hello,
I hope I'm writing this in the correct forum as this is a question about project planning but also about multiplexing ...
Let's see, from what I've seen in the shops, there are a lots of shields as pre-made extensions like SD card readers, LCDs, communications panels etc.
All of them plug into the digital and analog pins and seem extendable, meaning that I can plug the SD card reader into the mainboard and plug the LCD on top.

How can I handle this myself?
I would need a board to control my relays and to connect my external sensors on top of my arduino one and on top of that the SD card reader and on top of that the LCD.

But does that mean that my selfmade shield needs some kind of multiplexer in order to distinguish between digital signals for the relays and signals for the LCD or is it just not possible to use the same pins as the LCD shield on top?

Thanks for your clarifications and if you have a tutorial on design principles for a new shield, I wouldn't look away (I'm somehow missing this information here)

Robert
Pages: [1]