Think and Invent

Crank & Cam Signal Generator (SystemC)

This project simulates a 60-2 crankshaft signal and a user-defined camshaft pattern using SystemC.

Overview

A virtual crank signal is generated based on configurable RPM and acceleration inputs. The crank signal is modeled with 60 teeth, two of which are missing to create a synchronization gap (60-2). Every tooth is considered to be 6° wide (since 360°/60 = 6°).

Acceleration Modeling

Acceleration is modeled as RPM change over time (RPM/sec), allowing the crank signal to smoothly accelerate or decelerate based on the desired target RPM.

CAM Signal

The CAM signal is defined by a repeating pattern of high/low levels with specified angular widths (in degrees). For example, a pattern like:

{15, 15, 75, 15, 75, 75, 15, 75}

with a starting level of high will generate a CAM signal with alternating levels over 360°, and this will be repeated to fill a full 720° engine cycle.

CAM Sync Detector

A module detects a unique synchronization pulse on the CAM line — specifically, a 15°-wide high pulse followed by a 15°-wide low pulse — which uniquely identifies a reference point in the engine cycle.

Code Repository

The full SystemC source code is available on GitHub:
https://github.com/mhage82/rotational_generator.git

Check out this interactive representation Learn More

Goals