Microcontroller-Based Control Display Component

Jerry Brown, a California-based aerospace engineer, designed and built (both the hardware and software) an MCU-based computer display component (CDC) for a traffic-monitoring system. The system with the CDC is intended for monitoring and recording the accumulative count, direction of travel, speed, and time of day for vehicles that pass by.

In his November 2014 Circuit Cellar article, “MCU-Based Control Display Component,” Brown explained:

For the past five years, I have been working on an embedded project that you might find interesting. As part of a traffic-monitoring system (TMS) developed by a colleague (a retired aerospace/aeronautical engineer), whereby traffic flow on city streets and boulevards is monitored, I designed and built (both the hardware and software) a dual Microchip Technology PIC18F4520 microcontroller-based control display component (CDC, see Photo 1). My motivation to develop the CDC came about as a result of my chance meeting with my colleague when we were both judges at the local county-wide science fair. He explained the concept of the TMS to me and his motivation for developing it and said he needed an electrical engineer to design and build the CDC. Would I be interested? You bet I was.

Photo 1: Fully functional CDC prototype

Photo 1: Fully functional CDC prototype

Brown went on to describe system.

The TMS comprises a dual laser beam transmitter, a dual sensor receiver, and the CDC (see Figure 1). It is intended for unmanned use on city streets, boulevards, and roadways to monitor and record the cumulative count, direction of travel, speed, and time of day for vehicles that pass by a specific location during a set time period (e.g., 12 to 24 hours).

Figure 1: Traffic Monitoring System showing the Laser Beam Transmitter, the Sensor Receiver and the Control Display Component

Figure 1: Traffic Monitoring System showing the Laser Beam Transmitter, the Sensor Receiver and the Control Display Component

The transmitter, which is placed on one side of the roadway at the selected measurement-monitoring location, has two laser diodes (in the red color spectrum about 640-to-650-nm wavelength) spaced 12″ apart. The receiver has two photo transistor detectors also spaced 12″ apart. The transmitter is positioned directly across the roadway from the receiver as nearly orthogonal as possible. In operation, the two laser diodes in the transmitter continually emit a pair of parallel beams a small distance above the road surface, and the beams are aligned so that they impinge on the two photo sensor arrays in the receiver across the road. When a vehicle passes through the monitoring location, one beam is interrupted and, a short time later, the second beam is interrupted. The CDC electronics and software accurately measures the time differential between the sequential beam interruptions to determine vehicle speed and, depending on which beam is interrupted first, determines the direction of travel. The CDC—which counts the passing vehicles accumulatively and calculates and displays vehicle speed, direction of travel, and time of event on an LCD—is electrically connected to the receiver. All traffic-monitoring data including the time of each interruption event is recorded on a Compact Flash Memory (CFM) card within the CDC for later review and analysis in an Excel spreadsheet or other data  analysis program. In addition, the CDC has an alphanumeric keypad whereby the set-up technician can enter four initial parameters (Date, Location, Map Book Page, and Map Book Coordinates), which are downloaded to the CFM card as the “Header File.”

The TMS system-level requirements established by my colleague drove the CDC level requirements which I documented. Specifically, the CDC had to be of a size and weight so that it could be easily hand carried. Inexpensive off-the-shelf components were to be utilized to the maximum extent possible in the design and fabrication of the CDC. Power consumption needed to be kept to a minimum. Functionally, the CDC had to be capable calculating speed to within ±1 mph of all vehicles passing through (i.e., “interrupting”) the laser beam pair. In addition, the CDC had to be able to determine the direction of travel, the time the valid interruption occurred, and the cumulative count for all vehicles interrupting the laser beam pair during a manned or unmanned test session. A real-time GUI (i.e., the LCD) and a keypad were also required, as was nonvolatile  memory (CFM card) to store all the traffic pattern data obtained during a traffic-monitoring session.

Figure 2 shows the CDC’s functional elements.

