Enter our Smart Factory Made by Alpamayo

Inside the Factory

A complete look at how we turn cocoa beans into wrapped chocolate bars. 78 machines across 7 production areas, each one connected, measured, and understood.

78
Machines
7
Areas
~780
Signals
10
Edge Nodes
3
Protocols

Bean to Bar in Seven Steps

Raw cocoa beans enter from the left. Palletized shipping cases leave on the right. Every step in between is measured, controlled, and optimized. Utilities run underneath it all.

Siemens S7 · 33 machines
Modbus TCP · 25 machines
OPC UA · 20 machines

Factory Floor Plan

All 7 production areas under one roof. Raw materials enter top-left, finished pallets leave bottom-right. Utilities run along the far side.

Click to expand
01

Raw Material Handling

Everything starts here. Raw ingredients arrive by truck and are stored in climate-controlled silos and tanks. The factory runs a just-in-time replenishment system — silo levels are the heartbeat of the supply chain.

9 machines
Modbus TCP only
Edge Node: EDGE-01

Cocoa Bean Silo

3x Modbus
SIL-CB-01 SIL-CB-02 SIL-CB-03

Large vertical silos storing raw fermented cocoa beans. Temperature and humidity must stay stable to prevent mold or premature fermentation. Level sensors track inventory for automatic reorder triggers.

Key Signals
  • level_pct % 5–95
    Fill level (radar measurement)
  • temperature °C 15–25
    Internal temperature
  • humidity %RH 40–65
    Relative humidity inside silo
Storage — no OEE tracking

Sugar Silo

2x Modbus
SIL-SU-01 SIL-SU-02

Granulated sugar storage. Humidity control is critical — clumping halts the dosing system.

Key Signals
  • level_pct % 10–95
    Fill level
  • humidity %RH 30–50
    Must stay low to prevent clumping
Storage — no OEE tracking

Milk Powder Silo

2x Modbus
SIL-MP-01 SIL-MP-02

Stores spray-dried milk powder for milk chocolate recipes. Most sensitive to humidity — powder absorbs moisture rapidly.

Key Signals
  • level_pct % 10–90
    Fill level
  • humidity %RH 25–45
    Critical — powder absorbs moisture
Storage — no OEE tracking

Cocoa Butter Melting Tank

2x Modbus
TNK-CB-01 TNK-CB-02

Heated jacketed tanks that keep cocoa butter liquid at 45–50°C. A slow agitator prevents settling. These feed the conches and tempering machines.

Key Signals
  • temperature °C 40–55
    Must stay above 45°C to remain liquid
  • agitator_speed rpm 10–30
    Slow stirring to prevent separation
  • heating_power kW 0–15
    Jacket heater output
Storage — no OEE tracking
02

Bean Processing

This is where raw beans transform into cocoa nibs — the essential building block of chocolate. The roasting step defines the flavor profile; too hot and you get bitter, burnt notes; too cool and the beans taste flat and acidic.

9 machines
Modbus TCP + Siemens S7
Edge Node: EDGE-02

Bean Cleaner

2x Modbus
CLN-01 CLN-02

Vibrating screens and air separators remove stones, twigs, and broken shells from raw beans. A single stone can destroy a cracker roller downstream.

Key Signals
  • vibration_freq Hz 20–60
    Screen vibration frequency
  • feed_rate kg/h 200–800
    Bean throughput
  • rejection_rate % 1–5
    Foreign matter percentage
OEE-Tracked

Provides machine_state, parts_total, parts_good, parts_bad, and cycle_time for OEE calculation. Availability drops when screens clog; quality tracks foreign matter in output.

Drum Roaster

4x S7
RST-01 RST-02 RST-03 RST-04

The soul of the factory. Rotating drums roast ~200 kg batches at 120–160°C for 20–40 minutes. The exhaust temperature reveals roast progression — a sudden spike means the beans are cracking. RST-03 historically runs 2°C warmer.

