
SmartSensor
AvansETI/SmartSensor
SmartSensor: a sensor to be used as sensor and actuator within existing buildings.

This project demonstrates motor control using an ACS712 current sensor with an Atmega324PB microcontroller. The microcontroller controls the motor speed and direction based on the current measured by the ACS712 sensor.
Control is an open-source printed circuit board by mehmetkara7, from the mehmetkara7/DC-Motor-Control repository on GitHub. It is a 2-layer board of 104 × 49 mm with 49 parts on 64 nets, routed with 294 tracks and 11 vias.
It is built around the ATMEGA324PB-AU, L298N and L7812, with the SS24 among its other parts. Its parts include 12 capacitors, 9 resistors, 9 diodes, 6 connectors and 5 ICs. It belongs with the AVR (ATmega, ATtiny) boards of this library.
This project demonstrates motor control using an ACS712 current sensor with an Atmega324PB microcontroller. The microcontroller controls the motor speed and direction based on the current measured by the ACS712 sensor.
setup(): Initializes the microcontroller pins and sets up the Timer/Counter1 for PWM control.setMotorSpeed(uint8_t speed): Sets the motor speed using PWM (Pulse Width Modulation).forward(), backward(), stop(): Functions to control the motor direction.turnOnRelay(), turnOffRelay(): Functions to control the relay.turnOnBuzzer(), turnOffBuzzer(): Functions to control the buzzer.readACS712(): Reads the current value from the ACS712 sensor.main(): The main control loop that reads current values and adjusts motor control accordingly.Modify the code as needed to adjust the current threshold for motor control and the motor speed settings.
if (adcValue > 512) {
// Current threshold exceeded, take action (e.g., stop motor and sound buzzer)
} else {
// Current within the acceptable range, adjust motor speed and direction as needed
// Example: forward(), setMotorSpeed(speed), _delay_ms(delay);
}| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 100nF | Capacitor_SMD:C_0805_2012Metric | C2, C3, C4, C5, C11 |
| 4 | D_Small | Diode_SMD:D_SMB | D1, D2, D3, D4 |
| 3 | 10K | Resistor_SMD:R_0805_2012Metric | R9, R12, R16 |
| 2 | 18pF | Capacitor_SMD:C_0603_1608Metric | C6, C7 |
| 2 | 1K | Resistor_SMD:R_0805_2012Metric | R11, R14 |
| 2 | 1nF | Capacitor_SMD:C_0805_2012Metric | C12, C13 |
| 2 | 220uf | Capacitor_SMD:CP_Elec_8x6.7 | C9, C10 |
| 2 | 2N7002 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2 |
| 2 | LED_Small | LED_SMD:LED_0805_2012Metric | D11, D13 |
| 1 | 120R | Inductor_SMD:L_1206_3216Metric | FB1 |
| 1 | 16MHz | Crystal:Crystal_SMD_5032-4Pin_5.0x3.2mm | Y1 |
| 1 | 1M | Resistor_SMD:R_0805_2012Metric | R4 |
| 1 | 1k | Resistor_SMD:R_0805_2012Metric | R13 |
| 1 | 1uF | Capacitor_SMD:C_0805_2012Metric | C1 |
| 1 | 2K2 | Resistor_SMD:R_0805_2012Metric | R15 |
| 1 | 4K7 | Resistor_SMD:R_0805_2012Metric | R1 |
| 1 | 6x6 SMD | Button_Switch_SMD:SW_SPST_CK_RS282G05A3 | SW1 |
| 1 | ACS712 | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U6 |
| 1 | ATmega324PB-A | Package_QFP:TQFP-44_10x10mm_P0.8mm | U1 |
| 1 | Buzzer | Buzzer_Beeper:Buzzer_12x9.5RM7.6 | BZ1 |
| 1 | Conn_01x02 | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J3 |
| 1 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J10 |
| 1 | G2RL-2 | Relay_THT:Relay_DPDT_Omron_G2RL-2 | K1 |
| 1 | I2C | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J1 |
| 1 | ISP | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical | J5 |
| 1 | L298N | Package_TO_SOT_THT:TO-220-15_P2.54x2.54mm_StaggerOdd_Lead4.58mm_Vertical | U2 |
| 1 | L7812 | Package_TO_SOT_SMD:TO-252-2 | U4 |
| 1 | LED_Small | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D12 |
| 1 | LM78M05_TO252 | Package_TO_SOT_SMD:TO-252-2 | U5 |
| 1 | LOGO | GOFootprint:formula | G*** |
| 1 | POWER | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J6 |
| 1 | SM712_SOT23 | Package_TO_SOT_SMD:SOT-23 | D9 |
| 1 | SS24 | Diode_SMD:D_SMB | D5 |
| 1 | UART | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J7 |

AvansETI/SmartSensor
SmartSensor: a sensor to be used as sensor and actuator within existing buildings.




creapunk/CLN-ClosedLoopNemaDriver
Compact closed-loop stepper motor driver designed for NEMA motors

NewTec-GmbH/esp32-can-iot
A ESP32 based interface between CAN-bus and IoT environments.


jackw01/pi-pico-printer-board
Tinkerer-friendly Klipper compatible 3D printer control board using Raspberry Pi Pico
It measures 104 × 49 mm and has 2 copper layers, 1.6 mm thick.
49 parts, built around the ATMEGA324PB-AU, L298N, L7812 and SS24. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the mehmetkara7/DC-Motor-Control repository on GitHub, at the commit this page was made from: the board is control/control.kicad_pcb and its schematic control/IC.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask mehmetkara7 before reusing the design.