Show Posts
Pages: [1] 2 3 ... 30
1  Using Arduino / Sensors / Re: Problem with an array of soil moisture sensors on: Today at 10:17:52 am
Thanks,

As i sayd, I changed the sensors, and the problem remains only in same device, independtly of which sensor is connected to it.
And i checed the wiring and it is correct.

As i said, the arduino is not a problem, because it only  powers the devices, but i am not checing any code. I sayd the devices are independat or arduino or any other microcontroler to work, it justonly need power.

This is way i am coming crazy with this problem.
Thanks
2  Using Arduino / Sensors / Re: Problem with an array of soil moisture sensors on: July 30, 2014, 05:56:49 pm
This is a quick diagram of how it is wired:
https://www.dropbox.com/s/bipnak3n31ac5rp/SensorsArray-wiring.jpg

The device with problems is sensor 3 in the diagram, (sensor 1 in the pictures of the real world)
 
3  Using Arduino / Sensors / Re: Problem with an array of soil moisture sensors on: July 30, 2014, 05:34:07 pm
Okay, these are the pictures from the entire device, the up and down sides of the breadboard..
https://www.dropbox.com/s/i4z9ifnbh5aclqs/SensorsArray.zip  10Mb!

I will prepare something like a wiring diagram with powerpoint in some minutes..
4  Using Arduino / Sensors / Problem with an array of soil moisture sensors on: July 30, 2014, 04:52:32 pm
hi all!

I have four of this soil moisture sensors:
http://www.dx.com/p/soil-humidity-moisture-detection-sensor-module-blue-black-white-200142#.U9lkrfkhCbg
Individually they work perfect. However, i wired all of them to the arduino board to have readings from different points of the garden.

I have a peace of breadboard with the electronics connected ones near the others, connected to the sensors. Then, a 6-wires cable send the power and signal to the arduino.
This cable only use one 5v and one GND wires to power the four sensors. At the breadboard, all the 5V pins are wired together, and the GND too. But each out signal from the devices goes to a different signal wire in the cable.

The problem i detected is that the third sensor in the array does not returns "high" when iput it into water (for test purposes), EXCEPT is any of the others sensors also shows a "high". I don´t know if you see what i mean. If i put only sensor 1 into the water, the ligh of the board turn on. If i repeat this action for the other sensors, one by one, all of them works well except the third in the array. If i repeat the experiment but with two sensors inthe water each time, the third sensors also returns "high" when i put it into the water together with any other sensor...

I checked the wiring and the sensors (changing the sensor from one board to the other), and i have the same behavior.

There is not a code problem, because the board of the sensor works independently of arduino or any other device.

Do you imagine what could be the problem?
Thanks!

P.D. I am out of home and i am not hable to post a picture of the wiring, buti think i explained correctly
5  Using Arduino / Sensors / Re: Arduino Mega 2560 and Interrupts on 53,15,14,10 on: July 11, 2014, 11:33:22 am
I tested in arduino mega 2560 and it works!
However, take care if you need to ise Software Serial library because then you could have problems and library modifications could be required.
6  Using Arduino / Programming Questions / Re: Is it compatible Attachinterrupt and PinChangeInt library? on: June 25, 2014, 06:21:09 am
Thanks @PaulS (one more time) for your time and patience.
Cheers,
7  Using Arduino / Programming Questions / Re: Is it compatible Attachinterrupt and PinChangeInt library? on: June 25, 2014, 05:50:47 am
Thanks for your patience @PaulS

Yes, you are right. However, I am talking about to "disable" because this is what the library say:
Quote
// #define NO_PORTB_PINCHANGES // to indicate that port b will not be used for pin change interrupts
// #define NO_PORTC_PINCHANGES // to indicate that port c will not be used for pin change interrupts
// #define NO_PORTD_PINCHANGES // to indicate that port d will not be used for pin change interrupts
The author say that in order to save some bytes, you could "disable" in some way some of the ports you will not use. Of course, I understand that this doesn´t "remove or delete" the normal working of the port, but do not care about any interrupt in any of the pins of this port. (sorry, i see that disable is not the correct word but english in not my mother language and my english vocabulary is not rich enough).