Key Signals
  • drum_temp °C 20–170
    Actual drum temperature
  • exhaust_temp °C 80–140
    Bean off-gas temperature (roast indicator)
  • bean_moisture % 1.5–7.0
    Decreases during roasting (starts ~6%)
  • gas_flow m³/h 5–25
    Burner gas consumption
  • roast_time_remaining s 0–2400
    Countdown to batch completion
OEE-Tracked

OEE signals: machine_state, parts_total (batches), parts_good, parts_bad, cycle_time. Performance is batch throughput; quality is roast consistency. The drum_temp vs drum_temp_setpoint deviation drives quality scoring.

Cracker & Winnower

3x Modbus
CRW-01 CRW-02 CRW-03

Breaks roasted beans into nibs and blows away the papery shell. The roller gap must be precise — too tight crushes nibs into powder (lost yield), too wide leaves shells in the product (gritty chocolate).

Key Signals
  • roller_gap mm 2.0–6.0
    Gap between cracking rollers
  • feed_rate kg/h 150–600
    Input bean throughput
  • shell_separation_rate % 95–99.5
    Shell removal efficiency
OEE-Tracked

OEE signals track throughput performance and quality via shell_separation_rate. A drop in separation efficiency flags roller wear or air system issues before it affects downstream chocolate quality.

03

Chocolate Making

The heart of the factory. Cocoa nibs are ground into liquid, refined to silky smoothness, and slowly conched for hours to develop flavor. Finally, the chocolate is tempered — a precise temperature dance that creates the crystal structure responsible for snap and shine.

16 machines
Siemens S7 + OPC UA
Edge Nodes: EDGE-03, EDGE-04

Ball Mill / Refiner

4x S7
MIL-01 MIL-02 MIL-03 MIL-04

Steel ball mills grind cocoa nibs (and sugar, milk powder) into a paste with particle sizes below 20 μm — the threshold of human tongue perception. Anything coarser and the chocolate tastes gritty.

Key Signals
  • particle_size μm 15–100
    Target: <20 μm (measured inline)
  • motor_power kW 15–75
    Drive power (correlates with viscosity)
  • viscosity Pa·s 2–25
    Chocolate mass viscosity
  • product_temp °C 40–65
    Rising temperature from grinding friction
OEE-Tracked

OEE quality derives from particle_size — batches exceeding 20 μm at cycle end count as quality losses. motor_power trends predict ball wear (predictive maintenance opportunity).

Conche

6x S7
CON-01 CON-02 CON-03 CON-04 CON-05 CON-06

The signature process of fine chocolate. Heavy rollers knead the mass for 12–72 hours, driving off volatile acids, developing flavor complexity, and rounding out texture. More conching time, more nuance.

Key Signals
  • volatile_acidity % 0.1–1.5
    Undesirable acids evaporating off
  • viscosity Pa·s 5–30
    Decreasing over conching duration
  • moisture % 0.5–2.5
    Slowly decreasing (target: <1%)
  • conching_time_remaining h 0–72
    Hours remaining in cycle
  • motor_power kW 20–90
    Drops as viscosity decreases
OEE-Tracked

Long-cycle OEE: a single batch takes 12–72h. Quality is driven by final volatile_acidity and moisture. motor_power trending against viscosity reveals batch-to-batch consistency.

Tempering Machine

6x OPC UA
TMP-01 TMP-02 TMP-03 TMP-04 TMP-05 TMP-06

The most critical machine in the factory — and the star of the analytics dashboard. Chocolate is heated to 50°C (melt all crystals), cooled to 27°C (seed Form V crystals), then reheated to 31–32°C (melt unstable crystals, keep Form V). Get this wrong and the chocolate blooms, crumbles, or sticks to molds.

Key Signals
  • zone1_temp °C 45–52
    Heating zone (melt all crystals)
  • zone2_temp °C 25–30
    Cooling zone (seed crystals)
  • zone3_temp °C 29–33
    Reheating zone (select Form V)
  • temper_index 0–100
    Crystal quality score (virtual sensor candidate)
  • vibration mm/s 0.5–5.0
    Pump/motor vibration
