Show Posts
Pages: [1] 2 3 ... 36
1  Development / Other Software Development / Re: Arduino on Xcode Project — Official Thread on: September 21, 2014, 07:36:34 pm
Please refer to the solution Update Project on the help portal.
That worked.  Thanks.  I'm not looking forward to doing the manual update to all my projects smiley-sad
2  Development / Other Software Development / Re: Arduino on Xcode Project — Official Thread on: September 21, 2014, 05:40:28 pm
Last night Xcode upgraded to 6.0.0 and now, there is no Embedded code compiled at all!
Nothing compiled!

The error message is : "ERROR   Xcode 4.6.3 required, 6.0.0 installed"
Which is interesting, on my computer there was never ever Xcode 4.6.3, but Xcode 5.something...
I'm getting the same error.  I have Mavericks 10.9.5 with xcode 6.0.1 and embedxcode+ v201. 
3  Using Arduino / Sensors / Re: Swimming Pool Water Level Sensor on: September 14, 2014, 11:44:07 pm
What sort of wireless range do these panstamp gadgets have ?
I haven't tested the limits, but I have several of them in use.  The pair for the water level sensor are about 30 feet apart.  I have some others that are on the 2nd floor of my house and they communicate with a panstamp in the basement.  They seem to be fine if you have them around the house or yard.
4  Using Arduino / Sensors / Re: Swimming Pool Water Level Sensor on: September 14, 2014, 11:39:17 pm
I have the pump running during the day and I need to measure the water level while the pump is running.  If the water level start to drop, then air gets in the pump and the pressure drops.
5  Using Arduino / Networking, Protocols, and Devices / Re: Change SS pin on Ethernet Shield on: September 14, 2014, 09:24:29 pm
Thanks Scott. Do you mean the new SS pin (D8), or the default SS pin (D10) must be set to OUTPUT?

edit: You should not have to set the default SS to OUTPUT and HIGH. That is done when the Ethernet.begin() function calls W5100.init(), which calls SPI.begin(). The SPI.begin() function sets the default SS pin to OUTPUT and HIGH.

You must mean the new slave select pin. The files I posted earlier are missing that update. My newer updated code does that for you. I attached the new files to this post just to insure all my recent changes are included.

For anyone else wanting to try this, insure you rename your original w5100.h, w5100.cpp, Ethernet.h, and Ethernet.cpp files before overwriting them with these. That way if all goes wrong, you have your old code to fall back on.

I meant the new SS pin (like D8) should be set to OUTPUT.  I didn't set it HIGH or LOW, just made it an output.  Thanks for attaching the latest update.
6  Using Arduino / Sensors / Re: Swimming Pool Water Level Sensor on: September 14, 2014, 04:22:07 pm
Hello ScottG

Seems like you found an elegant solution to a problem I would like to solve. One year into it, how has your solution performed? Did you get reliable readings? How often did you end up having to change the battery?

It works great.  It's very reliable.  I think one battery will last all summer.  The battery I'm using now was installed May 28, so it's been almost 2 months.  You can see the battery voltage over time on Xively (it's channel 15).  I've got all the code on GitHub.


Finally had to change the battery. It was down to 2.4 volts - sensor was still working at the lower voltage.  But once these lithium batteries start to go, the voltage falls off pretty quick.  It lasted 109 days.
7  Using Arduino / Networking, Protocols, and Devices / Re: Change SS pin on Ethernet Shield on: September 14, 2014, 03:42:48 pm
I figured out why the static IP wasn't working.  Above the Ethernet.select() statement, I need to use pinMode() to define the SS pin as an output.   If I don't do that, DHCP works, but static doesn't.  Also, if the pin happens to be the standard SS pin (53 for the mega), then I don't need pinMode().
8  Using Arduino / Networking, Protocols, and Devices / Re: Change SS pin on Ethernet Shield on: September 14, 2014, 01:22:08 pm
Hmm.  I guess I'll have to do some more tinkering.  Which model Arduino are you using?
9  Using Arduino / Networking, Protocols, and Devices / Re: Change SS pin on Ethernet Shield on: September 14, 2014, 01:11:12 pm
The Ethernet shield is not stacked on the Arduino, I'm using jumpers for everything.  I connecting D9 on the Arduino to D10 on the Ethernet shield.  I'm also trying it with a WIZ811 module and for that I have a PCB I made.  On that  sketch I think I'm using D7 on the Arduino going to WIZ811 SS pin.
I've got the Ethernet.Select(9) statement before Ethernet.begin().
Everything works fine if I connect with DHCP, so I don't think I've got anything wired wrong or it wouldn't work at all.

 
10  Using Arduino / Networking, Protocols, and Devices / Re: Change SS pin on Ethernet Shield on: September 14, 2014, 10:55:36 am
Surfer Tim,
Using you modified library for slave select, I can't create an Ethernet connection using the static IP method, like this:
Code:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,216,40);
Ethernet.begin(mac, ip);

