Skip to main content
Topic: Parts for Breadboard & Schematic Questions (Read 27623 times) previous topic - next topic

Re: Parts for Breadboard & Schematic Questions

Reply #15
I found these links related to building devices with the 40 pin DIP 18F4550 from the Sparkfun page.   I think the 4550 is code compatible with the 2550 used in the USB IR Toy.


Though I wonder if just using the 24FJ might be the better route if it can be programmed with a bus pirate.

//Edited by IPenguin - corrected the broken link to CUI @ UCSB//

Re: Parts for Breadboard & Schematic Questions

Reply #16
[quote author="liyin"]
Can't I just capture the raw IR signal without the need to decode first (using Bus Pirate)?
[/quote]

The Bus Pirate SUMP instructions blog post describe capturing the IR signal using the SUMP logic analyzer.    The problem I had is that in order to get power for the IR detector, I couldn't get it from the bus pirate's 5V or 3.3V pins, since the BP's output voltage is turned off in logic analyzer (SUMP client) mode.   I was able to get 3.3V to drive my IR detector from the ICSP header.

I did this with the Bus Pirate because I waiting impatiently for my USB IR toys to come from Seeed.  Of course if you have a working USB IR Toy you can do the same thing with SUMP without having to do any hardware stuff other than plug it in.

Quote
How is it possible for a learning remote control to save/replay so many different protocols (TV, DVD, Sat, Air Conditioner, Death Star, etc)?

Universal remotes tend to have a lot of codes stored in rom in a tightly encoded format that doesn't require storing the whole sampled wave form.   The learning part requires storing samples.  The learning remotes that I seen store a very limited number of waveforms (usually just enough for each button).

Off the top of my head, two good resources that I've seen recently that talk about storing IR waveforms are the Design of the TV-B-Gone from Ladyada.net and Understanding Sony IR remote codes, LIRC files and the arduino library on Ken Shirriff's blog.   Since you mention AVRs, you might want to check the  Arduino IR library on that blog.

Hope This Helps,
--Rob

Re: Parts for Breadboard & Schematic Questions

Reply #17
Hey liyin,

Most of these are answered in the USB IR Toy article, I'll do my best to cover them here too.

- I saw the PIC18F2455 was the PIC18F2550 with 24K Flash memory, but USBIRToy.hex firmware is ~25K. I read about PK2AVRISP at the blog, sounds like a good option.
The firmware is compiled for the chip, so the .hex is the size of the whole chip. You'd have to try a test compile to see if it would fit (probably).

- I noticed 2 IRRX lines @ pins 25 & 23, and the line coming from RX. How does that work?
Please see the article for more, but the idea is there are two interrupt pin types and the IR Toy let's you play with both. The pin is set by a #define in the code.

- What are PGD & PGC @ pins 28 & 27?
Programming pins, see also the article.

- I understand I can connect the Bus Pirate to pins 18 & 17 (UART data), and ignore pins 16 & 15 (USB data)?
You could, but there's no software support for this yet. There's probably more in the 'firmware' and 'taking it further' sections of the article.

- What's the purpose of having two capacitors in parallel @ pin 14 (VUSB) going to ground? USB VBUS provides Vcc.
Please see the hardware section of the article - the internal 3.3volt USB vreg requires 0.22uF external caps (I used 0.1uf*2).

- Can't I just capture the raw IR signal without the need to decode first (using Bus Pirate)? How is it possible for a learning remote control to save/replay so many different protocols (TV, DVD, Sat, Air Conditioner, Death Star, etc)?
Please see the Firmware: RC5 decoder and raw IO mode section of the article for a detailed explanation of this with logic analyzer captures etc. Basically, you can do something like that, but you'll need to write the software and firmware to support it (either on the IR Toy of Bus Pirate) because the current firmware/software doesn't support it (yet).
Got a question? Please ask in the forum for the fastest answers.

Re: Parts for Breadboard & Schematic Questions

Reply #18
1) What would be a good substitute for the Vishay TSOP98200 IR receiver module?

It is a "wide-band IR sensor for code learning and IR extender applications ... developed to address the growing need for an AC-coupled IR sensor covering the entire remote control bandwidth of 30 kHz to 455 kHz."

http://www.vishay.com/company/press/releases/2007/070209wbir/
http://www.vishay.com/ir-receiver-modules/list/product-84795/

2) EDIT: Thanks rsdio, I was using the full-size schematic you get when clicking the link under the schematic image. Instead of a date, it says "not saved!". The one in the image and inside the IR Toy 1.0 Zip archive has R2 at 390Ω, and is dated "1/21/2010".

Re: Parts for Breadboard & Schematic Questions

Reply #19
2) R2 is 390Ω on the schematic, and connects to the Indicator LED. I assume that R2 appears on the parts list twice so that people who want to buy a reel of similar parts can use 390Ω twice instead of 390Ω once and 2k7Ω once. The Indicator LED specs show that Vf stays below 2V for 20mA (look at the graph).