This is why i am asking about to "disable" one of the ports (for example this one containing the pins 0 to 7), but still use the pins 2 or 3 for the sensor i asked about, or an alarm from an rtc or whatever, by the use of normal external interrupts.

Quote
It depends on how long you take to determine which pin changed, and what the change was. Pin change interrupt handling is not as fast as external interrupt handling because there are for more of them because they are less discriminatory.
Ok, this is why i want to use the normal external interrupts to measure frequency on a normal external interrupt, but at the same time to activate other interrupts by the use of pin change because i would like conect other kind of pushbuttons to trigger interrupts as well as sensors with a really smaller frequency what i think could not be a problem by the use of this other interrupts.

This is why i am talking about to "disable" the ping change interrupt in the port containing pins 2 and 3, but enabling it in the other ports to have more than only 2 interrupts to connect more things to the board.

Then, if i understand correctly, i do not need to take care. I could use normal AttachInterrupt() on pins 2 and 3, and to enable PinChangeInterrupt in other pins (previously defined) of the other ports. Am i right?

EDITED:
I just saw this in the webpage of the PinChangeInt Library:
Quote
Remember: When you define that a port has no pin changes, you can not attach an interrupt to that port. Attempting to do so will make things a little... weird...
8  Using Arduino / Programming Questions / Re: Is it compatible Attachinterrupt and PinChangeInt library? on: June 25, 2014, 04:04:56 am
Ok, i think i got it.

Then, in summary:
  • If i enable a port which includes an normal external interrupt pin,  but i do not define it by the use of PinChangeInt library, it will be ignored by this library, but it will work as expected if i define it like a normal interrupt
  • if i disable a port which includes a normal external interrupt pin, it will still can be used as a normal interrupt

BTW, could be those pin change interrupts be used to measure high frequency? for example for one of this sensors?
http://dronecolony.com/2008/11/13/arduino-and-the-taos-tsl230r-light-sensor-getting-started/ It says that it require an interrupt pin.

Thanks!
9  Using Arduino / Programming Questions / Re: Is it compatible Attachinterrupt and PinChangeInt library? on: June 25, 2014, 12:47:18 am
Thanks so much @PaulS!

So, nice! Then, i could dissable all the ports from PinChangeInt except the few i one to use, an at the same time allow to the normal interrupt pins to work as expected in spite they were disabled from PinChangeInt.

Thanks so much!

10  Using Arduino / Programming Questions / [Solved] Is it compatible Attachinterrupt and PinChangeInt library? on: June 24, 2014, 10:54:02 am
I have two question about this tpic:

1) I would like to know if it is compatible the use of normal external interrupts (to pins 2 and 3 in arduino uno board, and few others in arduino mega2560), and  pinchangeint library to create new interrupt pins different thank those?

I mean.. could i have someting like this (in pseudocode):
Quote
Add  PinchangeInt library
(...)
define PinchangeInt pin X
(...)
Setup{
attacchinterrupt(0, function1, HIGH);
PinChangeInt_interrupt(X, function2, HIGH);
}

Loop {
 wait for interrupt from both pins, digital 2 and X
}

(...)

2) If they are, what happen if i disable some of the ports in PinChangeInt library what i dont´want to use with this library affecting the normal interrupt pins (2 and 3 in arduino uno board, for example)? Will be then available the use of normal interrupts at that pins?

Thanks!
11  Using Arduino / Sensors / Re: Problem with 4n35 to power camera OV0706 on: June 16, 2014, 07:30:50 am
Thanks @Knut_ny and @Chris (in a PM)  for your comments.

Both of you propose a different solution by a mosfet and by a transistor.
I located this circuit for the use of a transistor:
http://www.petervis.com/GCSE_Design_and_Technology_Electronic_Products/Transistor_as_a_Switch/Transistor_as_a_Switch.html
and here is an example:
https://sslproxy.getsatisfaction.com/sslproxy/SWhAdDNLMG5zdGFuVGlWenmLbJDGd3CABhjZermgcystANA4T6nd0pzV0fSzBRRGOd17A4b8ZLwi6-HESbXI0ioHtegommXZmnCH_46CYdNlGA2hGPI_87VynGOpJQS729r0tss0_XnjdhAEq4nT9EfuF6Hx1UhP7YEwCWmzZuE=.png

