The PIC16F1847 microcontroller is U1 in Schematic 2.
The PIC has 14 Kbytes of Flash program memory, 1 Kbyte
of data memory (RAM), a universal asynchronous receiver
transmitter (UART), a synchronous serial port (SPI), and a
10-bit ADC. The PIC’s internal oscillator is programmed to
operate at 16 MHz.
U40 is a MAX232 five volt powered RS-232 interface
with two drivers and two receivers. One receiver/driver pair
handles RS-232 data to/from the ROBOEAR.
The other receiver/driver pair handles the control lines
RTS and CTS.
If you have an FTDI TTL-232R-5V USB-to-serial adapter,
you can connect it at J7, which eliminates the need for the
MAX232. The ROBOEAR supports baud rates from 9600
to 76800. Typically, the ROBOEAR receives RTS and sends
it back to the host as CTS, but flow control can be used by
changing the jumpers on J5. The ROBOEAR has three analog
channels. Each channel has a microphone input and two
op-amps packaged in a single MCP602. The analog circuitry
is shown in Schematic 3.
The ROBOEAR is designed to work with most
inexpensive electret microphones that have an output
impedance of approximately 2,200 ohms. The microphone
is AC coupled to the first op-amp that is configured for
a positive gain of 100. The output of the first op-amp is
AC coupled to the second op-amp that is configured for a
negative gain of 10 and a low-pass roll-off of 4,800 Hz.
The final component in each channel is the MCP3001
ADC) The MCP3001 is a successive approximation
10-bit ADC with onboard sample and hold circuitry.
Communication with the ADC is done using a simple serial
interface compatible with the SPI protocol. Although the
PIC has an internal multi-input ADC, it’s not suitable for this
application. The PIC has one ADC with an analog multiplexer
on the input; thus, it does sequential conversions.
Because cross-correlation depends on knowing the value
of multiple inputs at the same points in time, simultaneous
sampling is required. This is accomplished by connecting the
clock and chip-select inputs of all three ADCs in parallel. The
serial data outputs go to three inputs on the same PIC input
port. The serial output from the ADCs is stored by the PIC in
packed format and unpacked into individual channels after
Schematic 1. ROBOEAR power supply circuitry.
Schematic 2. ROBOEAR
microcontroller, RS-232, and
SERVO 09/10.2018 45