The functions of the main co-processor are to display on the LCD input from the User Interface, to drive the status LEDs and to calculate and display traffic pattern data which is sent to the CFM microcontroller. The CFM microcontroller formats the traffic pattern data in a File Allocation Table (FAT) file and writes that file to the CFM card. Both microcontrollers are clocked by a 40-MHz crystal controlled oscillator and both have an in-circuit serial programming port (ICSP), which allows for programming and reprogramming the microcontrollers at the CDC level. During the software development phase of the project, the ICSP ports were definitely utilized. A power on reset (POR) circuit initializes both microcontrollers at system power-up.

Figure 2: CDC Functional Block Diagram showing the two micro-controllers, the User Interface and the Supporting Functionality

Figure 2: CDC Functional Block Diagram
showing the two micro-controllers,
the User Interface and the Supporting
Functionality

Based on the FBD and the established CDC functional requirements, I designed the CDC motherboard circuit using a schematic capture program. Where necessary, I simulated elements of the circuit using a circuit simulation program. I used an online PCB prototype fabrication service and had to re-enter the schematic using their software. I then laid out and routed the two-sided board using the software package provided by the online vendor. After I submitted the file, it only took a few days to receive the two prototype PCBs I ordered. I “populated” one of the boards with components I had purchased and kept the second board as a spare. Preliminary board-level testing of the assembled PCB revealed two layout errors which were easily corrected by an X-ACTO Knife trace cut and by the addition of a jumper wire.

Figure 3: CDC Motherboard Schematic divided into three sections: (1) Data Processor, (2) CFM Formatter and (3) Input/Output. Some circuitry, such as the RS-422 Interface (U2, U4, J6), was included in the design for potential future utilization but was not used in the prototype configuration.

Figure 3: CDC Motherboard Schematic
divided into three sections: (1) Data
Processor, (2) CFM Formatter and (3)
Input/Output. Some circuitry, such as
the RS-422 Interface (U2, U4, J6), was
included in the design for potential
future utilization but was not used in
the prototype configuration.

Figure 3 depicts the CDC main microcontroller circuit on the motherboard. Photo 3 shows the inside of the CDC with the front panel removed.

As indicated above, I designed and assembled the motherboard circuit card. The LCD module, the keyboard module, the RTC module, and the CFM card module were all purchased assemblies. Once all the parts were installed in the case, I completed the interface wiring.

Photo 3: Inside the CDC showing the (1) Main motherboard, (2) The Main Microcontroller, PIC18F4520, (3) the CFM Micro-controller, PIC18F4520 (4) the LCD module, (5) the Keyboard module, (6) the Real Time Clock module and (7) the CFM Card module, only partially visible.

Photo 3: Inside the CDC showing the (1) Main
motherboard, (2) The Main Microcontroller,
PIC18F4520, (3) the CFM
Micro-controller, PIC18F4520 (4) the
LCD module, (5) the Keyboard module,
(6) the Real Time Clock module and (7)
the CFM Card module, only partially
visible.

The complete article appears in Circuit Cellar 292 (November 2014). Additional files are available on the CC FTP site.

New JukeBlox Wi-Fi Platform for Streaming Audio

Microchip Technology’s fourth-generation JukeBlox platform enables product developers to build low-latency systems, such as wireless speakers, sound bars, AV receivers, micro systems, and more. The JukeBlox 4 Software Development Kit (SDK) in combination with the CY920 Wi-Fi & Bluetooth Network Media Module features dual-band Wi-Fi technology, multi-room features, AirPlay and DLNA connectivity, and integrated music services.

Microchip-JukeBlox-Wifi

Streaming audio with JukeBlox

The CY920 module is based on Microchip’s DM920 Wi-Fi Network Media Processor, which features 2.4- and 5-GHz 802.11a/b/g/n Wi-Fi, high-speed USB 2.0 and Ethernet connectivity. By using the 5-GHz band, speakers aren’t impacted by the RF congestion found in the 2.4-GHz band.

The DM920 processor also features integrated dual 300-MHz DSP cores that can reduce or eliminate the need for costly standalone DSP chips. An PC-based GUI simplifies the use of a predeveloped suite of standard speaker-tuning DSP algorithms, including a 15-band equalizer, multiband dynamic range compression, equalizer presets, and a variety of filter types. Even if you don’t have DSP coding experience, you can implement DSP into your designs.

