Show Posts
Pages: [1] 2
1  Using Arduino / General Electronics / Which IC packages should I go for on: June 10, 2013, 01:06:57 pm
I have been playing around with various ICs for a little while now. But up to now I have only used DIP chips because I know how to prototype with them and include them in my projects.

Some are clearly require unsuitable. Are there other types of chip other than DIP packages that I can easily include in my projects.

TIA.

2  Using Arduino / Programming Questions / Re: Trouble with attachinterrupts on: October 07, 2012, 12:59:07 pm
If I remember correctly you cant make calls to Serial from within an interrupt. I would remove them from your interrupt functions.
3  Using Arduino / Programming Questions / Re: endsWith Not working for me. on: October 07, 2012, 12:56:42 pm
Quote
In C and C++ anywhere a pointer or reference is accepted the null pointer is also accepted.  The null pointer is notated as 0.

Pointers can be NULL (or 0) but references can not.

In this case I believe the compiler decided it could take your 0 and turn it into a string. However, looking at the reference for String, this should work.
4  Using Arduino / LEDs and Multiplexing / Re: [Advice needed] Building a small BCD clock. on: September 28, 2012, 11:42:57 am
As you are building a BCD clock I would use an ATTiny with at least 8 outputs and arrange your leds on a 4x4 grid (with gaps where you dont need LEDs)

Then you can use 4 of your outputs for your rows and four for you columns and you have an easier solution than charlieplexing. You would need to row scan the rows of the 4x4 matrix but there are loads of tutorials on how to do that on these forums and on the net.

Something like
     X           X
     X      X   X
 X  X      X   X
 X  X      X   X
Hours   Minutes

HTH
5  Using Arduino / General Electronics / Re: Is a voltage regulator neccesary for stand alone ardunios on: September 23, 2012, 11:33:02 am
I plan to power the project using a 9v battery. It will power a small LED matrix (5x5) and will be driving the LEDs at around 5ma, as I am row scanning so only max of 5 LEDs will be lit at a time. As its a small matrix at lowish power I am going to drive the matrix directly from two 595 shift registers. I am using a ATtiny25v microcontroller to provide the brains.

I am planning to use a http://uk.farnell.com/jsp/search/productdetail.jsp?SKU=1087086 as a voltage regulator (thanks to the advise on this forum) that maybe a bit overkill as it can provide way more power than I need but I have one going spare in my parts box as well as the necessarily capacitors. 

6  Using Arduino / General Electronics / Re: Is a voltage regulator neccesary for stand alone ardunios on: September 23, 2012, 09:51:55 am
I am fairly new to electronics, but I want to learn how things work. Thanks for the link about voltage regulators I didnt realise that a lot of their utility came from their efficiency rather than their accuracy. That makes a lot more sense.

Next time I put a parts order in I will make sure it includes some more voltage regulators.


 
7  Using Arduino / General Electronics / Is a voltage regulator neccesary for stand alone ardunios on: September 23, 2012, 06:42:31 am
As per title do I need a voltage regulator to build a standalone arduino circuit or can I use a voltage divider as the required voltage of the ATMEGA328 is 1.8V to 5.5V according to http://uk.farnell.com/jsp/search/productdetail.jsp?SKU=1848694.

I did post a related topic in the product guidance forum but as I haven't received any response I decided to re-post here as this forum seems more relevant.
8  Using Arduino / Project Guidance / Re: Standalone Mini LED Matrix on: September 22, 2012, 03:34:30 am
Just had a random flash back to GCSE technology...
Am I right in thinking that I need to build a voltage divider circuit? http://en.wikipedia.org/wiki/Voltage_divider
9  Using Arduino / Project Guidance / Standalone Mini LED Matrix on: September 22, 2012, 03:32:29 am
I would like to build a mini standalone LED matrix as a pressie for my wife (she likes geeky presents) I am going to use a few parts I have lying around to make it. That is, an ATTINY25v and a couple of shift registers to drive a 5x6 LED matrix powered by a 9v battery.

