Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

DIY cloud and rain sensor with ascom support?


Corpze

Recommended Posts

I'm not 100% up on what's going on in that i2cmaster library, but it looks to me like you're trying to use the soft I2C (which supports any Arduino pins.)  It probably requires the user to #define what pins the library will use and so throws a fit if that info. isn't found.

I think this is probably not the i2cmaster library you want to use, a successful compile here on Arduino 1.6.5 starts like this:

Using library OneWire in folder: C:\Users\Howard\Documents\Arduino\libraries\OneWire
Using library i2cmaster in folder: C:\Users\Howard\Documents\Arduino\libraries\i2cmaster (1.0.x format)
Using library SPI in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega -IC:\Users\Howard\Documents\Arduino\libraries\OneWire -IC:\Users\Howard\Documents\Arduino\libraries\i2cmaster -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI C:\Users\Howard\AppData\Local\Temp\build3967002890531707230.tmp\CloudSensorEvoPlus.cpp -o C:\Users\Howard\AppData\Local\Temp\build3967002890531707230.tmp\CloudSensorEvoPlus.cpp.o
 

Link to comment
Share on other sites

I've noticed that I forgot in the Read me, to add a 4,7kohm resistor between +5V and D10 to the DB18B20 temp probe, will fix that and also add more pictures of the mounted hardware as soon i get the new arduino and MLX90614 from china.
No need to add a new version of the read me yet, maybe remove the one that is on github now?

/Daniel

Link to comment
Share on other sites

  • 3 weeks later...

Hi Daniel,

I've uploaded the code but get the following errors:-

Arduino: 1.6.5 (Windows 7), Board: "Arduino Nano, ATmega328"

CloudSensorEvoPlus.ino: In function 'void init_MLX90614()':
CloudSensorEvoPlus:77: error: 'i2c_init' was not declared in this scope
CloudSensorEvoPlus.ino: In function 'void loop()':
CloudSensorEvoPlus:114: error: 'processCommands' was not declared in this scope
CloudSensorEvoPlus.ino: In function 'float read_MLX90614()':
CloudSensorEvoPlus:192: error: 'I2C_WRITE' was not declared in this scope
CloudSensorEvoPlus:192: error: 'i2c_start_wait' was not declared in this scope
CloudSensorEvoPlus:193: error: 'i2c_write' was not declared in this scope
CloudSensorEvoPlus:196: error: 'I2C_READ' was not declared in this scope
CloudSensorEvoPlus:196: error: 'i2c_rep_start' was not declared in this scope
CloudSensorEvoPlus:197: error: 'i2c_readAck' was not declared in this scope
CloudSensorEvoPlus:199: error: 'i2c_readNak' was not declared in this scope
CloudSensorEvoPlus:200: error: 'i2c_stop' was not declared in this scope
'i2c_init' was not declared in this scope

I can confirm the i2c folder is in the arduino library

Steve

Link to comment
Share on other sites

I have recieved my new bits from china and loaded it up with the newest code and command.ino, the arduino now recongnizes fine by windows, how ever, it isnt recognized by the driver.

It isnt responding to the commands in the serial monitor either (:IN# etc.)

Is there any changes in the last code or is there anything else wrong with the hardware?

This makes no sense

Have to try some more with other codes :-/

/Daniel

Link to comment
Share on other sites

Yes, thats a faulty link, should remove that from the original code.

Can't remember where i downloaded the ic2 library i use  :embarrassed: 

How ever, i have got it to work, i had mixed up the inputs for SDA and SCL for the MLX90614, the .ino is correct, the read me is not...
so, the right inputs are SCL to A5 and SDA to A4 

And also, don't forget the resistor to the db18b20, will update the read me when i have taken some pictures of the hookup/waterproof box, maybe will do it this weekend if i can find the time, big wedding coming up (not mine though)  :laugh:

/Daniel

Link to comment
Share on other sites

It is now mounted outside and working (so far) excellent, right now, there is nice weather outside with a bit of cumulus and the MLX sensor is reporting around 21 degrees ambient and 2 degrees at the clouds, and -6 degrees when the cloud has flown away. 

I have been taking some pictures (not very good ones) but they illustrate how i have mounted everything.

post-28724-0-88417200-1440945585.jpg

Here is the mlx sensor mounted in the lid, to the right, sealed with silicone glue.

Under the heater pad sits the rain sensor connectors.

The DB18B20 sensor is not shown but is hanging underneath the box.

post-28724-0-11750200-1440945587.jpg

Here you can see the sensors mounted in the lid of the box, and also the DB18B20 sensor underneath the box.

post-28724-0-54074200-1440945588.jpg

Mounted on the observatory with a slight angle for the rain to drain off.

post-28724-0-48930900-1440945589.png

Right now (during the day) in the driver setup dialog box

post-28724-0-52948600-1440945584.jpg

Link to comment
Share on other sites

Hi Daniel,


Sorted the ic2master issue now hit with this:-  :embarassed:  :embarassed:  :embarassed:



Arduino: 1.6.5 (Windows 7), Board: "Arduino Nano, ATmega328"


CloudSensorEvoPlus.ino: In function 'void loop()':

CloudSensorEvoPlus:114: error: 'processCommands' was not declared in this scope


Any help would be really appreciated to this arduino novice.


BTW your finished cloud sensor looks amazing and very professionally completed.


Steve

Edited by sloz1664
Link to comment
Share on other sites

Do you have the command.ino file in the same folder as the cloudsensorevoplus.ino?

When you compile the code and upload it to the arduino, you should see a tab in the arduino program with the command.ino code as well.

Link to comment
Share on other sites

Hi Daniel,

Sorted the arduino issue and have uploaded the programme and it shows the command tab.  :smiley:

Connected the Arduino nano and opened Maxpilote to setup properties, arduino nano set on 

com port 11.

post-12560-0-21310700-1441015288_thumb.p

Any ideas to why this should happen?

Sorry for being a pain........

Steve

Link to comment
Share on other sites

Hi Daniel,

Just a final check on the temp probe. Is it correct VCC to 5v, and probe D10 with a 4,7kohm resistor between 5V and D10.

I have read somewhere using the one wire setup both the vcc and ground are connected. Hence one wire.

Steve

Link to comment
Share on other sites

Yes thats correct, ground, 5v and d10, with 4,7kohm between d10 and 5v.

You can try each sensor individual with some code snatch from the internet as well, i did that yesterday, thats how i found my MLX was connected the wrong way.

Link to comment
Share on other sites

Hi Daniel,

Sorted the arduino issue and have uploaded the programme and it shows the command tab.  :smiley:

Connected the Arduino nano and opened Maxpilote to setup properties, arduino nano set on 

com port 11.

attachicon.gifError.png

Any ideas to why this should happen?

Sorry for being a pain........

Steve

You're not getting a connection to the Arduino nano, which is indicated by the "Error" status.  This can be caused by the serial port being inaccessible for some reason (in use elsewhere) or because the device didn't respond with the proper identification when asked.

You can verify that the firmware is alive and more or less functioning on the Nano by using the serial monitor button in the upper right corner of the Arduino environment.  Issue the :IP# command to see if it's there.  If it responds with "CloudSensorEvoPlus" you it should be able to connect and the nano will likely not be the cause of your problem here.  I'll keep an eye out here for a bit until you're (hopefully!) up and running.

Howard

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.