Show Posts
Pages: [1] 2 3 ... 7
1  Using Arduino / Sensors / Re: IR receiver module returning outputs from unmodulated sources on: April 15, 2014, 02:12:17 am
I agree with AnalysIR: not a good idea, though I did find some references on the web to a system like that. Why it is probably not a good idea:

all gaps are 600 us, that will be 12 cycles of 50 us, the interval time of the interrupt handling IR in the library
a zero will be 600 us after a gap, another 12 cycles
a one will be 1200 us after a gap, makes 24 cycles

Now you don't get the exact number of 50 us cycles, so to detect a 600 us my code accepts anything between 450 us and 750 us, the same for a 1200 us gap. So the fault margin is 150 us around the length of a (part of the) signal. In order for your idea to work you would want something like

between 300 us and 600 us:  a 0
between 600 us and 900 us:  a 1
...
between 3000 us and 3300 us: a 9

but that would make the signal length so much longer than the header, and these sensors are not made for long signals that stay the same. So: not really a go.

TSOP 348__ with __ being the frequency in kHz, no other differences, use whatever everyone in you area is using for compatibility. We went with 36 kHz.

there is a difference between 4838 and 34838, the latter being newer, so I would advice to use those.

Cheers,

Jack
2  Using Arduino / Sensors / Re: IR receiver module returning outputs from unmodulated sources on: April 14, 2014, 03:20:52 am
Stray signals will not hog your system if you use the IR library: the library uses an interrupt to read incoming IR signals, but as soon as a packet (any size) has been received it will stop buffering incoming signals until you process the packet - even if it is a stray one. To see if a packet has been received there is a flag, you determine when to check for this flag, and that will determine the amount of hogginess of your system.

What /is/ possible is that intended packets are lost between the amount of stray signals, but luckily... that doesn't appear to be the case.

Where do you live, as in: what suppliers do you have? I get tsops for over 1 euro each, but in quantities the price will go down.

Cheers,

Jack
3  Using Arduino / Sensors / Re: IR receiver module returning outputs from unmodulated sources on: April 13, 2014, 02:56:09 am
Mate,

it will work eventually. I have a running lasertag system with arduino. My receivers are TSOP34836 (vishay) and my leds are TSAL6100. Modulation frequency 36 kHz, I use a led current between 10 mAmps and 1000 mAmps (will fry the led eventually, but for a sniper, well worth it). My IR code is based on Ken Shirriffs IR library. My packets are 16 bit long with a good preamble - before the first bit arrives the signal is continuously on for a "long"  time (long in milliseconds).

Yes, in sunlight I get some stray packets due to interference, but mostly only 3 or 4 bits long. So I only process packets exactly 16 bits long. This is what the IR library does for you. As of yet I have no statistics on how many packets sent are well received in sun light, but I can tell you: the game is more than playable, so it shouldn't be a problem.

Take the advice above: try a quality receiver.

Cheers,

Jack
4  Using Arduino / Sensors / Re: AnalogRead powers Arduino while measuring voltage battery pack on: April 13, 2014, 02:41:10 am
Thanks to hear it confirmed, I suspected something like that. But as long as the chip gets power I can connect the battery directly to an analog pin.

If I shut down power, the 10k resistor would be the right way to prevent parasitic powering?

I might actually build the on off switch in such a way that it also disconnects the wire to the analog pin, but I have a few projects where this is not the case.
5  Using Arduino / Sensors / AnalogRead powers Arduino while measuring voltage battery pack on: April 13, 2014, 01:22:46 am
My battery is about 4 Volts, I use a dc booster to get it to a nice clean 5 Volts. To check if my battery is drained I want to measure it's voltage with an analog pin, so I connected the + of the battery directly to one of the pins. If I remove power from the Vcc pins of the arduino, it does not shut off: it drains power through the analog pin. This is not what I want. I fixed it by adding a 10k resistor between the + of the battery and the analog pin. It does leave me with questions:

* was it bad to connect the battery directly to the analog pin, or is there only a problem if the Vcc gets no power ?
* is there a more official solution to this ? is there a solution without the 10k resistor ?

Cheers,

Jack
6  Using Arduino / General Electronics / Re: Cheap MicroSD card socket on: April 07, 2014, 05:30:09 am
Thanks for sharing, that is quite an impressive project !

Cheers, Jack
7  Using Arduino / General Electronics / Re: Cheap MicroSD card socket on: April 06, 2014, 09:07:49 am
... wow ... that is also a very elegant solution. It might not beat the added 3v3 regulator and the 4050 chip on the smd board, but I might use this for another project, cheers !
8  Using Arduino / General Electronics / Re: Cheap MicroSD card socket on: April 06, 2014, 02:58:06 am
@dave-in-nj: that first one (131132034753) is spot on ! What a beautiful find ! I can't replicate them for that price, thank you so much. I see I should use ebay more often as a place to look for good and cheap electronics. Apart from ebay (and dx.com), would you recommend any other site to check out before inquiring here at the forums?

