Show Posts
Pages: 1 ... 10 11 [12] 13 14
166  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to read a PWM value on an analog input ? on: August 05, 2008, 09:59:32 pm
Quote
However, the Arduino reference is +5V so you wont get the full range feeding a 3v3 PWM signal into it.
You can, of course, connect the AREF pin to a 3.3v reference (ideally from the PLC, but Diecimila and similar boards provide a local one) and set the Arduino to use the external analog reference.
167  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Write to pgmspace? on: July 23, 2008, 01:37:12 pm
While not perfect, microchip has an app-note somewhere on detecting power failure and writing out to eeprom before power is lost.
Basically, they insert a diode between the power supply and the uC then attach a large (0.05F IIRC) cap to the uC side. By monitoring the power supply voltage with a comparator, they then trigger an interrupt when the voltage drops below a threshold and rely on the cap to power the chip while it dumps to eeprom.

For the ATmega168, you need (on the outside) 3.6ms/byte for a write and consume about 12mA running at 16MHz with most peripherals on.

It's worth noting, I couldn't find specs on minumum eeprom write voltage or eeprom write current for the ATmega168. The revision history shows you shouldn't erase the eeprom below 2.7V, but it's not clear if this is also the limit for writing.
168  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Write to pgmspace? on: July 03, 2008, 09:17:02 am
It was up around 3.5 million writes, and then the power failed. It's been running continuously since I started, but the counts been reset a few times again. Quick math says it should be in the 6-millions after 7 days.
I think it's safe to say 100,000 was a very conservative test. I've been trying to think up a more comprehensive test, and then perform said test on both the EEPROM and flash, it would be nice to have solid data for both.
169  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Write to pgmspace? on: June 30, 2008, 12:57:54 am
Quote
OK for DB, tick# 2499998
OK for DE, tick# 2499999
OK for E1, tick# 2500000
OK for E4, tick# 2500001
OK for E7, tick# 2500002
Rolling over on the 2.5million write mark and going strong!
170  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Write to pgmspace? on: June 26, 2008, 02:55:11 pm
Quote
OK for DB, tick# 99998
OK for DE, tick# 99999
OK for E1, tick# 100000
OK for E4, tick# 100001
OK for E7, tick# 100002
So it looks like 100,000 is a conservative estimate. (Not that we should be surprised. It's currently up around 125K write/read cycles to the same location.)

Quote
I might have just had the stored value alternate between 0x55 (01010101) and 0xAA (10101010), but incrementing the value by 3 each time sounds reasonably robust.
A history with SDRAM testers has shown that an alternating pattern can occasionally be stored in otherwise dead cells. As we're not looping through address, it should be safe to write sequential values, but the +3 test works reliably for other memory testing, so I'll use it here.

Quote
I also might have chosen to do this test on EEPROM address 511 so that it would be easier to remember which address is bad later.
I'll either bin the ATmega or give it a purpose that uses no eeprom. A middle of the road address should give a more reasonable estimate of eeprom life too; if 511 or 0 are located at the extreme corners of the die, they may suffer worse or better reliability than something away from the corner; OK, it's a long shot, but it's worth thinking about. Ideally I should have stressed a few locations, but oh well.
171  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Write to pgmspace? on: June 26, 2008, 10:42:41 am
An honest question, has anyone seen an over used eeprom location in an ATMega? I've seen over-used flash, but never eeprom.
I figure it's time to find out. I've just grabbed a fresh new ATMega168 (I can't find the manufacture date for this lot, but it's recent) and loaded the following sketch into it. With a 0.1s delays, it should destroy this address in about 2.7 hours by Atmel's standards. For reference, VCC=~4.8V.

In all honesty, this doesn't stress the retention characteristics of the memory, only asking for 100uS of retention and with the power on, but any other test would take forever!

Quote
#include <EEPROM.h>

unsigned char x = 1;
unsigned long c=0;

void setup(){
   Serial.begin(9600);
   EEPROM.write(55,x);
   delay(100);
}

void loop(){
  unsigned char y=EEPROM.read(55);
  if(x==y){
    Serial.print("OK for ");
    Serial.print((unsigned)x,HEX);
    Serial.print(", tick# ");
    Serial.println(c);
  }else{
    Serial.print("Failure at tick# ");
    Serial.println(c);
    Serial.print("Expected: ");
    Serial.print((unsigned)x,HEX);
    Serial.print(" - Read: ");
    Serial.println((unsigned)y,HEX);
    while(1);
  }
  x+=3;
  c++;
  EEPROM.write(55,x);
  delay(100);
}
172  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: measuring volume of liquid on: April 29, 2008, 12:55:14 am
While this wasn't it's purpose, you might find my recent blog post on interfacing with a pressure sensor useful in some way.
173  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: measuring volume of liquid on: April 24, 2008, 10:44:12 pm
The MPXM2010 provides (if I remember right) a differential signal with only 25mV of full scale span. So you'll need some involved opamp magic to make it into a usable signal.
If you're trying to ignore the analog side as much as possible, I'd suggest something 'integrated', like the MPVZ5010, it provides a signal you can just hook up to the Arduino's analog input pin (it's also a 10kPa part, like the MPXM2010). It's available in a through-hole part, so you can just plug it into a breadboard. You want MPVZ5010GW7U which is a through-hole gauge part with a port on top.

You're going to hook pin 2 to +5, pin 3 to GND, and pin 4 to one of the analog in pins. The other pins, should be left unconnected.

