# irPod
For a long time I wanted a programmable infrared remote, but instead of the hundred-button-behemoth variety, I wanted maybe 6-10 buttons. The thing is, the ones available with very few buttons also look cheap and don't have a good programming UX (maybe you can watch some LEDs for status indication, but mainly you just hope you did it correctly).
Then I got a [flipper zero](https://shop.flipperzero.one/), and I thought my problem was solved. The battery life on it might be okay for many use cases, but when I'm just using it as an IR remote (and it's only in use for a few hours a day at most; maybe 10-20 IR commands per day), it starts to feel underpowered.
Also, I didn't make the thing myself.
So I have an idea to build my own. I would love to make it in a form factor like an Apple TV Remote, or an old iPod (Nano, probably, but I can't resist trying out a clickwheel design). I would love it to have a very low-power screen, like the [Sharp Memory LCD 1.3"](https://www.adafruit.com/product/3502) or perhaps [e-ink](https://www.adafruit.com/product/4196). And for user input I really want to use this [ANO directional navigation](https://www.adafruit.com/product/5001) unit. I just think it's neat.
## Doing it 'Right'
I could go all the way to selecting the smallest microprocessor I could, and programming it with optimized C (or even learn Rust), but that's a _lot_ of new information, and very intimidating.
On the other hand, I could do this like I've done previous projects, by putting an RPi Zero in it and coding it in Golang. That wouldn't teach me much new though, and it's probably way more processor (and thus way _less_ battery-life) than I need.
There is no one 'right' way, so my best guess right now is this:
- Raspberry Pi Pico W (it's a dev board I already have)
- CircuitPython firmware (I more or less know Python, and Adafruit has CircuitPython libraries for the components I'm using)
- Probably a protoboard or piCowbell for the circuitry. If the package size is too large I might try my hand at a custom PCB, but let's get it to a prototype stage before we decide how far we need to take it.
There are probably some other tricks I should learn sooner rather than later, like sleep modes for conserving power. I recently had a look at [pimoroni's code](https://github.com/pimoroni/enviro/blob/main/enviro/__init__.py#L579) for their enviro series of pico boards (based on MicroPython firmware).
If I do make a PCB I could put some of the simpler circuits on it with SMD components. For instance, I could replicate the [charging circuit](https://learn.adafruit.com/adafruit-microlipo-and-minilipo-battery-chargers/downloads) I plan to use.
---
I have made the first prototype! I brought up a Pico W on a breadboard, connected to the Sharp, ANO, lipo charger, and a couple LEDs for status indication.
I haven't started any infrared sequencing, but that can't be terribly hard. I think I'll take a page out of Flipper's book and store the IR sequences as text files, and develop a menu system for the scroll wheel.
A couple of notes:
1. the Sharp display is not lit. It is translucent, and I have carefully separated one from its breakout board so that I could try a backlight. It works. I have more backlights shipping now, as well as thumb-wheel potentiometers. I plan to put the backlight on a circuit with three other elements: thumbwheel potentiometer (for changing the intensity), normal resistor (so that when the pot is at 0 the LED doesn't blow up), and a power switch (because even with pot at the highest, it'll still draw power).
2. I've made a very rough PCB in Fritzing, using the parts bins available from Adafruit and Raspberry Pi. I've even ordered some boards from this design.
- It's nowhere near final, I just wanted to see what I would get for $20 and 2 weeks turnaround.
- I did not place the components accurately, just eyeballed it. Future versions should have proper holes milled and dimensions etc. (Fritzing didn't want to put the part at exactly \[0,0], so I probably will switch to KiCAD)
- I autorouted the traces.
- This initial PCB design does not support backlight or IR LEDs, or even a main power switch!
- It also doesn't have any SMT components on it, so I will solder all the breakout boards directly to it.
- And it doesn't have mounting holes for putting this PCB into an enclosure (other than the holes for mounting the breakout boards to this PCB). My capacity for being clever with 3d printing outweighs my skill with EDA tools.
- The Pico footprint only has two holes milled, at the top straddling the USB connector. Not sure I need to add the remaining two holes at the bottom of the board, but they didn't seem to be included in the part file from the manufacturer. All other breakouts have 4 mounting holes in the PCB.
---
I have received the first round of PCBs! I ordered from Aisler because it was very convenient to do so from Fritzing. I think next time I'll try Oshpark, because it's much closer to me. I soldered one up and realized a few things:
1. my board clamp has a maximum opening. It would be nice to know what that is, so I can design boards that can be held conveniently. Likewise there is a divit in the board clamp, and I should make an effort to put clearance at the edge of the board to accommodate that.
2. Putting the components together in Fritzing made for some interesting automatic holes and pads. I'll probably need to learn more about what those mean in future iterations.
3. I take for granted the benefits of rounded corners.
4. Standoff holes should have a clearance diameter for the nuts.
5. I should probably silkscreen the outline of any daughterboards onto the PCB
6. I ran out of header socket strip, I should order more
7. I like the Sharp display being on a daughterboard (so it lines up well with the nav wheel), but I may need to design it myself if I want to integrate a backlight. The ZIF connecter needs to be closer to the edge of the board to allow the display to be on top of the backlight.
8. the ANO navigation wheel should be mounted directly on the pcb, if I want this thing to have any chance of not being a brick. This means whatever is behind it can't be on a daughterboard (no through-hole), which right now is the charge controller.
9. I do want the pico to be soldered directly on the PCB with its castellated pads. This means I need a keep-out zone under the entire board (and remove some of those extra holes/pads)
10. I could design the PCB to be cuttable, so that I don't need to make two separate orders for display and main board.
11. Might be able to fit a battery in between the display board and the main board...
- [ ] #project #irPod get the pi to talk to IR