@markT: hahaha, I wish my project would need a 1000, that would mean a 1000-person lasertag game, that would be epic ^^ I'll settle for the above from ebay, but your input is appreciated, thanks

Cheers,

Jack

9  Using Arduino / General Electronics / Cheap MicroSD card socket on: April 05, 2014, 09:48:59 am
I'm looking for a MicroSD card socket like:

http://www.adafruit.com/products/1660

It seems rather expensive for what you get. If anyone has found a cheap source of a component like this I would gladly hear of it!

Cheers,

Jack
10  Using Arduino / Audio / Re: Replacement for TBA820M audio amplifier chip on: April 04, 2014, 11:56:54 am
Thank you all for your kind replies.

The LM380-N indeed requires a too high supply voltage.

It's interesting that you offer a TPA amplifier, because I just ordered one and tried it to my satisfaction. It's the TPA6203A1, 1.25 W Into 8 Ω From a 5-V Supply:

http://nl.farnell.com/texas-instruments/tpa6203a1dgnr/class-ab-audio-amp-1-25w-8msop/dp/1697161

for about 50 cents incl. tax. I have the luxury I can make my own breakout boards, though a dip version would be less of a hassle. My arduino coughs out 10 kHz 8 bit sounds with PWM and the result is more than adequate for my project (loud pew pew sounds from a laser tag gun).

I already was afraid it would be hard to find a good dip version replacement, but this smd amplifier will satisfy my needs.

Cheers,

Jack
11  Using Arduino / Audio / Re: Replacement for TBA820M audio amplifier chip on: April 02, 2014, 03:58:14 pm
Just similar specs will do, anything that will crank out about the same volume. I do prefer through hole. The chips on mouser all seem smt.
12  Using Arduino / Audio / Replacement for TBA820M audio amplifier chip on: April 02, 2014, 01:39:57 am
Hello all,

it seems the TBA820M chip is no longer available with my supplier, they say it is out of production. It's a 1.2 W audio amplifier, mono, with some peripherals (resistors, capacitors). It works well with a 8 ohm speaker. The price for the chip was about 40 cents. My supply voltage is 5 V.

I have tried the LM386N, though it's only a 0.5 W amplifier, meant for a 4 ohm load. Indeed I find the volume too low.

I have tried the TDA2822M, a 1 W amplifier, but also meant for a 4 ohm load; again: volume too low

I'm looking for a good replacement in the same price range. Any suggestions are welcome.

The application is sound for a laser tag gun.

Cheers,

Jack
13  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01+ and RF24 lib ack failure on: November 18, 2013, 03:46:08 pm
I have found the culprit I think:

Code:
void RF24::print_address_register(const char* name, uint8_t reg, uint8_t qty)
{
  char extra_tab = strlen_P(name) < 8 ? '\t' : 0;
  printf_P(PSTR(PRIPSTR"\t%c ="),name,extra_tab);

  while (qty--)
  {
    uint8_t buffer[5];
    read_register(reg++,buffer,sizeof buffer);

    printf_P(PSTR(" 0x"));
    uint8_t* bufptr = buffer + sizeof buffer;
    while( --bufptr >= buffer )
      printf_P(PSTR("%02x"),*bufptr);
  }

  printf_P(PSTR("\r\n"));
}

So if name is more than 8 characters extra_tab gets the value 0. printf will attempt to print this in the line:

Code:
  printf_P(PSTR(PRIPSTR"\t%c ="),name,extra_tab);

so a zero gets added to the string. This is not visible in the serial monitor window, but will cut of the string in the clipboard. CTRL+A, CTRL+C and CTRL+V will not work in that case.

Cheers,

Jack
14  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01+ and RF24 lib ack failure on: November 17, 2013, 02:21:33 pm
Notepad gives the same results as the forum editor.
15  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01+ and RF24 lib ack failure on: November 17, 2013, 12:48:01 pm
Ah, I see I haven't been too clear about what I did. I did try to ctrl+A, ctrl+C and then ctrl+V. If I try to paste what is shown in the window above I only get:

Code:

SimpleSender

STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1

and that is either all there is in the clipboard, or for some reason it stops pasting after that point. Mind: after RC_ADDR_PO-1 it pastes a TAB, and then it ends.

I was comparing the sketch you posted above to the GettingStarted sketch which is provided with the library you use. I could not find a functional difference. My guess is the above sketches are working for you, and I was wondering whether you made certain choices in programming that sketch which differ from the examples provided.

Cheers and thanks in advance,

Jack
Pages: [1] 2 3 ... 7