OEE-Tracked

The temper_index is the single most important quality signal in the factory. It directly drives OEE quality scoring and is the primary candidate for virtual sensor modeling. Zone temperature deviations from setpoint correlate to final bar quality in QC.

04

Molding & Cooling

Liquid tempered chocolate becomes solid bars. Molding lines deposit precise amounts into polycarbonate molds, vibrate out air bubbles, then send them through cooling tunnels. When cooled correctly, bars contract and pop cleanly out of the molds.

14 machines
S7 + OPC UA + Modbus
Edge Nodes: EDGE-05, EDGE-06

Molding Line

6x S7
MLD-01 MLD-02 MLD-03 MLD-04 MLD-05 MLD-06

High-speed depositors fill multi-cavity molds with tempered chocolate. A vibration table shakes out trapped air (bubbles = defects). Fill weight precision is critical — underfill wastes yield, overfill wastes chocolate.

Key Signals
  • fill_weight g 98–102
    Actual fill weight (target: 100g)
  • fill_weight_deviation g -3 to +3
    Deviation from target
  • depositor_temp °C 29–33
    Must match tempering output
  • line_speed molds/min 10–40
    Production rate
OEE-Tracked

fill_weight_deviation is the key quality signal for OEE. Depositor drift shows up here before it causes rejects downstream. line_speed vs. target drives the performance component.

Cooling Tunnel

4x OPC UA
CLT-01 CLT-02 CLT-03 CLT-04

30-meter tunnels with three temperature zones. Entry (15°C) starts solidification. Middle (10°C) completes crystallization. Exit (18°C) prevents condensation. Too fast = fat bloom. Too slow = bottleneck.

Key Signals
  • zone1_temp °C 12–18
    Entry zone (initial cooling)
  • zone2_temp °C 8–14
    Middle zone (deep cooling)
  • product_exit_temp °C 16–22
    Bar temperature at exit
  • humidity %RH 30–55
    Must stay low (condensation = bloom)
OEE-Tracked

Cooling affects OEE quality across the entire downstream. product_exit_temp outside range causes bloom (white streaks) that shows up at QC. humidity spikes correlate with condensation defects.

Demolding Station

4x Modbus
DML-01 DML-02 DML-03 DML-04

Molds are flipped and tapped to release solidified bars. If tempering or cooling was off, bars stick — the release rate drops and rejects climb. A simple but revealing quality indicator.

Key Signals
  • release_rate % 90–99.5
    Successful release percentage
  • knockout_force N 10–80
    Force applied to release bars
OEE-Tracked

release_rate directly maps to OEE quality. A drop here is the first visible sign that tempering or cooling parameters drifted. Correlating release_rate back to temper_index is a classic cross-machine analytics use case.

05

Quality Control

Every bar passes through camera inspection and a precision scale. Defects are categorized: surface cracks, bloom spots, air holes, weight out-of-spec. This data, correlated back to tempering and molding parameters, is gold for virtual sensor models.

7 machines
OPC UA only
Edge Node: EDGE-07

Visual Inspector

4x OPC UA
VIS-01 VIS-02 VIS-03 VIS-04

High-speed cameras photograph every bar from above. Machine vision algorithms score surface quality — cracks, color consistency, bloom, air holes. The surface_score (0–100) is the single most valuable quality metric in the factory.

Key Signals
  • surface_score 0–100
    Overall visual quality (100 = perfect)
  • defect_count n 0–10
    Defects per inspection cycle
  • color_deviation ΔE 0–5
    Color difference from reference
  • crack_detected bool 0/1
    Binary crack detection
OEE-Tracked

surface_score is the factory-wide quality reference signal. OEE quality at this station captures the cumulative effect of every upstream process. Bars below score threshold are rejected — feeding parts_bad in OEE.

