Arduino Clone With A Microchip PIC Co-Processor

manny_clone

Some time ago I asked our intern, Manny, to design an Arduino clone.  This was primarily  a learning exercise.  He’s worked with the  Arduino platform one some projects, and created schematic/PCB/firmware for a Microchip PIC based project.  This project was designed to combine those experiences to create a more generic tool.  I felt the results of his effort were pretty cool, so I thought I’d share some of the concepts here.

Some of the things he was able to explore included designing a communication protocol between microcontrollers (Atmega328P <-> PIC16F1829), layout of a printed circuit board with components on both sides, and creating a compact and clean electronic design.

For specifics on programming the Arduino bootloader into the Atmega328P you can take a look at my post Creating an Arduino Clone.  That post details how you can replace the microcontroller (U3) on an Arduino Uno with an FT232RL USB-to-serial converter (Google FTDI for the manufacturer if you feel like it).   I’ve found using the FT232RL to be useful as your clone only relies on the Arduino bootloader file to be “an Arduino” and not another microcontroller to convert USB communication to the serial protocol used by the bootloader.

In the circuit below R8, R9, C11, and D3 convert the serial DTR line to a reset pulse. That allows the Arduino software to enable the bootloader on the ATMEGA328P and download scripts.  I also like that the FT232RL will drive TX and RX LEDs during communication, because the more flashing LEDs the better.

 

manny_clone_ftdi_schematic
For the PIC co-processor, two i/o lines were connected from the ATMEGA328P to the hardware UART of the PIC16F1829 (shown in the schematic below).  This allows the use of the software serial library on the Arduino side of things.  On the PIC side serial communication is interrupt driven, making it very responsive.  The PIC operates off of a 32MHz internal clock, which is fast enough for a variety of applications.

 

manny_clone_pic_schematic
In Manny’s first iteration, the PIC firmware implements a communication protocol that allows the Arduino to configure additional digital i/os and control three PWM outputs that are also tied to a tri-color LED (remember, the more LEDs the better!).  In future firmware iterations the PIC could be used to act as a PID motor controller, digital filter for analog measurements, or implement some functions based on external interrupt signals.

Speak Your Mind

*