and this one for the use of a mosfet as a switch:
http://www.electronics-tutorials.ws/transistor/tran_7.html

I will try both things.

Thanks guys!
12  Using Arduino / Sensors / Re: Problem with 4n35 to power camera OV0706 on: June 15, 2014, 02:39:03 pm
I have a couple of questions about how to follow...

I think i m not able to use a digital pin (as output) to power the camera because the pins in arduino are only able to manage 40 mA... am i right?

If not, i don´t know if i could use a transistor... which one? how?

And finally, should i better use a mosfet? Which one? IRF520,IRF530,IRF 540? Any other? I don´t know which one is the better for this case... use a digital pin to power the mosfet to complete the circuit of powering the camera with 5V from the board.

Thanks folks!

EDITED 1:
Ok, i know that an IRF510 or IRF520 is enough because they are able to manage 5.6A and 10A, more than enough for the camera and all the sensors i use. But which one (of these or any other) could be triggered with a digital pin of the board?

EDITED 2:
Or may be by the use of a transistor? may be BC547?
http://hardwarehackingmx.files.wordpress.com/2013/06/dc_motor.png
13  Using Arduino / Programming Questions / Re: I need more interrupt pins! How to? on: June 15, 2014, 09:08:11 am
Great! Thanks @Robin2 for this  idea...
14  Using Arduino / Programming Questions / Re: I need more interrupt pins! How to? on: June 15, 2014, 04:35:27 am
Hi @Robin2

Quote
If you want to use a button to wake up the Arduino then just dedicate one button for that.
This is exactly what i have on mind

Quote
If you want to use the RTC to make the Arduino every hour then the same pin that is used for the button wake-up could be used for that. I can't think of any other reason to use an RTC interrupt. Once the Arduino is awake it can read the time whenever it wishes.
Exactly what i have on mind. Arduino is sleeping, at the selected time it awake the arduino what reads the time, reads the sensors, save the data, made decissions about if to start or not the irrigation, and then go to sleep again until the next time or an awake from the user

Quote
I guess my question about the flow meter wasn's as clear as I thought.
No, i am sure you were clear.... the problem is english is not my native language and sometimes my understanding is not complete. Now i see what you mean...

At this stage i don´t know how constant is the flow... But, such as a working hypothesis i will think that yes, it is a constant flow. Then, you are completely right, i don´t need to measure the flow continuosly... may be once per irrigation to ensure the flow is the same, and made the calculations based on time....  Just only one question,how could this affect to the interrupt pins? FOr this kind of cases, could i use a different procedure?

Thanks so much for your patience!

15  Using Arduino / Programming Questions / Re: I need more interrupt pins! How to? on: June 14, 2014, 05:32:40 pm
Thanks @Robin2,

Yes, the anemometer is not working perfectly in an arduino uno by the use of interrupts. However, the new version of the device will include more sensors, such as i already explained, and here is where my problem began.

Quote
Buttons certainly don't need interrupts.
Sure, but what about when the arduino is sleeping? The board could be only waked up by inner or external interrupts. So, AFAIK, the button need an interrupt if you do not want to way up the board every few seconds to check it the button is high or low. I repeat that AFAIK... and i am a noob, so, if you know how to do it in other way, i am ready to learn!! So, culd you point to me toward where to read and learn about what you propose?

Quote
What is the alarm from the RTC?
Some RTC have the option to produce and square wave out, and few others trigger an interrupt when the time of the RTC reach a selected time, or date or every X minutes or seconds, or hours.... Then, if you program the RTC to produce an interrupt... you could send the board to sleep without take care about the time because the RTC will send the interrupt to a pin of the board what was configured to "listen" the RTC.

Quote
What sort of water flow meter have you? How many litres per minute? How accurate do you need to be?
One similar to this: http://www.dx.com/p/saier-ssr-3-environmental-pom-g1-4-water-flow-sensor-white-298822#.U5zNAPkhCbg
The limit could be about 3 l/min,and its minimum flow what it is able to measure is 0.1 l/min  However, this is only for testing purposes in this new versios of the device. When i will have everything ready i will change to better sensors for realistic environments.

Thanks!
Pages: [1] 2 3 ... 30