Weight Checker

3x OPC UA
WGH-01 WGH-02 WGH-03

Precision in-line scales verify every bar is within ±2g of the 100g target. Out-of-spec bars are blown off the conveyor by an air jet. Weight data reveals depositor drift before it becomes a real problem.

Key Signals
  • measured_weight g 90–110
    Actual bar weight
  • weight_deviation g -10 to +10
    Deviation from target
  • reject_trigger bool 0/1
    Air jet fired to reject bar
OEE-Tracked

weight_deviation trending reveals depositor drift in real time — before it triggers actual rejects. Each reject_trigger event counts toward OEE quality loss. Correlate with fill_weight from MLD machines for root cause.

06

Packaging

Bars are individually wrapped in foil and paper, packed into cardboard boxes of 12, then into shipping cases of 24 boxes. Robot palletizers stack cases onto pallets for the warehouse. This area runs the fastest cycle times in the factory.

15 machines
S7 + Modbus
Edge Nodes: EDGE-08, EDGE-09

Wrapping Machine

6x S7
WRP-01 WRP-02 WRP-03 WRP-04 WRP-05 WRP-06

Flow-wrap machines seal each bar in aluminum foil + printed paper sleeve. Sealing temperature must be precise — too hot melts the chocolate through the foil, too cold and the seal leaks.

Key Signals
  • seal_temp °C 120–180
    Heat seal bar temperature
  • wraps_per_min n/min 30–120
    Actual wrapping rate
  • film_tension N 5–25
    Wrapper film tension
OEE-Tracked

wraps_per_min drives OEE performance. seal_temp deviations cause leaky seals (quality loss) or film burns (scrap). High-frequency machines — small cycle time variations compound fast.

Cartoning Machine

4x Modbus
CRT-01 CRT-02 CRT-03 CRT-04

Erects flat cardboard blanks, inserts 12 wrapped bars, and glue-seals the box. Hot melt glue system is the most common failure point — nozzle clogs cause stops.

Key Signals
  • glue_temp °C 140–180
    Hot melt glue temperature
  • cartons_per_min n/min 5–20
    Packing rate
  • glue_pressure bar 2–6
    Adhesive system pressure
OEE-Tracked

glue_temp dropping below range predicts nozzle clog — the #1 availability loss for this machine type. glue_pressure trending is a predictive maintenance signal.

Case Packer

3x Modbus
CSP-01 CSP-02 CSP-03

Groups 24 cartons into corrugated shipping cases, tapes them shut. The final discrete packaging step.

Key Signals
  • cases_per_min n/min 2–8
    Output rate
  • tape_tension N 10–40
    Case sealing tape tension
OEE-Tracked

Simple OEE — cases_per_min vs. target rate for performance. Availability tracked via machine_state.

Palletizer

2x S7
PAL-01 PAL-02

6-axis robot arms stack cases onto Euro pallets in a programmed pattern. Layer by layer until the pallet is full (60 cases = 17,280 bars). The last step before the warehouse.

Key Signals
  • robot_speed % 10–100
    Speed override (% of max)
  • pallet_weight kg 0–500
    Cumulative pallet weight
  • layer_count n 0–10
    Layers on current pallet
OEE-Tracked

robot_speed vs. maximum drives performance. gripper_pressure trending predicts vacuum seal wear — a common robotic palletizer failure mode.

07

Utilities

The invisible backbone. Compressed air powers pneumatic actuators everywhere. Chillers supply cold water to cooling tunnels and tempering machines. Steam boilers heat the roasters and conches. When utilities fail, everything stops.

8 machines
S7 + OPC UA
Edge Node: EDGE-10

Air Compressor

3x S7
CMP-01 CMP-02 CMP-03

Screw compressors supplying 7-bar plant air. Feed all pneumatic valves, air jets, and actuators. Vibration trending is the classic predictive maintenance use case.

