Show Posts
Pages: 1 ... 29 30 [31] 32 33 ... 72
451  Using Arduino / Microcontrollers / Re: Starting Out On AVR Programming on: January 29, 2013, 07:42:19 am
Someone was listening.  The latest episode of The Ben Heck Show (youtube) explains the difference between ICSP and serial bootloader programming before he launches into the day's project.
452  Using Arduino / Project Guidance / Re: Automotive datalogging - Lots of analog inputs needed. on: January 29, 2013, 07:15:40 am
Can someone also please confirm that if USB is plugged then it does not need a separate AC/DC adapter to get its power from ?
Confirmed.  It can draw its own power supply from USB when plugged into that, however be mindful it's only got limited capability to drive other devices so best you plan to drive all these sensors from an independent supply.
And what do you guys think of the PoE version ?
Great, if you have ethernet handy that you can power it from.  In a car there's probably simpler sources than setting up a LAN though.
Other vendors don't post them online it seems, but I expect it to be similar, that is with 0V, 5V and one signal pin.
That's the typical configuration for analog devices such as those.  Digital ones may need more connections (I2C has +5V, GND a data and a clock line for example) but multiple devices can share the same bus, only consuming 2 pins on your Arduino (in the case of the I2C example).

Looks like MoTeC knows they can charge a premium for their particular vertical market. 

Cheers ! Geoff
453  Using Arduino / Microcontrollers / Re: Starting Out On AVR Programming on: January 28, 2013, 03:42:07 pm
Hi

You have choices - you can leave the bootloader on there, and use it to help you get the program onto the chip via serial.  That's the way the IDE does it for your Arduino, and the bootloader is left in place on the chip ready to load further hex files ongoing.  Or you can overwrite the bootloader in the way that Sparkfun tutorial did and program the microcontroller that way.  The bootloader way is convenient if you use the IDE as your programming environment, and using the serial interface allows easy comms back to your PC for debugging and other output via FTDI whereas the other way gives you more flash to store your program in as there's no bootloader there taking up space and your program will start without the bootloader's small delay.

Buying bare ATMega chips is typically cheaper than buying them with the bootloader, and there are lots of sketches out there to load a bootloader on the bare uC too.

Here's some more good reading which includes some more background to this:
This one on loading and using the bootloader on a bare uC
And this one on updating a bootloader on another Arduino

Basically, there's no right or wrong way - it really is your choice.  HTH
Geoff
454  Using Arduino / Programming Questions / Re: calendar/date maths - do any of the existing libraries do this well? on: January 28, 2013, 05:06:46 am
Thanks Bob - sometimes I can't see past my nose.
Code:
void breakTime(time_t time, tmElements_t &tm);  // break time_t into elements
time_t makeTime(tmElements_t &tm);  // convert time elements into time_t
There was my answer right there.  And, no 100th February 2013 now smiley
Code:
#include <Time.h>
  tmElements_t tmE;
  time_t atime;

void setup() {
  Serial.begin(9600);
  tmE.Second = 00;
  tmE.Minute = 00;
  tmE.Hour = 00;
  tmE.Day = 28;
  tmE.Month = 01;
  tmE.Year = 43;
}

void loop() {
  atime = makeTime(tmE);
  Serial.print(day(atime));
  Serial.print(" ");
  Serial.print(month(atime));
  Serial.print(", ");
  Serial.print(year(atime));
  Serial.print (" is a ");
  Serial.println(dayStr(weekday(atime)));
  tmE.Day++;
}
results in
Code:
...
29 1, 2013 is a Tuesday
30 1, 2013 is a Wednesday
31 1, 2013 is a Thursday
1 2, 2013 is a Friday
2 2, 2013 is a Saturday
3 2, 2013 is a Sunday
4 2, 2013 is a Monday
...
Thanks for the nudge in the right direction,
Geoff
455  Using Arduino / Programming Questions / calendar/date maths - do any of the existing libraries do this well? on: January 28, 2013, 02:29:00 am
Hi,

I've been looking at the Adafruit RTC library, the Arduino Time library and associated TimeAlarms library but none of these directly helps.

What I'm wanting to do is to choose an arbitrary period, add it to the current date and feed this into a variable (of DateTime or time_t etc) such that the month, year etc rollovers are taken account of.  If I do this with the Adafruit library for example
Code:
aday++;
    now = DateTime(ayear, amonth, aday, ahour, aminute, asecond);
