|
46
|
Using Arduino / Networking, Protocols, and Devices / Re: XBEE Data loss at speeds higher than 9600 baud
|
on: May 01, 2013, 06:57:42 am
|
|
Here's an example literally from my backyard. Two XBee ZB low-power modules. One has the wire antenna (XB24-Z7WIT-004) and one has the chip antenna (XB24-Z7CIT-004) which is nowhere near as good (and is no longer made, having been replaced by the PCB antenna, XB24-Z7PIT-004).
They are about 30m or so apart. One is in a backyard shed and the other is in the family room. Pretty much line-of-sight except for two wood frame walls between them. Data is sent once per minute, and it doesn't always make it. When it does, the signal strength is very marginal. I would use different antenna options or maybe even a router as a repeater if it were anything that mattered. But I'm amazed that it works as well as it does, probably 90% or more of the data makes it through!
|
|
|
|
|
47
|
Using Arduino / Project Guidance / Re: System modes on an Arduino
|
on: April 30, 2013, 07:01:09 pm
|
Another common method is to use a jumper on header pins. You move the jumper to indicate the mode. At startup, you read a few inputs to see which one is grounded.
I'll take back what I said about a button being the simplest approach. This would probably be the simplest approach from a couple different angles.
|
|
|
|
|
48
|
Using Arduino / Project Guidance / Re: System modes on an Arduino
|
on: April 30, 2013, 06:56:17 pm
|
|
Microcontrollers like Arduino have no conf files. In fact, they have no files at all! Well, an SD card could be interfaced and files read from that, but there will be cost involved there and it's not the easiest because now the parameters need to be stored on the SD card, so an extra step.
I have a couple projects that have parameters that the user can select via buttons and their preference gets stored in EEPROM. As part of initialization, the code reads the parameters from EEPROM, which persist until changed, even through power loss.
If there are already switches and a menu system in the project, it's a no-brainer. If not, adding a button still may be the simplest approach. Assuming there is some feedback mechanism, a display, or just LEDs so that the user can see what he's doing.
|
|
|
|
|
49
|
Using Arduino / General Electronics / Re: Power Wastage.
|
on: April 30, 2013, 06:41:30 pm
|
After looking at linear regulators, and the resistors you need....
Which regulators are those? The typical ones discussed here usually only need some capacitors, and maybe a couple small resistors for setting a feedback voltage, not power resistors. Who in this day and age is going to design a circuit with a 100watt + resistor? when will these go the same way as incandescent bulb?
They already have. Back in the day of tube (valve) circuits, 10W and 5W resistors were commonplace. Several could be found in any TV, they were also in radios, stereo gear, guitar amplifiers, etc. That stuff threw off tons of heat. A 10W resistor running at full power or even half power is fairly impressive. If I use a 1/4W resistor now (which is hardly ever), it's gross overkill, and probably has a safety factor of several hundred percent as far as power dissipation. As others have noted, niches remain for power resistors, so they continue to be produced. Don't panic 
|
|
|
|
|
50
|
Using Arduino / Networking, Protocols, and Devices / Re: XBEE Data loss at speeds higher than 9600 baud
|
on: April 30, 2013, 03:20:37 pm
|
Range specs according to the product manuals. These are probably the limit given good conditions (hence "up to"), but they don't seem terribly unreasonable in my experience. OTOH, 10m is maybe a bit on the pessimistic side. XBee 802.15.4 modules Indoor/Urban Range up to 30m Outdoor LOS Range up to 90m
XBee-PRO 802.15.4 modules Indoor/Urban Range up to 90m Outdoor LOS Range up to 1600m
XBee ZB modules Indoor/Urban Range up to 40m Outdoor LOS Range up to 120m
XBee-PRO ZB modules Indoor/Urban Range up to 90m Outdoor LOS Range up to 3200m
|
|
|
|
|
51
|
Using Arduino / Networking, Protocols, and Devices / Re: XBEE Data loss at speeds higher than 9600 baud
|
on: April 30, 2013, 01:33:00 pm
|
|
XBees aren't the best choice for file transfer. They are meant to be low-bandwidth devices, and are aimed at applications that exchange relatively small data packets. They have small buffers that are easily overrun; see the product manual for your particular part. I suppose a person could develop code to packetize file content, send it a piece at a time, wait for acknowledgement, etc. The RF data rate for XBee 802.15.4 and XBee ZB modules is 250kbps. I wouldn't expect to be able to approach half of that as sustained throughput.
|
|
|
|
|
52
|
Using Arduino / Microcontrollers / Re: ATtiny85 TimerCounter1 Compare Match Interrupts
|
on: April 30, 2013, 06:08:37 am
|
Jack,
Great. Got it running. Thanks. I need to look further into the ATMEL datasheet.. there's a lot in there that takes time to absorb.
Excellent. Yeah, I have to read the datasheets pretty close, and even then sometimes it takes some experimentation to really understand. Before you pointed that out, I hadn't noticed that there was a prescale select stopped state which is applied with the statement TCCR1 = 0. Or, that OCR1C compare match clears TCNT1. Thanks!
Timer1 on the ATtinyX5 is a bit unusual as has been noted. Two output compare registers are more usual, on the ATmega as well. Plus the ATtiny's have fewer interrupt vectors. I see how one could use OCR1B match compare interrupt to incrementally alter the OCR1A interrupt compare value, so as simulate a much larger Timer/Counter1 prescaler. So extending that 0.5sec to 2.00sec interrupt interval sounds quite possible.
Yep, a little math in the ISR and off you go, I see you found a solution!
|
|
|
|
|
53
|
Using Arduino / Microcontrollers / Re: ATtiny85 TimerCounter1 Compare Match Interrupts
|
on: April 29, 2013, 09:26:05 am
|
Has this issue got anything to do with the fact it's using the internal oscillator?
using an external 16/20mhz crystal make any difference to the timing here?
Not sure which issue you refer to. My answer to the first question would be no, but yes, changing the system clock speed will change the timing, all other things being equal, as the timer is clocked by the system clock, through a prescaler.
|
|
|
|
|
54
|
Using Arduino / Microcontrollers / Re: ATtiny85 TimerCounter1 Compare Match Interrupts
|
on: April 29, 2013, 09:06:33 am
|
CTC mode matches on OCR1C, but there is no Compare Match C interrupt, only A and B. But OCR1A can generate the interrupt and OCR1C can clear the timer. Another note, the match doesn't happen every 2 seconds, it happens at 2 Hz, i.e. 8MHz/16384/244, or every 1/2 second. #include <avr/io.h> #include <avr/interrupt.h>
void initTimerCounter1(void);
void setup(void) { pinMode(4, OUTPUT); digitalWrite(4, HIGH); initTimerCounter1(); }
void loop(void) { // nothing to do, done with Timer1 Match interrupt }
void initTimerCounter1(void) { TCCR1 = 0; //stop the timer TCNT1 = 0; //zero the timer GTCCR = _BV(PSR1); //reset the prescaler OCR1A = 243; //set the compare value OCR1C = 243; TIMSK = _BV(OCIE1A); //interrupt on Compare Match A //start timer, ctc mode, prescaler clk/16384 TCCR1 = _BV(CTC1) | _BV(CS13) | _BV(CS12) | _BV(CS11) | _BV(CS10); sei(); }
ISR(TIMER1_COMPA_vect) { //comment out one of the two lines below digitalWrite(4, LOW); //turn the LED off //PINB |= _BV(PINB4); //flash the LED by toggling PB4 }
|
|
|
|
|
56
|
Using Arduino / Project Guidance / Re: ABC - Arduino Basic Connections
|
on: April 28, 2013, 07:30:23 pm
|
Card 25,26 & 27 available to download
Pighixxx, I know I am not the first, but let me congratulate you, your stuff is very attractive, useful, and truly a work of art. On card 25, please have a look at the legend for the EEPROM address pins, I believe they are reversed, and should read, left to right, A2 A1 A0. Cheers ... jc
|
|
|
|
|
57
|
General Category / General Discussion / Re: Arduino board used as detonation device in Boston?
|
on: April 28, 2013, 04:06:35 pm
|
Nice first post. Deserves a minimum of a warning from the mods IMHO. Totally irresponsible. Is that what is left of a arduino inbetween the cones? If so, it is terrible that an individual would think of using this terrific product in such a horrible way.
Doesn't particularly look like it to me. But I suppose that the folks that have that board in a little plastic bag are in a far better position to determine that. If anyone has any information on somebody asking how to write code, let the proper authorities know!!!
Well, that only happens several dozen times a day here. Spread the word and or picture and lets see if the Arduino community can help catch who is responsible.
By what method?Mind you, I can think of several easier devices to use off the top of my head, given that an Arduino has no native RF capability and would require code to be written to implement same. You obviously have too much time on your hands. I'd suggest reading a book on critical thinking instead. Or go ahead and call the authorities with your theory and report back to us how that works out.
|
|
|
|
|
58
|
Community / Bar Sport / Re: Flying with Arduino
|
on: April 27, 2013, 03:31:24 pm
|
|
All righty, sounds like we have a consensus. I think I'll start a petition on petitions.whitehouse.gov to allow microcontroller boards on airliners as long as they are 2.36 inches or shorter.
|
|
|
|
|
59
|
Community / Bar Sport / Re: Flying with Arduino
|
on: April 27, 2013, 02:15:08 pm
|
Laptop, fine. Attached to an arduino with lots of wires sticking up all over, LOL. Air Marshal to the rescue.
Lefty
Yeah I know, I was just thinking a USB cable though. Seems like someone made one that plugged directly into a USB port, wouldn't look much different than a flash drive.
|
|
|
|
|
60
|
Community / Bar Sport / Flying with Arduino
|
on: April 27, 2013, 12:41:43 pm
|
|
It seems like a laptop computer and an Arduino board would be a great way to pass the time on long flights, as long as it doesn't attract the wrong kind of attention. I was wondering whether anyone has tried this.
|
|
|
|
|