Professional Documents
Culture Documents
Table of Contents
Introduction3
Embedded System..3
Digital-to-Analog Converter..4
Rationale4
Operation of Digital-to-Analog Converter.4
Operation of Embedded Subsystem Integration....4
Implementation..5
Explanation of Circuitry.....5
Explanation of Code............6
Verification Testing...............10
Validation Testing................11
Results from Integrated System........12
Integration Without Black Box..........12
Discussion12
Value Statement....13
Conclusion14
Appendices...14
Table 1: Bill of Materials...14
Table 2: Gantt Chart...14
Introduction
The purpose of this lab is to create 4 embedded systems that adjust and manipulate waveforms to
deduce the inner workings of a black box (Figure 1). There are four embedded systems in this lab
Keypad, Digital-to-Analog, Digital Potentiometer, and Analog-to-Digital Converter Subsystems:
Embedded System:
The Analog-to-Digital Converter (ADC) subsystem will sample the output of the black
box at 100 Hz and manipulate the samples through a PC.
The Keypad subsystem sends commands to the DAC, DigiPot, and ADC subsystems to
start/stop them as well as to choose a specific output.
Digital-to-Analog Converter:
3
Our embedded subsystem was the Digital-to-Analog Converter which recieved commands from
the Keypad to create 4 waveforms peak to peak with 3.3V:
Sine Waveform 1 Hz
Sine Waveform 10 Hz
Square Waveform 1 Hz
Square Waveform 10 Hz
Rationale
Operation of Digital-to-Analog Converter:
The Digital to Analog will work with three components:
mbed NXP LPC1768 microcontroller
MCP4725 12-Bit Digital-to-Analog converter
MCP2551 CAN Bus transceiver
The Digital to Analog mbed will receive waveform and on/off specifications from the Keypad
mbed through CAN Bus protocol. The Digital to Analog, based on the command, will send a
signal to the DAC using I2C protocol to output that waveform.
Operation of Embedded Subsystem Integration:
The embedded will communicate through digital protocols. More specifically, CAN (controller
area network) busses will be used for the keypad to communicate to each subsystem which has
its own mbed to receive commands and manipulate waveforms. Waveform signals will be
directly and serially sent through the DAC, DigiPot, Black Box, and ADC.
Implementation
Explanation of Circuitry:
The MCP2551 CAN bus transceiver (Figure 4) is designed to receive CAN messages from the
Keypad Subsystem through the CAN H and CAN L ports. The CAN bus then sends the required
data from TxD and RxD ports to the CAN td and CAN rd LPC1768 mbed microcontroller ports,
respectively.
Verification Testing:
In order to verify our subsystem was working, we performed three test verifications:
First, we implemented the Hello World program (Figure 9) from the mbed
development website. This test was proved successful when the LED began to blink when the
mbed was reset.
10
Figure 11: DAC system output signals (3.3 Vp-p) - Square 1Hz (left) and Square 10Hz (right)
Figure 12: DAC system output signals (3.3 Vp-p) - Sine 1Hz (left) and Sine 10Hz right)
Three tests demonstrated that the DAC subsystem has the ability to output the specified
waveforms.
Validation Testing:.
The Digital-to-Analog Converter subsystem successfully creates four waveforms with a 3.3Vp-p
amplitude (Figure 11-12). These waveforms are manipulated by the DigiPot and inputted into the
black box to determine the device hidden within the box.
11
Discussion
Our group discussed with the Keypad subsystem group what signals they would send us
and how we would interpret those signals as inputs to our subsystem. In order for each
12
subsystem to communicate with each other effectively, we were required to implement the CAN
bus transceiver into our designs. The CAN bus protocol was effective at reading the signals sent
from the Keypad group and allowing each group to successfully communicate with each other.
The CAN bus is a simple solution to connect multiple mbed microcontrollers together.
An alternative to the CAN bus is an SPI (Serial Peripheral Interface) bus. This is commonly used
to send data between microcontrollers and small peripherals such as switch registers, sensors,
and SD cards. It is based on push/pull technology which allows running at high speeds. It has a
simple hardware interface and a full duplex mode that uses master-slave architecture. Data is
sent synchronized by the clock line which is driven by the master.
After the initial coding of the system was completed, we were unable to receive the
message sent to us from the Keypad subsystem through the CAN bus. We were able to fix this
problem by adding lines 30-33, as seen in Figure 6. These lines of code are used to identify the
messages sent by the Keypad subsystem.
If we had the opportunity to change how this lab was performed, we would request CAN
busses equipped with wireless communication. During our final presentation, the overabundance
of connections between groups became cumbersome and hard to keep track of. Wireless CAN
busses would greatly simplify the wiring process and eliminate a large margin of error.
Another possible change to this lab is by removing the CAN communication between
groups altogether. Many groups, including ourselves, had a difficult time trying to send and
receive CAN messages between subsystems. It should be possible to simply send information
directly to the inputs and outputs of the mbeds and subsystem chips. This is a plausible solution,
because we only have 4 subsystems that need embedding.
Value Statement
Automobiles have transitioned to become more electronically dependent, because
connecting each system directly to another led to a disarray of harnesses. Therefore, the CAN
(controller area network) module was created in the 1980s and its purpose was to incorporate
multiple systems through a CAN serial protocol. This links all systems and networks through a
single CAN bus. Our project exemplifies the importance of the CAN, by linking its protocol to
all four embedded subsystems. Instead of having the Keypad subsystem send an individual
message to each subsystem, the Keypad can now send a single signal through the CAN bus. This
signal will be read by all subsystems at the same time, thereby reducing the amount of
connections and increasing the efficiency.
13
Conclusion
Team DACs Out for Harambe has developed a Digital-to-Analog Converter (DAC) that
generates analog waveforms, which are outputted to the Digital Potentiometer (DigiPot). In order
for a waveform to be chosen by the Keypad, a CAN bus was implemented to link each teams
protocol. This created synchronous communication system between all subsystem. However, we
achieved a partial integration that failed to discover the contents of the black box. Overall, our
individual subsystem function as required, while the integrated embedded system functioned
partially.
Appendices
15