It works fine if I use DHCP method:
Code:
Ethernet.begin(mac);

The static method does work if my slave select pin is 10, but if it's something else, the sketch doesn't set the IP address.  Instead of the IP I'm trying to set, I get 255,255,255,255

A big advantage to static IP is it uses a lot less memory, so I'd like to get this working.  Any ideas on how to fix it?
11  Using Arduino / Project Guidance / Re: Detecting pressure fluctuations on: September 07, 2014, 06:43:38 am
To make oscillation detection more robust, you could choose a window of time to analyze the data points. Adjust the time interval to get the desired response ie 1 min, 5 min, 15 min etc. Within this interval, you could determine the Avg, Min and Max pressure. The spread (Max-Min) is your peak oscillation level including drift.

Now a trick to make it more responsive is to use a sliding window of time. For example, you  perform the calculations every 10 seconds based on the previous 5 minutes of data.

I've decided to do pretty much that.  I'm sampling the pressure every 10 seconds and calculating the max pressure.  Every 30 minutes I clear everything and start over.  If my samples > 10 and max pressure > 14 PSI, then I'll set my low pressure threshold counter to Max - 3.  Every time the pressure drops below this threshold I count it as an oscillation.  Once I get 20 oscillations, the Arduino will turn on a valve to add water to the pool. 
12  Using Arduino / Project Guidance / Detecting pressure fluctuations on: September 05, 2014, 04:41:49 pm
I have an Arduino controlling my swimming pool pump (code is on GitHub).  I'm monitoring pressure (and other stuff).  If the pool water level drops too low, the pump will suck some air and the pressure will oscillate. (see attached screenshot).  I'm looking for a better way to detect these oscillations.  Currently I have a simple counter that counts the times the pressure drops below 13 PSI.  But that's doesn't work very well because I might get a bunch of oscillations where the minimum pressure is above that.  I don't want to just raise the 13 PSI threshold to something like 16 PSI because when my pump filter is fresh, the normal pressure is lower.  For example, if I just cleaned the filter, the normal pressure might 16 PSI and if I get fluctuations they would drop down to the low teens.  But if the filter isn't clean, normal pressure would be around 20 and pressure fluctuations would drop down to mid teens.
I had two thoughts in mind for making my detection a bit more robust.  First, I could track the maximum pressure over time, perhaps thirty minutes or an hour, then set my minimum threshold based on that.  Maybe min_threshold = maxPSI - 5.  My other idea is to track standard deviation and if it gets to high, then trigger a pressure alarm. 
I'm just looking for some feedback and perhaps other approaches.
13  Using Arduino / Networking, Protocols, and Devices / Re: I2C bus running at 100kHz and 400kHz at same time? on: August 26, 2014, 08:04:49 am
I think you'll be safe with 400kHz, that's pretty slow by electronics/PCB standards.

______
Rob

Good to know.  Thanks.
14  Using Arduino / Networking, Protocols, and Devices / Re: I2C bus running at 100kHz and 400kHz at same time? on: August 26, 2014, 07:10:36 am
I think I'll leave it alone for now and let it use 400KHz.  At least now I know what's going on. 

It's my understanding that with higher bus rates, the PCB traces are more critical.  I have a PCB board getting made now where the I2C signals run across it to a few devices.  I did a little research on how to lay-out high speed signal traces, so hopefully I did a good job.  I'll see how well the PCB performs when I get it back in a couple weeks.
15  Using Arduino / Networking, Protocols, and Devices / Re: I2C bus running at 100kHz and 400kHz at same time? on: August 25, 2014, 11:15:13 pm
Check the library : https://github.com/adafruit/Adafruit_SSD1306/blob/master/Adafruit_SSD1306.cpp
Search for "400", the line where the TWBR register is changed. That is the I2C control register.
So the I2C is indeed temporary increased to 400kHz. And afterwards the original speed is set with : TWBR = twbrbackup;

I wonder why the library is doing that.  On line 509 there's the code
Code:
#ifndef __SAM3X8E__
    uint8_t twbrbackup = TWBR;
    TWBR = 12; // upgrade to 400KHz!
#endif

As a test I commented out TWBR = 12; and the bus stays at 100MHz now.  And the OLED display still works.
Pages: [1] 2 3 ... 36