it will be quite happy to increment the day value out to the 100th of the month and beyond without complaining, so adding 7 to the day to construct a variable containing 5pm on the same day in a weeks' time can't be done this way (though curiously the unixtime() returned does appear to be correct, so it's possible I could reverse it back from that).

I'm happy to code around this, but thought it best first to check if it's already present somewhere.

Thanks
Geoff
456  Using Arduino / Project Guidance / Re: Automotive datalogging - Lots of analog inputs needed. on: January 27, 2013, 04:26:18 pm
Thanks for your clarification.  Typically shields can be stacked, though the caveat is that you need to assess the pin usage for each to ensure there are no clashes.  The shieldlist.org website is very useful for determining this.  If you have a need that's not addressed by a single shield there is the other option of creating your own, by soldering components on a protoshield.  A further option is to use one or more breakout boards, or create your own and wire the Arduino to it/those.

Do you have a link to the datasheets for the sensors you will be using?  If they must be all analog there are a couple of ways to address them, either by switching many possible inputs and reading them via a smaller number of Arduino analog pins (eg 74hc4051 can switch up to 8 analog sources - the data sheet states switching time in the nanosecond scale); or using external ADC ICs you read the sensors with them, and pick up the values via digital pins on the Arduino.

There may also be digital variants of your analog sensors which would avoid needing additional intermediary ICs nor shields.  It's typical for accelerometers to be interfaced via I2C or SPI, and there are many digital temperature sensor types so I expect the number of analog channels you will need is actually less than the 64 you initially specified.

Cheers! Geoff
457  Topics / Science and Measurement / Re: Beginner with Chicken Project - Willing to pay for help on: January 26, 2013, 09:00:13 pm
Hi Stephen

Perhaps you could combine this with a load sensor so you can tell if the chicken leaves the nesting box but leaves it heavier than when she arrived there?

Geoff
458  Using Arduino / Project Guidance / Re: 12 LED Charlieplexed Snowfall with AtTiny85 on: January 26, 2013, 05:47:22 am
I've been having quite a bit of fun with this ATTiny charlieplexing.  Aside from the KITT Larson scanner thing, most recently have made a little EMF detector (originally showcased here for Arduino)

With apologies for the lame iPad photo quality, here's that one constructed, and another take on the 20 LEDs, arranged in a square which runs a sketch that loops around changing direction every 0.5 to 5sec.

Dave thanks again for the original inspiration.
Geoff
459  Community / Exhibition / Gallery / Re: 64 knob MIDI controller prototype on: January 26, 2013, 02:58:58 am
Wow.  I'm subbing here for the eventual link to your performance video  : )
Next step will be coming up with ideas for a nice enclosure.
I'm a fan of the Cisco router case featured in those photos - does it all fit back in there?

Geoff
460  Using Arduino / Project Guidance / Re: frequency counter using optoisolator,arduino uno on: January 25, 2013, 05:28:05 pm
yea till 100 Mhz max.
Earlier you said 100Hz (100 cycles per second) and now you're asking for 100MHz (100 Million cycles per second) so that M makes a significant difference.  There is nothing in that circuit you posted that indicates it could get up to megahertz ranges either so did it work at all?

What is it you're measuring?  If you can provide a link to the datasheet for it that would be useful also. 
Geoff
461  Using Arduino / Microcontrollers / Re: ATTiny85 tone() core? on: January 25, 2013, 05:11:14 pm
That clears it up perfectly - thanks !

Geoff
462  Using Arduino / Project Guidance / Re: frequency counter using optoisolator,arduino uno on: January 25, 2013, 09:36:04 am
PIC16F628 is capable of measuring frequency only in 16Hz to 100Hz range.What about atmega 328p?
Is there any way to increase this range sir?
Hi,

The first paragraph in the 2nd link above says it can give accurate measurements below 20kHz (20,000Hz) so is that sufficient for what you need?

Geoff
463  Using Arduino / Microcontrollers / Re: ATTiny85 tone() core? on: January 25, 2013, 09:32:41 am
Thank you - that's extremely helpful.
It sure is.  Thankyou.

Can you just clear up for me the role of PB3 with PWM?  It's marked as OC1B with a line over it, in the same way that PB0 is OC1A with a line above it.  Is it that the hardware is capable but we can't drive it with hardware PWM using the Arduino core resulting in what we saw in earlier tests when we tried to analogWrite to it?

Thanks, Geoff
464  Using Arduino / Project Guidance / Re: frequency counter using optoisolator,arduino uno on: January 25, 2013, 09:12:51 am
Hi

I don't know how many people here will be able to help you translate this across, I certainly can't.  But if the original one is buggy anyway why not start over from the ground up for Arduino?  If this is just working out the frequency of a square wave and outputting the digits to a 7 segment LED display those are the two bits you need to get functional on the Arduino - is my summary correct?

If so, there are lots of resources for helping you get to those two goals.  Since there's no other hardware in your circuit, you'll likely get to do all this without running out of Arduino pins, therefore you won't need any additional supporting hardware to drive the display which means you can use a software library (like this one in the playground, link here to run your display. 

For the frequency counter, googling Arduino Frequency Counter comes up with a lot of suggestions, and several pre-written libraries you'd be able to choose from.  One example, here measures up to 20kHz from an Arduino.

Hope this helps get you started on your way,
Geoff
465  Using Arduino / Project Guidance / Re: Automotive datalogging - Lots of analog inputs needed. on: January 25, 2013, 08:56:51 am
Hi David

Jonathan Oxer had a project in one of his books with a datalogger with GPS in the car.  Here's a link to the summary which includes some words of wisdom and more links.  I recall from other comments I've seen on it that it was a able to run on the Arduino Uno.

Cheers ! Geoff
Pages: 1 ... 29 30 [31] 32 33 ... 72