Platform forum

Magic wand modification

Donald Fortin , 03-06-2023, 01:34 PM
I am following the YouTube tutorial for the magic wand, I am wanting to change the RGB led to an IR emitter that will send different hex codes depending on the movement of the wand. I am new to this and not sure how to do this. Can I get some direction on this?
qdrives , 03-06-2023, 03:04 PM
Can you be more specific on what topic you need directions?
- IR emitter
- Hex codes (like https://en.wikipedia.org/wiki/RC-5)
- Software
- Something else?
Donald Fortin , 03-06-2023, 03:19 PM
I am a visual type, if I’m following the tutorial on the wand , specifically the schematic design, not sure how to wire the ir emitter connection. I am making the assumption that the microcontroller in this project will work for this when building the PCB. ( I have done a few arduino projects, but I am a complete novice, if I have a video or set of instructions as to what pin to connect to, I can typically build it and make it work). I have already ordered the 3d printed wand , but don’t have it in hand yet. I am assuming that I can’t use a standard arduino nano due to size constraints so I’m basically trying to use original design and change the rgb led to ir emitter. There are only 2 leads coming off the ir emitter, where would I connect them in the current schematic?
robertferanec , 03-07-2023, 02:45 AM
You may be able to connect it to the pins I am using. Looks like there are some existing arduino tutorials and they use just GPIO pins, for example like this: https://github.com/Arduino-IRremote/Arduino-IRremote

It specifically says: "Any pin can be choosen as send pin, because the PWM signal is generated by default with software"

So you would just connect the transmitter diode between +5V and resistor (the same was as I am connecting them now). Just double check if resistor value doesn't need to be adjusted, but you can probably use what I have.

This may also help:
Code now on github The most recent code is at github.com/shirriff/Arduino-IRremote . If you have any issues, please report them there. Do ...
qdrives , 03-07-2023, 01:31 PM
One tip I can give on IR leds - your own eyes are unable to see if they are on or not, but most phones (camera's) are.
Donald Fortin , 03-07-2023, 03:18 PM
Thanks for the responses. I will keep pressing forward.
Donald Fortin , 03-09-2023, 06:39 PM
This may be super simple for most of you, but here is a specific spot I’m trying to figure out. In this magic wand, if I replace the led with tsal6100 ir diode, in following the video to figure out what size resistor I need , I come up with 54ohm resistor. If I read the data sheet correctly, the numbers I used was forward voltage of 1.35, and forward current of 100mA. Did I figure the right size resistor? When I tried to search on jblpcb I couldn’t find it, don’t know if I searched wrong or what.
qdrives , 03-10-2023, 01:42 PM
First, do note that the 100mA is in the absolute maximum rating table. Often a lower current, like a standard 20mA, is more than enough. I once design a high power remote (not for TV though) that needed to be able to cover a distance of 10 meter. I do not recall it drawing 100mA as the current went through a standard PIC micro.

Secondly, resistors are in E12, E24, E48, E96 and E192 series. The most common range is E12: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68 and 82 (times 10^n). For your LED I would pick a resistor in this series. The closed to your calculated 54 ohm is 56ohm and for 20mA it comes to 180 ohm.
Donald Fortin , 03-10-2023, 05:18 PM
Q drives, would you be willing to look at how I modified the schematic and tell me if I did it correctly? I’m reluctant to convert to a PCB until I know I’ve got the schematic right.
qdrives , 03-11-2023, 07:22 PM
If it is only the LED, there should not be many changes.
Donald Fortin , 03-11-2023, 08:16 PM
Here is the file.
qdrives , 03-12-2023, 10:47 AM
1) I would give the gate resistor (R14) of Q2 a higher value than 0E (0 ohm). Something like 47E.

2) The nets on both sides of 14 are called "ID-Diode" - that shorts the resistor. Call the one of the MCU "IR-Diode-mcu".

3) The BAT54 (D1) has a high forward voltage drop at high current. I suggest a better diode like PMEG3010ER https://assets.nexperia.com/document...PMEG3010ER.pdf. Do note, you will need two of the PMEG3010 diodes.

4) With higher current pulses taking power from Vin+, there is only C1 that is 1uF. Looking at the symbol it is a non-polarized type, probably a X5R or X7R. These capacitors are notorious for DC-bias and AC-bias. A better capacitor is this one: C1206C106K4RACAUTO7210​ from Kemet. It has about 20% loss at 5V, so you are left with about 8uF. Alternatively, place this capacitor addinally close to the LED connector and have the MOSFET (Q2) there too.

5) If you go for the 10uF X7R I mentioned in the previous point, you can also use it at the USB power input and replace C3. C3 in the original design is a tantalum capacitor.

6) The current limiting resistor for the LED, R2 will 'burn' the excess voltage into heat. If you want to go to the maximum current in the future (100mA), you may want to use either 2x 1206 in series or parallel, or go for a bigger package 2512. A 1206 resistor is commonly only 250mW. (5V-1.35V)*100mA = 365mW.

7) I see the text 1.27mm at H6, the connector to the LED. I would go for a more standard 2.5 or 2.54mm.

8) Better place a capacitor near H1 (battery connector) of at least 100nF as an ESD protection.
Donald Fortin , 03-12-2023, 10:52 AM
Ok thank you for the direction.
Use our interactive Discord forum to reply or ask new questions.
Discord invite
Discord forum link (after invitation)

Didn't find what you were looking for?