Keep in mind, at this point, I'm just going from the datasheet and app note, if you have a few dollars to spare, I'd order the two sensors on either side of it: MPVZ5004 (4kPa) and MPX5050GP1 (50kPa) just in case the math is wrong for applied pressure.
174  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: measuring volume of liquid on: April 24, 2008, 02:38:22 pm
I used generic poly tubing... I headed to the hardware store with the sensor in hand and picked up the thinest walled tubing that fit the sensors head.

My notes say I used an MPXM2010GS. The Freescale appnote is AN1516 and AN1950 both have some details on picking a sensor based on your specific water level needs.
175  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: measuring volume of liquid on: April 23, 2008, 11:28:03 pm
I'm sure there are high-tech sensors for this, but I use a Freescale differential pressure sensor for this task. One side of the pressure sensor is exposed to the atmosphere, the other side is connected to a tube running down the (almost) the bottom of a graduated cylinder of known diameter. As the liquid level rises, the sensor reports a progressively higher pressure.
To calibrate the sensor, I filled the cylinder to specific levels, and then generated a lookup table based on these values. Accuracy depends on the diameter of the vessel, for my 15mm cylinder, I get about +/-0.75ml of resolution.
Freescale has an application note to this effect somewhere on their site (I believe they discuss a washing machine).
176  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Deployment strategy on: April 30, 2008, 12:34:30 am
Quote
I really don't understand why people use batchPCB.
Because people love and trust Sparkfun, other than that, I have no idea. Unless you have something small (say under 4 sq in) your likely cheaper getting someone else to make it. I use them every now and then when I need a breakout board for -that-fscking-small-weird-footprint-device-I'm-tryingout- usually this means I can get 4 breakout boards in less than 3sq in, there's no point paying someone else (or wasting a panel slot) to make 3sqin of something if I only need one set.

This said, if you make mistakes (knock wood), it's nice to mess up one board then mess up 20.
177  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Larger Arduino projects on: April 11, 2008, 10:37:29 pm
Quote
Finally, I would just like to say that I ABSOLUTELY love the chaos that happens with the Free/Arduino development. Its like a scene from the Smurfs, where the sun is out, the grass is green, and the butterflies lazily fly by when you are first introduced to this cute little blue guy that promises fully web enabled wine racks or blenders that speak to their owners. Then you pull back the curtains just a little bit and theres all this stuff being made, developed, proposed, and so on. Its like going to your first punk show in the 80s and having the biggest WTF moment of your life. Tod had been talking about 'smart leds' for a couple years and then one day out of the blue (to most of us) the happy arduino has a new blinky friend. Yeah its of lot of work and we all have our reasons for doing it but this chaotic development is downright fun if you ask me. Sure there could be more coalescing amongst some of us as we develop new things but I am very happy with this convoluted, prismatic, and even sometimes problematic landscape that has sprouted up around this platform. And that to me is an advantage of the open hardware movement and I applaud the foundation for their work and foresight to allow that to happen as well as the indie makers that in part made things happen anyway.

"Then you pull back the curtains just a little bit and theres all this stuff being made..." This, I believe, is where the topic started in the first place, as a way to say "hey, I've thought of this amazing idea, and hey, it kinda works, but I could use some help". At what level you need help is I guess up to every individual. "I've had a great idea", "this is how it will work", "it sorta works", "it works but I only have one", "I have 300 how can I show them off and sell them", to "I had 300 and then I sold them how can I help someone else now" are all places where people can fall off the development wagon, and I think the original point was to find a way to help connect people at every rung.

i think a great discussion on "bigger things" has been sidetracked by the idea of one particular thing (the i2c ushield etc).
178  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Larger Arduino projects on: April 11, 2008, 10:28:41 pm
Quote
As I was thinking about this, a never ending string of stacking uShields could get a little tricky amp wise. Please correct me if Im wrong, but the blink-m uses two of the arduino (analog) pins as source for 5v and ground. This will only be good for 40mA correct? Stacking them is an open invite for some dead i/o pins if you ask me. Much beter to have the convenience of sticking on a little piece of kit that gives some functionality (such as a bad ass blinky light *OR* 3axis sensor, etc) and when you need the kitchen sink you can whip up the breadboard with the appropriate wiring. The trade off of convenience versus full functionality rather than trying to be the be all end all.

This is where the ushield shield comes into play. It provides the power from the comparatively beefy 5V line to a number of little 4 pin sockets.
179  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Larger Arduino projects on: April 10, 2008, 03:46:11 pm
Quote
The uShield dock you pay only once and it is for people that is going to use several i2c devices in an Arduino friendly format, stackable.  If you are going to plug just an accelerometer, then you can do it directly... except for the LIS302DL... it is a 2.5V device (actually 2.16 to 3.6), so you will need the i2c bus adapter board anyways.
It is strange, but the sparkfun site doesn't mention that you cannot use the LIS302DL with 5V... maybe they got too business oriented and forgot about engineering?  99% of MCU projects out there are still 5V, right?
Actually, now I'm wondering, what does the nunchuck do about it? Since people plug them right in, don' they?
180  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Larger Arduino projects on: April 10, 2008, 02:17:38 pm
Quote
Quote
Even assuming Ladyada's 'double part cost' pricing system, we're looking $17.20US (10.90 Euro).
This is not a non profit thing, or is it?
No it isn't, thats how we come up with an end price of $17.20US for a kit with a 'cost' of $8.60
Pages: 1 ... 10 11 [12] 13 14