Both the ATTINY and the shift registers have a really wide voltage tolerance (~2v-5.5v) so will I still need to use a voltage regulator? Or can I get away with some resistors.

Thanks in advance.


10  Using Arduino / Programming Questions / Re: Fast Digital Write and Interrupts on: September 21, 2012, 02:23:19 am
Thanks for the explanations, that makes a lot of sense.

As for digitalWrite not being fast enough...

I am actually trying to see what the limits are of using an arduino to power LED matricies. And playing around with my own version of shiftPWM. I am not interested in just using the library that someone else has written because there is no challenge in that. Using digitalWrite I was getting flickering effects on a 24x8 RG matrix with only a few levels of PWM.

11  Using Arduino / Programming Questions / Fast Digital Write and Interrupts on: September 20, 2012, 11:26:43 am
I have an LED matrix that I row scanning to display an arbitrary image. To get a decent frame rate I am writing to the PORT registers directly rather than calling digitalWrite.

I have seen several people talk about disabling interrupts around setting PORT registers using code something like this:

Code:
uint8_t oldSREG = SREG;
cli();
        PORTD |= B00000100;
SREG = oldSREG;

Buy why is this necessarily? Setting the PORTD register directly seems to work just fine:

Code:
       PORTD |= B00000100;

I want to avoid disabling interrupts as I am using interrupts for my sensor (an IR receiver).
12  Using Arduino / Programming Questions / Re: ir function stuck on: September 18, 2012, 01:50:51 am
Code:
  while (pulseIn(IR_PIN, HIGH) < start_bit); 

Will wait until you get a pulse so you will not be moving your motor when you are waiting for a pulse.

You will need to interleave checking for pulses with updating your stepper for this to work.

HTH.
13  Using Arduino / Programming Questions / Re: Code Snippet Not working as expected on: September 18, 2012, 01:30:19 am
Had a look through your code and I cant see anything wrong with it.

However, as you haven't included your variable declarations this could be the problem. My best guess is that you are overwriting the end of the ins array. Unlike java overwriting the end of an array doesn't raise an exception directly.

How big is the ins array?
14  Using Arduino / Programming Questions / Re: Question about different ways to declare objects and their effects on RAM usuage on: September 10, 2012, 02:23:31 pm
I don't think anyone has actually answered your question yet, so here are my thoughts.

All three will work assuming you are not relying on the instance in consecutive calls to ds() being the same as each other or the same as the instance in setup()

Global objects: all memory is assigned on start-up and never freed.

Local function objects: memory for all three classes is assigned at the start of the method and freed at the end of the method.

Extra curly braces: this will assign the memory for each class and free it in turn.

If you want to see the order of things happening, I would add a constructor and destructor to each of your classes that outputs over the serial bus or something. The memory is assigned immediately before the constructor and freed immediately after the destructor.

Hope this helps.



15  Using Arduino / LEDs and Multiplexing / Re: how many 8x8 led matrix modules can 1 adruino handle? on: September 05, 2012, 01:56:04 am
I am also interested in the answer to this as I have also been playing around with LED matrices.

The limiting factor seems to be not so much how many matrices can you control but how fast can the arduino update them. As others have said you can use shift registers to control nearly unlimited outputs. If you want to display an arbitrary image you need to row scan your matrices and if you don't update the rows fast enough you get horrible flickering effects.

So far the biggest I have made is a 2 colour 24x8 array so effectively a 48x8 array. Further more I did two passes of each LED so I could create more colours and so this would be the equivalent of 96x8 or 12 8x8 matrix with only one colour.

I think this is about the limit you can achieve using the digitalWrite or shiftOut functions. However, it is possible to get a large speed up (at least 10 times) by bypassing these functions and setting the pin registers directly. Although this is obviously has its own pitfalls.
Pages: [1] 2