Monday, April 2, 2018

ESP8266 IR Receiver

The project I have in mind has to mimic IR signals from remote control devices for audio/video devices like TV, receiver, set top box, etc. The IR signals have to be sent out in formats specific to each device. In order to send the IR signals, the first step is to receive sample signals and analyse them. This is what this post is about.

I am looking at using a NodeMcu Devkit for the ESP8266 and an IR sensor to capture the IR signal format. The ESP8266 also has a web server running and the UI uses this. The raw IR data is then sent to a browser on request. The analysis is done on the browser and the results displayed.

An ESP8266 Web Server

A web based micro SBC has always been on my wishlist. It wasn’t the internet connectivity that was the attraction – it was the support for a browser based UI. A hardware based user interface is so limited and clunky. Having a software based GUI is always great. In the old days, it would have been a serial port and a windows program front-end talking to it. With a web based micro, I can have a rich, browser based UI. Then it was Ethernet based PIC solutions like the 18F67J60. Enter the ESP8266.

Saturday, August 24, 2013

PCB Design Goofs and fixing them

As mentioned in a previous blog, the PCB I designed and ordered from Itead arrived and I started assembling it. Once I got going, I discovered a few problems. Itead did its job immaculately but I managed to make quite a few mistakes - some big, some small. Some involved just fixing the design, some involved tweaking the KiCAD library. I am continuing to test the board and am likely to find a few more. Once all the circuit bugs are ironed out, I can order a fresh set.
One of the great things about KiCAD is all its files are in text format. This allows me to look at and fix things without trying to find a parameter in a dialog box.

Thursday, August 22, 2013

A Plastic Sanga Case for my PCB

Soon after ordering the PCB, I came across Seeed Studio’s acrylic laser cutting service. Once the PCB is assembled and tested, it would be nice to have an acrylic case for it.

The current trend for acrylic cases is the plastic sanga. The other option is the case put together with slots and screws. I don’t much like this look so I opted for the plastic sanga.

Ordering PCBs from Itead Studio

The last time I designed and got a PCB ordered was in 2010 and it cost $125 for 5 pieces. As expected, there were a few mistakes in the PCB design and a second batch never got designed.

This time around I found that there were other sources more suitable for hobbyists. The widely mentioned ones were Seeed and Itead. They offered what appeared to be a 50x50mm PCB for $10 which seemed reasonable. But, no, it turned out it was $10 for 10 PCBs! That is like a buck a PCB. This changed the entire way I looked at PCBs.

Monday, July 8, 2013

An Interrupt based DCC Decoder

In the early days of DIY DCC decoders, the preferred method of DCC decoding logic was to write precisely metered sections of hand-written assembly code that sampled the DCC input. These were based on the venerable 16C84 running at 4MHz.

But with modern PICs running at 32 MHz and over, it is possible to write an interrupt driven DCC decoder. This means no more intricately hand-coded assembly. You could write it in C without worrying too much about the code generated - within reason. So what is a good interrupt period to sample the DCC input? OK, 22us. But how accurate does this period have to be? Can we use the internal oscillator in a PIC? Yes, we can!

Saturday, July 6, 2013

A Small N Scale Layout

My previous layout was simple dog-bone that was 2800x460mm to fit on top of a wall unit. This time around I had much less space – 1200x600mm. The old one was well above eye level and most of the layout was out of sight. This time it is just 60mm off the floor and the whole layout can be sighted.

It is not based on any prototype. Truth be told, it is a test bed for my DCC project so all I wanted is enough complexity in this small space. In order to provide this complexity, I have pushed the specs up to and, possibly, beyond the edges of sanity. Future operations will tell if this was a wise decision.