Skip to content

PIC Based Tengu

pic_tengu_delante_detras In this article Juan Mateos creates a PIC version of the Tengu companion. Tengu was originally developed by Crispin Jones as a USB controlled LED matrix that made faces and lip synced to music or other sounds it hears with a built in microphone. Juan created a PIC microchip version as an exercise to learn more about microcontrollers. He provides schematics, PCB designs and source code for his version of the Tengu in this article. There is also a detailed video showing his Tengu in operation with descriptions of the parts and function.

Hello, my nick is jfmateos2 and the video below is a brief presentation about my last project devoted to PIC microcontrollers. The video is in Spanish but subtitled in English.


When I first saw the cloned Tengu developed by Alex featured in Hackaday blog, I thought it was a proper project for learning the use of PIC microcontrollers´ specific functions like A/D converters, interrupts and timers.

After studying the features of the original Tengu developed by Crispin Jones, I started to specify the requirements of my own clone.

I decided to include a basic game intended to transform it into a personalized birthday gift; my sister´s birthday was near.

Its usage is very easy. After connecting PIC-Tengu to a USB port, it will switch on in a sleep state. Blowing on its face he will wake up. Then PIC-Tengu yawns and, if and only if it is the first time we use it, it will start the candles game.

The aim of this game is to blow out the candles one by one, so it can become quite boring if the person being honored is over a certain age, although less painful than pulling his/her ears. Fortunately, my sister is only 25 years old.

A personalized scrolling message appears when the game is over.

Next, PIC-Tengu starts to imitate every noise it hears. There are four sets of faces available: aquiline-nose, snub-nose, no-nose and Luciano. The active set of faces changes blowing or with a strong noise.

The Pic-Tengu audio sensitivity is configurable through the back potentiometer.

Pressing this button toggles between the imitate mode and the scrolling message mode. If we keep the button pressed more than 2 seconds, PIC-Tengu will reset, recovering the same state as if it had never been used before; this implies that the candle games will appear again after awakening it.

Last, if there is no activity in the imitate mode for more than 5 minutes, PIC-Tengu will fall asleep.

The brain of this project is a PIC18F2455, whose pins directly activate the LED’s matrix rows. There is only one LED column active at any given instant, also determined by the PIC18F2455 pins, but this time using an intermediary ULN2803.

The signal captured by the microphone is amplified using an LM358 before reaching an analog input in the PIC.

The firmware is written in CCS C, and the PIC has been burned using the parallel port version of GTP Lite and WinPIC800.

Electronic schematic, PCB artwork, source code and compiled firmware are available for download in

Any further information will be published in forum.

All comments and suggestions are welcome in

Posted in Discovering, Microcontroller, Projects.

7 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. jfmateos says

    There is a mistake in the previous messageĀ“s url:

  2. jfmateos says

    Just released a new version of PIC-Tengu (v1), also available at

    It uses the same hardware as v0, but the firmware has been modified to communicate with the PC through an USB port; so you can change the age, the instructions and the message without reprogramming the PIC.

  3. jfmateos says

    Dear Mr Palleau, the crystal value is 20MHz, and the potentiometer is 1M.

    I will be very pleased to send you an already programmed PIC18F2455; free of any charge, of course. You can get in touch with me at

  4. palleau says

    Hello Mr Mateos, thanks to the new link, it works, now I will try to find a PIC18f2455 in France I can not find even a small question, could you tell me please frequency quartz X1 because I can not find it, please.
    Sorry, but I do neither English nor Spanish, please Google, thank you for your response and good afternoon.
    Sincerely. J.M. Palleau

  5. jfmateos says

    Excuse me palleau. Indeed the link does not work because of the last dot. The link is just

  6. palleau says

    Hello, I have a question, I would have wanted to build “tengu” but in two PCBs but the link does not work you have another link to download them, thank you for your response and good afternoon.
    Sincerely. J.M. Palleau

  7. jfmateos says

    My friend Diego Gonzalez has developed and easier to build version of this project, using 2 single-sided PCB instead of 1 double-sided PCB. You can find al the details in