Show Posts
Pages: [1] 2 3
1  Using Arduino / Displays / Re: LCD display with ILI9341 driver on Arduino on: December 09, 2013, 11:19:01 pm
I have this working OK now, but the SD card reader won't work. There seems to be confusion in the code; at the top we have

Code:
#define chipSelect 4

but pin 4 is supposed to be RST, according to the pinouts with the library

but then later we have

Code:
  DDRB |= 0x04;
  card.init(SPI_QUARTER_SPEED,chipSelect);//SPI_QUARTER_SPEED   SPI_HALF_SPEED, SPI_FULL_SPEED,
  if(!SD.begin(chipSelect))//SPI_QUARTER_SPEED,
  { //53 is used as chip select pin
    Serial.println("SD begin()failed!");
    while(1);
  }
  Serial.println("SD OK!");


is this trying to use the RST pin as the CS for the card reader ?

I really wish we didn't have these in the library

Code:
#define TFT_CS_LOW  {DDRC |= 0x40;PORTC &=~ 0x40;}
#define TFT_CS_HIGH {DDRC |= 0x40;PORTC |=  0x40;}

and so on. Yes, I know I can't really criticise if I can't write the library myself, I'm just trying to get it working.

So, I'm just asking if anyone has got the card reader working, and if so, how?
2  Using Arduino / Displays / Re: LCD display with ILI9341 driver on Arduino on: December 06, 2013, 09:46:41 am
A couple of questions, if I may, this is getting complicated, with a few threads going on. From my reading I'm still unclear on a few things:

Mine is the same as everyone elses I think, with the penguin on the display pic. Even though that description says 5V is OK, I take it that it is not, and I should use a 4050? Mine is a BP not a BE, will that matter?

There are three libraries (at least), the seeed V2 one, the one on gmtii's git and UTFT.  Any clear distinction?

What does it mean to say use the VCC from the board? Where is that accessible, the 3V3 I'd imagine comes from the output on the Uno (Leo etc).

The MISO line is data coming from the Arduino and going to the display? So, the MOSI line, data coming from the display, going to the Arduino, need not be connected, there won't be anything to send?

I'm also a little confused abou the wiring. I know there's a diagram showing a 4050 in use, but it's very hard to interpret.

Thank you for any help

Rob

3  Using Arduino / Displays / Re: LCD display with ILI9341 driver on Arduino on: October 27, 2013, 08:12:51 pm
I'm seeking a little help here with the level convertors. I have on hand some 74HC245 transceivers, they have been used in other projects here but I've never gotten around to actually using them.  They are just buffers, the same as the CD4050 used here, but have an extra couple of pins, which I can't figure out despite spending some quality time with the spec sheet. I've had a good look at the diagram on page one of this thread, the buffers in the 245 are of the same kind, non-inverting, I believe, and this should be straightforward except for the extra pins (to/from voltage ?) on the 245. Its datasheet is at http://www.nxp.com/documents/data_sheet/74HC_HCT245.pdf

I'm using the same expected setup everyone is I think, one of the ILI9341  displays and a 5V Uno.

EDIT: I have the 20 pin version, just discovered there's a 24 pin version as well


4  Using Arduino / Motors, Mechanics, and Power / Re: Quick question on relay pinout on: October 14, 2013, 10:47:58 pm
Thanks, that works perfectly just running off a 5V breadboard supply. Mine is slightly different, looks like the S pin feeds the LED before connecting to the transistor but the result is the same.

Do I need to put a resistor in the signal path ? Probably not I'd guess as it's already connected to the LED and its resistor.

Thanks groundfungus, thanks CrossRoads.
5  Using Arduino / Motors, Mechanics, and Power / Re: Quick question on relay pinout on: October 14, 2013, 10:11:58 pm
OK. I made another image of the back of the board and pretty roughly marked out the traces. Well, OK, very roughly.

http://www.flickr.com/photos/emueyes/10283262625/

The diodes are on the other side of the board, the one on the long edge is the one for back EMF so that's a good start. The other trace that just stops in mid track is connected to an LED but I can't see where the other end of that LED is. That top pin is the one marked 'S'. Maybe needs to run through the LED and the ohmmeter isn't supplying enough voltage for that.

Of the three large solder pads at the header (right ) end of the board, the outer 2 are connected according to ohmmeter. None of the pins themselves seem to be connected to anything though.

It seems I have the coil isolated at least, if I can't work it all out I'll just solder some wires onto what would appear to be the coil and hopefully get a little click rather than a puff of smoke.