JukeBlox 4 enables you to directly stream cloud-based music services, such as Spotify Connect and Rhapsody, while using mobile devices as remote controls. Mobile devices can be used anywhere in the Wi-Fi network without interrupting music playback. In addition, JukeBlox technology offers cross-platform support for iOS, Android, Windows 8, and Mac, along with a complete range of audio codecs and ease-of-use features to simplify network setup.

The JukeBlox 4 SDK, along with the JukeBlox CY920 module, is now available for sampling and volume production.

Source: Microchip Technology

PIC32MX1/2/5 Microcontrollers for Embedded Control & More

Microchip Technology’s new PIC32MX1/2/5 series enables a wide variety of applications, ranging from digital audio to general-purpose embedded control. The microcontroller series offers a robust peripheral set for a wide range of cost-sensitive applications that require complex code and higher feature integration.MicrochipPIC32MX125-starterkit

The microcontrollers feature:

  • Up to 83 DMIPS performance
  • Scalable memory options from 64/8-KB to 512/64-KB flash memory/RAM
  • Integrated CAN2.0B controllers with DeviceNet addressing support and programmable bit rates up to 1 Mbps, along with system RAM for storing up to 1024 messages in 32 buffers.
  •  Four SPI/I2S interfaces
  • A Parallel Master Port (PMP) and capacitive touch sensing hardware
  • A 10-bit, 1-Msps, 48-channel ADC
  • Full-speed USB 2.0 Device/Host/OTG peripheral
  • Four general-purpose direct memory access controllers (DMAs) and two dedicated DMAs on each CAN and USB module

 

Microchip’s MPLAB Harmony software development framework supports the MCUs. You can take advantage of Microchip’s software packages, such as Bluetooth audio development suites, Bluetooth Serial Port Profile library, audio equalizer filter libraries, various Decoders (including AAC, MP3, WMA and SBC), sample-rate conversion libraries, CAN2.0B PLIBs, USB stacks, and graphics libraries.

Microchip’s free MPLAB X IDE, the MPLAB XC32 compiler for PIC32, the MPLAB ICD3 in-circuit debugger, and the MPLAB REAL ICE in-circuit emulation system also support the series.

The PIC32MX1/2/5 Starter Kit costs $69. The new PIC32MX1/2/5 microcontrollers with the 40-MHz/66 DMIPS speed option are available in 64-pin TQFP and QFN packages and 100-pin TQFP packages. The 50-MHz/83 DMIPS speed option for this PIC32MX1/2/5 series is expected to be available starting in late January 2015. Pricing starts at $2.75 each, in 10,000-unit quantities.

 

Source: Microchip Technology

New AFEs for Single-Phase Smart Meters & Power Monitoring

Microchip Technology has announced the completion of its MCP391X energy-measurement Analog Front End (AFE) family.  The MCP3919 and MCP3912 integrate three and four channels of 24-bit, delta-sigma ADC, respectively. They have an accuracy of 93.5 dB SINAD, –107-dB THD, and 112-dB SFDR for precise signal acquisition and higher-perforce end products.microchipMCP391Xafe

Microchip also announced two new tools to aid in the development of energy systems using the new AFEs.  The MCP3912 Evaluation Board (part # ADM00499) and MCP3919 Evaluation Board (part # ADM00573) are each available for $129.99.

The MCP3912 and MCP3919 AFEs are both available today for sampling and volume production, with prices starting at $1.84 each in 5,000-unit quantities.  Both AFEs are offered in 28-pin QFN and SSOP packages.

Source: Microchip Technology

WillowTree Apps Named Microchip Design Partner

Microchip Technology recently announced its first App Developer Specialist—WillowTree Apps—the latest company to join its Design Partner Network. WillowTree is an iOS, Android, and Mobile Web app developer that enables Microchip’s customers to focus on Internet of Things (IoT) designs.MicrochipWillowTree

WillowTree wrote the first mobile app for Microchip’s Wi-Fi Client Module Development Kit 1, which is available in the Apple App Store. It enables customers to quickly get up and running with the kit’s cloud-based demo. WillowTree can also modify this cloud-demo app to suit a broad range of customer IoT design requirements.

Source: Microchip Technology