Starting with the power source, USB, you have a wide variance. USB delivers between 4.01V and 5.25V, depending upon whether you plug directly into a host, a powered hub with a crappy regulator, or an unpowered hub. Then, the PIC usually puts the full voltage out on its port pins, but there may be as much as 0.7V lost there. In other words, there could be as little as 1.5V across R1, giving 3.8mA. At the other extreme, there could be as much as 3.45V, giving 8.8mA. I used the 390Ω value for R1 - the current with 2.7kΩ would be lower, of course.

Keep in mind that it's not necessary to dial in the full current because an indicator LED will be plenty bright with less current. You don't want to be blinded by today's high-brightness LED!  25mA is too much anyway, because if you design for that then variations may cause the actual current to exceed 25mA and burn out the LED. 20mA is probably the most you're going to get out of the PIC port, but again, designing for 20mA could burn out the PIC if voltages vary. I'd predict that the LED would be bright enough with as little as 2mA or even 1mA. I have one bright white design where less than 2mA is still blinding me (because I have to look at the raw board for other reasons when the LED is on), so I plan on increasing the resistance in future prototypes.

Re: Parts for Breadboard & Schematic Questions

Reply #20
R2 in the schematic and parts list @ Prototype: USB infrared remote control receiver/transmitter says 2.7KΩ, but in the schematic inside the USB IR Toy 1.0 Zip file R2 is 390Ω.

I'm not talking about the smaller image on that web page (you can see R2 is 390Ω), but if you click the link "Click for a full size schematic image [PNG]" you can see 2.7KΩ for R2 (this is the schematic with "not saved!" for a date).

rsdio, do diffused LEDs bother less?

Re: Parts for Breadboard & Schematic Questions

Reply #21
Well, my long-winded answer was intended to explain that either 390Ω or 2700Ω would produce far less than 20mA, and that's just fine.

As for diffused LEDs, my problem is that I am looking at a bare board during the hardware and firmware design stages, when the customer will only see it through the bezel in the case. The LED is a lot brighter when there is no case. Also, I'm designing a bus-powered USB device, so I strongly prefer using 1mA to using 20mA, because it drains the laptop slower and/or leaves more current for other circuits. Sure, we're talking less than 4% of the maximum current allowed, but if you want to run on as little current as possible then every little bit helps. Plus, right now the LED is maybe 8% or more.

Re: Parts for Breadboard & Schematic Questions

Reply #22
Reading about the Arduino it seems possible to use its IDE to program ATmega chips for use in your own projects without the need for the standard Arduino board (using a programmer, etc).

Is it feasible to use the Arduino IDE to program AVRs to replace PICs in a project like the IR Toy?

Re: Parts for Breadboard & Schematic Questions

Reply #23
You could port the code to an AVR. Arduino, as far as I know, doesn't support USB peripherals on any chips, so you'd need to convert the code to a serial port and use a serial connection to the PC or USB->serial converter (like Arduino uses).
Got a question? Please ask in the forum for the fastest answers.

Re: Parts for Breadboard & Schematic Questions

Reply #24
Post moved to Arduino board.

Re: Parts for Breadboard & Schematic Questions

Reply #25
Finally got the parts and started with a simple IR circuit, (Win)LIRC, on a breadboard (voltage 1N4148-GND is 10V).

I'm using a GE Universal remote control (24944) programmed with Phillips TV code 0062.

EDIT: Moving up from WinLIRC (awkward & outdated) to IgorPlug serial port circuit. Found Girder v4 works better with the new IgorPlugXP plugin (for USB & COM circuits, Windows XP, 7.16.2005).

Re: Parts for Breadboard & Schematic Questions

Reply #26
Can't recommend using WinLIRC, be aware that the driver controls the voltage powering the circuit.

Will check other serial port circuits, like IgorPlug plugin for Girder, before moving to USB.

Re: Parts for Breadboard & Schematic Questions

Reply #27
Success, made my first serial IR circuit, not thanks to the author who has incorrect circuit diagrams that don't work.

Now I have a reference and test bed for future circuits.

Re: Parts for Breadboard & Schematic Questions

Reply #28
1) TSOP4838 IR receiver IC voltage at Vs leg is 5V, but the OUT leg is 3V. Is it because the IC is designed to interface with a MCU, and how is this accomplished? Can you tell from looking at the block diagram below?





2) What's the purpose of connecting the output line with a resistor to the Vs/Vcc line?


Re: Parts for Breadboard & Schematic Questions

Reply #29
[quote author="liyin"]
1) TSOP4838 IR receiver IC voltage at Vs leg is 5V, but the OUT leg is 3V.
[/quote]

I'm pretty sure the Panasonic PNA-4602 I've experimented with puts out 5V if Vcc if 5V, or 3.3V if Vcc is 3.3V.

Quote
2) What's the purpose of connecting the output line with a resistor to the Vs/Vcc line?

Someone more experienced than me should comment, but I think that's a pulling the out to 5V (if you are getting 5V or more from the RS-232 port after the zener clamps it to 5V).  However, the receiver you are using already has an internal 33Kohm pulling out to Vs, so I don't think you need an additional one.

R1 (100 ohm) in the Application circuit is for protection/current limiting.   You need to decide if you need that for your circuit.