6  Using Arduino / Motors, Mechanics, and Power / Re: Quick question on relay pinout on: October 14, 2013, 09:23:49 pm
That would appear to be exactly the same relay, the case labelling is the same. The schematic there doesn't show a third pin though. I put an image of my relay at http://www.flickr.com/photos/emueyes/10282951943/ to show what I mean.

7  Using Arduino / Motors, Mechanics, and Power / Quick question on relay pinout on: October 14, 2013, 08:55:09 pm
Hi all

I have a small relay on a board. The markings on it are the current / voltage limits and "SRD-05VDC-SL-C" and also three adjacent pins labelled + - and S, with the other contacts being the usual NO/NC on screw terminals. Also has "Keyes SRly"  silkscreened onto it.

It's rated at 250VAC/10A along with other quite high DC ratings for the contacts, so is quite a handy unit, it came packaged in one of those starter kits for Arduinos that I got a year ago and now have a use for, assuming I can get it to work smiley I don't want to play pass the current if I can help it, a bit of care and a question might stop me burning something out.

The pins would be for the coil, but I'm not quite sure how to wire them up: + and - to 5V and the coil should actuate the relay? But then what is the S pin for.. Coming in a kit like that I have to assume that I'm not expected to have a 12V source just handy, so maybe 5V also on the 'S' pin will actuate it?



 
8  Using Arduino / LEDs and Multiplexing / Re: TLC5940 + ULN2803 on: September 30, 2013, 10:09:06 am
That's used a few pins, and I'm really trying to not use the SPI so that I can have Ethernet.

No problem, with only one 5940 to communicate with, you will be fine using the shiftout() and can use any pins.

I'm not sure what you mean by this.


The libraries for interrupts and manual PWM sound very interesting, I'll be investigating them thoroughly. In particular, the existing IO is event driven so I can loop whatever I like, and it certainly doesn't need microsecond accuracy.

I know that we live next door to eBay where a 5940 only costs a dollar, but I don't like destructive experiments; at least now I have some recommendation that I'm not going to toast a 5940, and also that I'd overthought and overengineered things.

9  Using Arduino / LEDs and Multiplexing / Re: TLC5940 + ULN2803 on: September 30, 2013, 09:26:25 am
Thanks for the info on the 5940, it seems remarkable that it can do both. I realise I have to supply my own current limiting resistors, now knowing that PWM will still work is great.

What I have atm is this. A Uno, a 12V 7W white LED, and potentially, 6,7,8,? strings of amber LEDs (four in series will run off 12V).

The Uno has an IR receiver, a momentary action pushbutton that in software latches the white LED on/off, and a rotary encoder for dimming. The onboard switch etc are just duplicated in functionality by the remote. That's used a few pins, and I'm really trying to not use the SPI so that I can have Ethernet.

The switch and encoder are both interrupt driven, hence the encoder only gets 1 interrupt, seems to work OK though.

Now I have the strings of amber LEDs, which will physically be inside the lampshade, and (I imagine) slowly fade in and out, creating a wonderful effect. Or it may look horrible. I don't know that bit yet.

I've breadboarded the amber LEDs and they do look kinda cool. I've only got a 2008 and 7 strings (bunches, really)  atm.

If I can take the 12V 'main power line', use a bunch of the amber LEDs and connect them directly to a 5940 pin then that's great. The TI article on that topic was quite complicated. I know I can run them straight to the Uno, but I really want more strings/bunches than it has PWM outs.

I've used up the Unos IRQs and a lot of its pins, I might be better of using a Mega for this, and doing away with auxiliary chips altogether. Or, if the 5940 will work by itself that's good too. 

That's pretty much the whole story. If I've over complicated things thinking I'd need a 2003/2803 that's not needed I'm very happy to not use it. I do need more PWM outs than the Uno has though.
10  Using Arduino / LEDs and Multiplexing / Re: TLC5940 + ULN2803 on: September 30, 2013, 08:46:12 am
Sorry, I mayn't have been clear about what I was talking about. I'm using strings of LEDs just to get the required brightness, then having 5, or 6 or however many strings, where the strings need individual control.
11  Using Arduino / LEDs and Multiplexing / Re: TLC5940 + ULN2803 on: September 30, 2013, 08:41:05 am
I've just realised that a 5940 isn't a PWM device, it's a constant current device; I'd seen in other posts, though, that same question about the 5940 / 2803 combo being used, without that being pointed out as kind of a major flaw in the design.

How many PWM outputs do I need? I don't know, 8 or so. It's a kind of open ended project, of the type that keeps using up pins. I'd like it to have WiFi, too, for eg.

