LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Mega - 5003 error

There's weird stuff going on because believe it or not, the 10 seconds timeout is the only solution that never worked for me...

Fingers crossed for LIFA 2.0, but I hate to not know what is wrong so far.

GCentral ChampionCLA
0 Kudos
Message 11 of 16
(1,220 Views)

Normandinf,

What is even more strange, and incredibly frustrating is that I cannot recreate this issue here.  The default unmodified version of the firmware works for me on every board that I've tested it on. (20+ Unos, 2-3 Megas, 2 protosnaps, 2+ Duemilanoves ...)

This leads me to beleive that it is some strange combination of PC hardware or OS and Arduino Board Rev.  We'll see how the couple fixes we include affect the overall LIFA population.

-Sam K

LIFA Developer

0 Kudos
Message 12 of 16
(1,220 Views)

Well I redownloaded the latest LIFA (v1.3 I believe), and did my little edit on the initialization part to remove the flow control.  I still have the issue with I2C losing and shifting a byte. 

I have the Mega 2560 R2 board.  I experience the problem on 2 PCs, both running Windows 7 64-bit with SP1, and using LabVIEW 2011 Student Edition. 

The two PCs I have are:

1) Home built

  • Core i7 870 Quad Core, 2.93GHz
  • 8GB DDR3 1600 RAM
  • ATI Radeon HD 5770
  • MSI Motherboard

2) Mid 2010 17" MacBook Pro

  • Core i5 Dual Core, 2.53GHz
  • 8GB DDR3 1066 RAM
  • nVidia Geforce 330M

Computer speed is not an issue at all.  I'm going to try to poll an analog signal for a while to see what happens.  It appears to be more of an I2C problem for me than anything else. 

0 Kudos
Message 13 of 16
(1,220 Views)

@Ryan and Sammy

I still think it has something to do with the Mega. I also have a Uno wich never caused any problems so if it is PC or OS related it would have problems to. But then again, i have seen stranger problems then that. Weirdly enough i also have Windows7 64bit.

  • Core i5 2500K @ 4500Ghz
  • 8 GB DDR3 1600 RAM
  • Asus P67Pro
  • Nvidia Gti560 x2 (SLI)

In the end the system is going to run on a XP OS from ZBox. Maybe then i won't have any problems. But it's a little early to say that. As for LIFA 2.0. I hope it will solve the problems but we will wait and see.

As for the 10second rule. It still works for me. However the first run is always weird. It will never init the digital IO and have to re-run the program to get it to work. This could be some wrong programming on my side but i have to look into that.

@Ben

Sure i give some background to it.

It is a home project and i'm already running a simmilair setup at this moment.

http://foto.krillins.com/fase2/upd1.jpg

I have 2 display paludariums in my livingroom. With in the top one two chinese waterdragons and in the bottem poison dart frogs. Below the lower paludarium i have a small computer running XP and a 12Bit NI DA card. This program can be controlled with a touchscreen on the side. The program controlles the climate of both paludariums. measuring the temperature( and do actions if temperature is to high/low) and creating sunrise/sunset/storm (lightning). While running these modes it will play sounds, so during sunrise it will play a background of birds chirping and during a storm it will play a thunderstorm approaching. Also during the storm it will turn on a mist spray system to create an idea of raining. The storm will run two times at a random interval.

Because the DA card only has two analog outputs the sunrise/sunset is done with normal lightbulbs and a dimmer (0-10V). two red and one halogen 150Watt white. will create a red to white effect. The lower paludarium only has one red and one white. The storm effect is done with four 60Watt lightbulbs (two for each palu). The effect is created by switching the lamps on for a few mseconds.

thunderstorm

sunrise

See youtube video's for the effect.

The problem i had was that the sunrise/sunset is missing a "flow" turning red to blue to white. Also when switching on the mainlight will turn down the effect. For the thunderstorm how nice it looks now the problem i have with it is the fact that the light is a little to "yellow" for my likings. So to improve these things i intentionally wanted to create an add-on for the current system wich only do the lights. But during the build i decided to do everything with the arduino so that i could measure the humidity to. Also the old program was very rude (no configfiles).

For RGB light i could use "normal" lightstrips  but the problem with that is that is that there penetration to the bottem of the high palu is very low. So i wanted to use high power RGBW leds to create the sunrise/sunset effect in combination with some normal white high power leds for daylight. I bought 8 high power led drivers (700ma).

  • 1x Red
  • 1x Green
  • 1x Blue
  • 2x white
  • 1 spare
  • 2x for lightning

These high power leds get quite warm (RGBW is 10 Watt) so the need to be actively cooled with a fan. But to reduce noise from these fans they needed to be controlled. So i added 3x 12Volt PWM outputs to the hardware. Also for the 3x temperature/humidity (1x spare) i needed a 5V external supply.

http://foto.krillins.com/arduino/kast10.jpg

http://foto.krillins.com/arduino/totaalschema.jpg

An overview

http://foto.krillins.com/arduino/led0.jpg

Active cooled high power setup

http://foto.krillins.com/arduino/led1.jpg

now included with an 10Watt high power led

http://foto.krillins.com/arduino/kast7.jpg

Temperature/Humidity sensor

As for now the hardware is nearly build. But still need to make 11 high power led modules like above. Before i do that i need to make the software work, and that will take a lot of effort because i'm almost completly rewriting the old code.

0 Kudos
Message 14 of 16
(1,220 Views)

I can honestly say that I've never wanted a terrarium....until now.

Amazing work!

-Sam K

LIFA Developer

0 Kudos
Message 15 of 16
(1,220 Views)

Sorry i didn't respond any sooner but i was real busy working on the hardware and software.

I found out what the problem was eventually. The problem resided in my usb port. I changed the connection to another port and the problem resolved. Probably the usb port was not completly stable anymore.

The program is finshed and the mainscreen looks like this

http://foto.krillins.com/arduino/terra.jpg

Also i'm almost done with the hardware. Wiring 14 Ledholders and 30 cables was a daunting task. But with some background music it's fun to do .

With the hardware almost done i made some video's yesterday. The first one show a modified "light show example.vi" wich can support 8 channels. The second one is a thunderstorm simulation where the daylight leds will dim to 6% and a blue led will rise to 3% to give it an earie feeling to it. On the center-bottem is a normal light wich will represend the rainmachine.

There is a question left though. I have bought an Pressure sensor from sparkfun http://www.sparkfun.com/products/9694 wich can read Relative pressure and temperature wich i want to place inside the 19"rack the pressure is nice for monitoring. The temperature could be used to monitor the temperature inside the 19"rack and could shut down some components if the rack gets to warm.

Only i have no idea where to start. I have never programmed i2C (i know the principle behind it).

I guess it should like something like this

http://foto.krillins.com/arduino/labview.jpg

But when i look at the arduino code wich looks something like this

http://foto.krillins.com/arduino/spark.jpg

Then i have no idea where to start. Can sombody give me a clue what to do, if i can read the first sample i could work it out from there.

0 Kudos
Message 16 of 16
(1,220 Views)