Tickernut circuit design and hardware:
The motherboard is shaped
to fit tightly inside a standard ABS jiffy
box which set its limited size. The box has cutouts to expose all
motherboard connectors on the
left side and a small speaker and antenna has mountings on top.
panel is drilled to accommodate switches and LEDs with a cutout above
having a bezel with a transparent window for the alphanumeric LCD.
Above that, a window for the infrared remote receiver is covered with
The Tickernut's main board
is constructed using phenolic prototyping
spot board. The processor, memory and all peripherals other than the
front panel controls are mounted on this board. The core of the design
is based on Egnite's Ethernut reference design v1.3 rev. G and initially used the
same major components, an ATmega128 processor, 32k static ram and
RTL8019 network interface. These were arranged into the same memory map
as the Ethernut design allowing the firmware to run unmodified.
Peripherals located on the motherboard include the memory card, radio
audio amplifier, RS232 interface, in-circuit programmer, brown-out
monitor, real time clock and power
supplies. Much of the circuit wiring is point to point between solder
stakes and to keep the wires neat they have been laced together into a
The first processor used was an
ATmega128, then one of the higher end devices in Atmel's
AVR microcontroller range. It is a great chip, one of my favourite 8-bit microcontrollers. It has 128k of
program flash, 4k of static ram, handfuls of on-chip peripherals and
is only available in a 64-pin surface mount package.
The processor was mounted on a hand made breakout board that provides
standard spacing between pins to allow the whole unit to socket
straight into the
Most of the processor's support components including the
system clock crystal, 32k real time clock crystal, DS1233 brownout
monitor, analog supply and decoupling are mounted on the motherboard
inside the area used
by the processor socket leaving the area around the outside of the
socket free for peripheral
The system was initially clocked at 14.31818 Mhz. This clock speed was chosen as
it is an easily obtainable crystal and proved close enough to the
Ethernut's original specification of 14.7456 to allow serial
communication to work without firmware changes. This proved very handy
during initial testing.
The memory module consists
of a 74als573 octal buffer and 32K of static
RAM on a small scrap of prototyping spot board with a large connector
that sockets vertically into the motherboard.
The separate module was
constructed to hold the memory because I ran out of space when planning
the layout and couldn't find an arrangement that would easily allow the
memory chips to be mounted directly on the overcrowded motherboard.
The memory module sits on the processor's external memory bus and
functions independently of all other peripherals. It exposes the
demultiplexed address and data bus lines from the processor for use by
the network module. The memory module is positioned close to the
processor and the physical connections are short enough not to require
Network Interface Controller:
The network interface
module is a Realtek RTL8019 NIC chip on a
small carrier board with a crystal, network transceiver and RJ45
connector. This module interfaces power, interrupts, address and data
bus through two 20-pin connectors. The network module requires address
and data signals from the memory module and will not function if the
memory module is not present.
The network module as I obtained it was wired to only provide the low 5
bits of the address bus but it had many spare pins on the connectors.
To avoid extra decoding hardware or unsightly software hacks the
module was modified to make the remaining 11 address bits and 3 status
LED signals as well as another reset signal available through the spare
A 74hc00 quad NAND on the motherboard matches the network module's
suit the system bus. It is wired as inverters, one on the A15 line to
map the NIC's registers directly above the 32K memory space while
another corrects the sense of the NIC's interrupt signal before it is
fed into the processor's INT5 pin. A third inverter flips the
motherboard's active low reset signal to suit the NIC's reset
requirements. (Note - this section of the circuitry was later completely rewired to provide the full 40K of RAM, more details later.)
Originally, the transceiver was based
inexpensive transmitter and receiver modules on the 434MHz LIPD band.
According to their datasheet they were originally designed for garage
door openers. These proved to be poorly suited to the job. Communication was so slow and error prone as to be practically useless.
The transmitter's modulation method is simple on-off keying
(OOK), These modules
were rated to max out at 5000 bps and seem to work best at 2400 baud. After adding protocol overhead this halves to 1200 baud. The receiver uses a simple circuit
known as a bit slicer to recover
the serial data stream. This allows the modules to be connected
directly to the microcontroller's second USART, RxD and TxD lines. I got them to work in the end but was not happy with their performance at all.
A major update to the design introduced nRF24L01+ radio modules to the system. These proved far more successful and are able to provide an effective, robust communication link. These connect using an SPI interface, which became available when the CPU was upgraded to the ATmega328p with a USART capable of SPI.
The audio system is driven
by a pulse width modulated signal from the
microcontroller's second timer on OC1B (PB6). The modulation frequency
is high enough to not require filtering. The PWM is ac coupled through
volume attenuator before being fed to an LM386 audio power
amplifier. The output of the amplifier is stabilized by a Zobel network
and is made available to the speaker through a connector on the
The power supply for the audio amplifier is somewhat choked by heavy
decoupling and is below the LM386's minimum operating voltage
specification of six volts. For these reasons the audio output clips sometimes and could hardly be described as hi-fi.
TickerNut's enclosure with the mylar squeaker baffled in
the top turns out to be an effective resonator and the squeaker
does not need to be driven full blast to be heard loud and shrill. This
allows the underpowered amplifier to be driven at a level it can easily
sustain. Announcements and speech are clear and legible and easily loud enough to require a volume control.
In the original design, interference issues meant the amplifier could not produce sound while the
radio modem was in operation. After the upgrade and with better audio drivers the system is now virtually noiseless all the time and sound is pretty much seamless without clicks or pops.
The main 5 volt supply
rail is monitored by a DS1233 Econoreset. This chip is conveniently
packaged in a TO-92 enclosure with just three pins which made it a
simple matter to connect it to the circuit inside the processor socket
area. The DS1233 watches for sags in the supply rail and activates the
reset line when a brownout is detected. It also debounces the reset
button which is located on the front panel.
The microcontroller includes it's own brownout detection
circuitry but having the external monitor ensures the network module is
always in a known state when the processor comes out of reset.
ISP programming port:
The processor's in circuit
programmer is accessible
through the serial RxD and TxD lines in combination with the SPI clock
and system reset line. These four signals are made available along with
earth and jumpered power over the 6-pin Atmel ISP socket which is
exposed through a cutout in the case. Another jumper isolates the
on-board power supply allowing device powered and device powering
programmers to be selected.
The microcontroller's ISP shares it's serial communication pins with
the first RS232 port. To prevent the RxD output of the serial line receiver from interfering with the programmer's MISO signal it is
coupled to the shared RxD line through a 4.7k resistor. This allows the
serial port to function normally until a programmer is connected. The
programmer can easily override the weak serial signal and control the
processor without trouble although anything connected to the serial
port gets bombarded with nonsense during programming.
The RS232 communication is
used for debugging. In Nut/OS it has been
assigned to stdout and stderr making it the default output device for
the stdio library.
The first USART on the microcontroller is level
translated through a MAX232 serial line driver and brought out a
9-pin D-sub connector. the CTS and RTS handshake signals are also
routed from the MAX232 to the connector but are not connected to pins
on the microcontroller as they are not currently needed.
Front panel control board:
The only circuitry in the
Tickernut not on the motherboard is on the front panel
Peripherals on this board include the alphanumeric
LCD display, infrared receiver, bi-colour status LED, network status
LEDs, reset button and power
The front panel is connected to the motherboard by a
shaped 20-conductor connector socketed at both ends. The control board
is held to the front board by the nuts on the two switches.
The backlit alphanumeric
LCD display is used for reporting device
status and debugging. It is a standard Hitachi HD44780 compatible unit
with green LED backlighting. The LCD is connected directly to the
microcontroller with the 4-bit bus DB4-DB7 going to PD4-PD7 and RS and
Enable going to PE2 and PE3.
To save microcontroller port pins the read/write signal from the
display is not utilised. This means the processor can only write data
to the display. The LCD device driver provided with NutOS allows for
this and works perfectly through just six connections to the LCD.
The LED backlight is powered through a current limiting resistor and is
permanently wired on. There is provision in the loom for backlight
control but this feature was considered low priority and the switching
circuit is yet to be installed. Now, as the system currently stands I have no free pins. Isn't that always the way?
The infrared remote
control reciever is based on an integrated reciever
module scavenged from a satellite decoder set top box. It is positioned
on the control board so it peeks through a window in the front panel
when the control board is mounted. Powered with a well-decoupled
supply, it delivers it's demodulated output directly to the INT4 pin
PE4 on the microcontroller where it is decoded in software.
The decoding routine implements the NEC infrared protocol rather than
the more frequently implemented Phillips RC5. In my experience the NEC
protocol is more commonly used on modern consumer devices. During
testing more than half of a random selection of a dozen junk box
remotes were found to use NEC's standard including the one remote that
was close to ideal for use with the Tickernut.
System status LED:
The overall status of the
TikerNut can be determined at a glance by checking the bi-color status LED. This
is connected to the microcontroller pins PE6 and PE7 through two
current limiting resistors.
The pins are
energised using pulse width modulation allowing the brightness and
color of the status LED to be easily set from green through orange to
In normal operation the LED presents a pulsing heartbeat to show the system is alive. The pulses are green to indicate good health while
other colors indicate problem states. Current status reports have LAN
connectivity issues pulsing orange and radio connectivity issues pulsing red. The LED also briefly blinks red on infrared remote reception and blinks yellow during SD card access.
Network status LEDs:
The three original network
status LEDs proved quite handy, showing link status and network
activity. Originally they were mounted directly on the network
module and would have been obscured within the case.
To make the LEDs
visible they have been repositioned to the front panel and the status
signals have been routed from the network module to the control board.
The internal power supply
produces and regulates the main 5 volt rail which supplies power to all
of the components throughout the system.
The input to the supply is designed to suit a wide range of low voltage
adapters and it can use either AC or DC between 7 and 15 volts with at
least 500 milliamps.
A supply fuse is mounted on the motherboard to protect against possible
fire hazards. It is first to receive the supply voltage after it
returns from the front panel power switch. A bridge rectifier then
sorts out supply polarities and connects negative to ground. Supply
positive is fed via a reservoir capacitor to a 7805 linear regulator on
a small heatsink. The output of the regulator connects via another
reservoir capacitor through the supply isolating jumper before feeding
the main 5 volt rail.
Additional to the original design is the addition of an LM35 temperature sensor to monitor the heatsink and voltage dividers to monitor voltages before and after the 7805 regulator. These monitors feed their analog outputs to ADC inputs 0, 1 and 2 on the CPU and are sampled a few times a second to check for out-of-range conditions and can shut down the Tickernut to try and prevent damage. I felt this could prove wise given the brutally hot summers we have been having in Australia.