There's a document from TI at http://www.ti.com/lit/an/slva280/slva280.pdf describing how to use a FET with a 5940 to enable series LEDs operating at a higher voltage than the normal 5V, but even the way the FET is used in that document has me puzzled, working out the value of the resistor they're using to control it is hard.
12  Using Arduino / LEDs and Multiplexing / TLC5940 + ULN2803 on: September 30, 2013, 05:11:07 am

Sorry to bring this up again; it's been talked about a few times here, but somehow never reached a conclusion that I could see or understand.

My wish, as that of the other posters, is to use the PWM outputs of a 5940 to control a couple of 2803s and hence a bunch of LEDs. More specifically I have a string of LEDs on each output and the proper resistor to run the series string @ 12V and about 18mA, give or take the variances of the LEDs and resistors.

I've seen mentioned that I need to pull the 5940 outputs high, ok, but also seen that I'll lose the PWM ability of their output. This last bit I don't understand. I was hoping that the PWM output would just switch the 2803s also with PWM and hence control the LEDs.

This is a lighting project, I'm using an NFET for the main 12V 7W led, works great with both rotary encoder and IR remote- I've got a bit of a clue, but know enough to ask for advice too. These extra strings are meant as 'ambient' lighting to alter the overall colour of the lamp. They aren't RGB, just plain amber.

I mention all that because if using a board full of FETs is the best way to do this then that's what I'll do. Something that takes up a bit less space (and takes less effort to implement) is what I'm asking about.

I have seen these too http://www.adafruit.com/products/1455 perhaps the cleanest solution to this problem; seems to do exactly what I want in general terms - control a bunch of LEDs with PWM - and at that price it's just right. Can't seem to find the TLC59711 chip it uses anywhere though.



13  Using Arduino / LEDs and Multiplexing / Re: Current sinking on TLC5940 on: September 21, 2013, 05:28:21 am
Yes, I have noticed the unreliability of breadboards and take your parallel with power strips. I first started playing with Arduinos about a year ago, and for a while was mystified, and very frustrated, that something that should work just didn't. I make sure now to use decent boards, but sometimes there are still issues of course. I appreciate the note to that effect, but it is still a lot of fun to just plip some circuit onto a board and see how it runs, with the knowledge that if it doesn't run then most likely I have a poor connection. I also find that the components are easier to reuse.

I didn't think a breadboard would go anywhere near a few amps, I was concerned over a tenth of that current, so that's handy to know, thanks.

Like I said, I've only been playing with Arduinos for a year; before that, I'd made a hobby of electronics in my teen years. While transistors did actually exist then, we didn't have anything like inexpensive microcontrollers, and we didn't have the Internet, with a staggering amount of knowledge and people willing to share their time and that knowledge. Within my current questions scope, I can easily make a lamp with PWM regulated, bright LEDs for low running cost, with infrared remote control, have it work, and have solid advice on things I'm unsure about. I find all this incredibly cool.



14  Using Arduino / LEDs and Multiplexing / Re: Current sinking on TLC5940 on: September 17, 2013, 12:48:31 pm
Quote
Quote
From what I understand, the 5940 sinks current from my 'Arduino LED' ®  collection,
How?
It sinks current, the current is supplied from what ever you connect the anodes to.

I was trying to be funny, every Arduino project starting with an LED... that is connected to a 5V 2A PSU...

Quote
Quote
but that seems like a lot for a breadboard
Yes that is why I never recommend solderless breadboard.
Quote
Does this sound like a good idea, or one that's just unnecessary?
unnecessary

Err, you don't recommend them because they melt  but assuming that anything that can fail will doesn't apply?

15  Using Arduino / LEDs and Multiplexing / Current sinking on TLC5940 on: September 17, 2013, 12:12:19 pm
I've just started playing with a TLC5940, and done some basic calculations.

From what I understand, the 5940 sinks current from my 'Arduino LED' ®  collection, 16 of them. Say they draw 20mA each, then doesn't that current eventually pass back to the PSU, via the 5940 ground, pin 22, so pin 22 would have 320mA flowing through it? I've never really seen this mentioned anywhere, but that seems like a lot for a breadboard, I was thinking of bending up the pin and soldering something a bit more substantial to it as a ground back to the PSU (making sure the Arduino is on the same ground, I'm using a separate 5V supply for the LEDs).

Does this sound like a good idea, or one that's just unnecessary?  I know (well, pretty sure) it'll work, I just don't know if I need to do it. I'm using plain old generic breadboard, it's no big deal if I melt it but would like to avoid it.

Pages: [1] 2 3