Key Signals
  • vibration mm/s 0.5–10
    Bearing vibration (PdM signal)
  • discharge_pressure bar 5–9
    Output air pressure
  • oil_temp °C 40–90
    Lubricant temperature
  • runtime_hours h 0–50000
    Total operating hours
Utility — no OEE tracking (condition monitoring instead)

Chiller Unit

3x OPC UA
CHL-01 CHL-02 CHL-03

Industrial water chillers supplying 8°C glycol to cooling tunnels and tempering jacket circuits. COP (coefficient of performance) can be computed from supply/return delta and compressor power — a virtual sensor opportunity.

Key Signals
  • supply_temp °C 5–12
    Cold water supply
  • return_temp °C 12–20
    Warm water return
  • compressor_power kW 10–50
    Chiller compressor consumption
Utility — no OEE tracking (energy efficiency monitoring)

Steam Boiler

2x S7
BLR-01 BLR-02

Gas-fired boilers producing 6-bar steam for roaster heating jackets and conche heat exchangers. Water level is safety-critical.

Key Signals
  • water_level % 30–80
    Boiler drum level (safety signal)
  • steam_pressure bar 3–8
    Output steam pressure
  • gas_flow m³/h 5–30
    Burner gas consumption
  • exhaust_temp °C 150–300
    Flue gas temperature
Utility — no OEE tracking (safety + efficiency monitoring)

10 Edge Nodes

Each production area is served by one or two PREKIT edge nodes — industrial-grade computers running at the network edge. They collect, process, and contextualize machine data before it leaves the factory floor.

Why ~780 Data Points?

Not every signal is equally important. Here are the ones that drive decisions — from real-time quality control to predictive maintenance and OEE optimization.

OEE Essentials

Every OEE-tracked machine provides five standard signals: machine_state (6 states: running, idle, setup, maintenance, error, off), parts_total, parts_good, parts_bad, and cycle_time.

These feed Availability (uptime vs. planned time), Performance (actual vs. ideal cycle time), and Quality (good parts vs. total). 62 of 78 machines are OEE-tracked.

Utility and storage machines use simplified 4-state tracking (no part counting).

Quality Chain

The most valuable analytics path runs through: temper_index (TMP) → fill_weight_deviation (MLD) → release_rate (DML) → surface_score (VIS) → weight_deviation (WGH).

Correlating these cross-machine signals reveals root causes: a temper_index drop at TMP-03 shows up as bloom defects at VIS-02 twenty minutes later.

This is the primary use case for virtual sensor modeling in PREKIT.

Predictive Maintenance

Key PdM signals: vibration on compressors and tempering pumps, motor_power trending on mills and conches, oil_temp on compressors, glue_pressure on cartoners.

Gradual increases in vibration or power consumption indicate bearing wear, belt slippage, or mechanical degradation — days or weeks before failure.

Compressor vibration is the textbook example. Runtime hours provide context.

Energy & Efficiency

Utility signals enable energy analytics: chiller compressor_power vs. supply_temp/return_temp delta gives COP. Boiler gas_flow vs. steam_pressure gives boiler efficiency. Roaster gas_flow tracks per-batch energy cost.

Virtual sensors: compute COP and boiler efficiency from raw signals.

Process Parameters

Temperature profiles are everywhere: roaster drum_temp, conche product_temp, tempering zone1/2/3_temp, cooling tunnel zones, wrapping seal_temp. Each has a setpoint — deviations drive quality.

Moisture and acidity in conching (moisture, volatile_acidity) track flavor development over 12–72 hour cycles.

Temperature setpoint deviations are the #1 predictor of quality issues.

Supply Chain

Silo level_pct signals across all 7 raw material silos provide real-time inventory visibility. Combined with production rate data, they enable just-in-time replenishment and prevent both stockouts and waste.

humidity in silos is the early warning: a spike means the climate control is failing and material quality is at risk.

Level trends drive automatic reorder triggers in the supply chain.