Versa Control

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

İçindekiler

INTRODUCTION................................................................................................2
THE PROJECT....................................................................................................2
Microcontroller Selection..............................................................................3
Git and Github with Altium...........................................................................5
Schematics...................................................................................................5
MCU...........................................................................................................6
QUESTIONS....................................................................................................10
1. What are decoupling capacitors?.........................................................10
2. What are ferrite beads and how to choose them?................................10
3. How to choose crystal oscilllators?.......................................................10
ACQUIREMENTS.............................................................................................11

INTRODUCTION
The purpose of this project is to improve my PCB design skills. In the end, the
project to be described may not have an actual use in the real world, but I
aim to use as many sensors or components as possible to get used to
different communications protocols, specific topics such as impedance
routing, multilayer PCB design and many more topics. I will put an
acquirements section as well as explaining what I acquired in every section.

THE PROJECT
I had a project in my mind which includes several sensors and motor control
etc. Before starting to the project, I wanted to talk to ChatGPT and after long
conversations and after I described what I needed to do, we finally created a
project together.
Project Name: VersaControl - Multi-Purpose Embedded System
Purpose: VersaControl is a versatile embedded system designed to provide
comprehensive functionalities for a wide range of applications. With its
robust sensor interfaces, motor control capabilities, data storage, and
communication features, VersaControl offers flexibility, performance, and
ease of use for engineers and hobbyists alike. The addition of SPI for external
memory expansion further enhances the system's capabilities, enabling
extensive data storage and retrieval for projects that demand high-volume
data processing and logging.
Key Features:
 Precise sensor interfaces for monitoring temperature, pressure, and
motion.
 Dynamic motion control with integrated H-bridge motor control
circuitry.
 Versatile data storage interfaces, including SPI for external memory
expansion.
 Seamless communication with external devices via USB, UART,
Bluetooth, or SPI interfaces.
 Customization options for adapting to diverse project requirements.
Bill of Materials (BOM):
1. Microcontroller: STM32
2. Sensor Interface:
 Analog Temperature Sensor
 Digital Gyroscope and Accelerometer
 I2C Pressure Sensor
3. Motor Control: MOSFETs for H-Bridge Configuration
4. Data Storage and Communication Interfaces:
 EEPROM
 MicroSD Card Module
 USB to UART Converter
 Bluetooth Module
 SPI Interface components (for external memory expansion)
5. Power Management:
 Buck-Boost Converter
 Low Dropout Regulator
VersaControl offers a comprehensive solution for various projects, providing
versatility, performance, and scalability in one integrated system.
I will also include all the useful information I can get and provide.

Microcontroller Selection
Step 1: Define Your Project Requirements
• Functionality: Clearly outline what your project needs to do.
• Performance: Determine the processing power and speed required.
• Input/Output Needs: Identify the sensors, actuators, and communication
interfaces needed.

Step 2: Consider Hardware and Software Compatibility


• Hardware Interfaces: Make a list of required hardware interfaces such as
GPIO pins, UART, SPI, I2C, etc.
• Software Architecture: Examine the software architecture and libraries
available for your chosen microcontroller.

Step 3: Choose the Microcontroller Architecture


• 8-bit, 16-bit, 32-bit: Select the bit size based on your project's
computational needs.
• Microcontroller Families: Research popular microcontroller families like AVR,
PIC, ARM, etc.

Step 4: Evaluate Memory Requirements


• Flash Memory: Determine the program memory size required.
• RAM: Assess the data memory needs for variables and buffers.

Step 5: Consider Costs and Power Requirements


• Cost Constraints: Stay within your budget.
• Power Efficiency: Ensure the microcontroller's power consumption aligns
with your project's energy requirements.

Step 6: Evaluate Special Features


• Built-in Peripherals: Check if the microcontroller has integrated peripherals
like timers, PWM controllers, ADCs, and more.
• Operating Voltage: Verify that the microcontroller operates within your
desired voltage range.
• I/O Pins: Ensure an adequate number of I/O pins for interfacing with sensors
and actuators.

Step 7: Community and Support


• Community: Consider the availability of online forums and communities for
troubleshooting and support.
• Development Tools: Check if there are development tools, IDEs, and
compilers readily available.

Step 8: Future Expansion


• Scalability: Choose a microcontroller that allows for future upgrades and
expansion.

Based on the information provided about the VersaControl project, including


its various functionalities such as sensor interfaces, motor control, data
storage, and communication features, along with the desire for
customization options, ChatGPT believes that the 64-pin variant of the
STM32F446 microcontroller (STM32F446RET6) could be sufficient for your
project.
Even though I was not the one to select the MCU, I discovered a few tricks I
can use on my next project. So this section was useful for microcontroller
selection.

Git and Github with Altium


I also share my projects on Github manually. I had some experience on git
usage but this is the first time I used it for Altium.
So I created a repository and pushed the projects. Also I learnt how to push
the changes that I make on Altium. It requires a different process. You use
your username and a special key for a password to push the changes you
made on schematics or pcb to the repository.

Schematics
Now we are going to make the connections and also the part selection for
every component.
Sources:
 DATASHEET - STM32F466xC/E
 AN2606 - STM32 microcontroller system memory boot mode
 AN4488 - Getting started with STM32F4xxxx MCU hardware
development
 AN2867 - Oscillator design guide for ST microcontrollers

MCU
We start with the boot, the power connections, reset, and the crystal
circuitry.

1. BOOT
At startup, boot pins are used to select one out of three boot options:
 Boot from user Flash
 Boot from system memory
 Boot from embedded SRAM
The boot loader is located in system memory. It is used to reprogram the
Flash memory through a serial (UART, I2C, CAN, SPI and USB) communication
interface. Refer to application note AN2606 for details.
Introduction of AN2606 states that the bootloader is stored in the internal
boot ROM (system memory) of STM32 devices and is programmed by ST
during production. Its main task is to download the application program to
the internal flash memory through one of the available serial peripherals
(such as USART, CAN, USB, I2C, SPI). A communication protocol is defined for
each serial interface, with a compatible command set and sequence.
I will only program the system using SWD. So, I will pull BOOT0 low and leave
BOOT1 floating.

2. POWER SUPPLY
 VDD = 1.7 to 3.6 V: external power supply for I/Os and the internal
regulator (when enabled), provided externally through VDD pins.
 VSSA, VDDA = 1.7 to 3.6 V: external analog power supplies for ADC,
DAC, Reset blocks, RCs and PLL. VDDA and VSSA must be connected to
VDD and VSS, respectively
 VBAT = 1.65 to 3.6 V: power supply for RTC, external clock 32 kHz
oscillator and backup registers (through power switch) when VDD is not
present.
 VDDUSB can be connected either to VDD or an external independent
power supply (3.0 to 3.6 V) for USB transceivers.
 VREF+ and VREF– inputs are both available on UFBGA144. VREF+ is
also available on LQFP100, LQFP144, and WLCSP81. When VREF+ and
VREF– are not available, they are internally connected to VDDA and
VSSA.

Additional precautions can be taken to filter analog noise:


 VDDA can be connected to VDD through a ferrite bead.
 The VREF+ pin can be connected to VDDA through a resistor.
When the voltage regulator is enabled, VCAP1 and VCAP2 pins must be
connected to 2*2.2 µF LowESR < 2Ω Ceramic capacitor (or 1*4.7 µF LowESR
< 1Ω Ceramic capacitor if only VCAP1 pin is provided on some packages)

I will put as many 100n capacitors as the number of VDD pins. Also 4.7u bulk
capacitor will be placed.
I will connect VDDA to VDD through a ferrite bead, 100n capacitor and a 1u
capacitor.
I will connect VBAT to VDD.

3. RESET CIRCUITRY

I will pull it down to the ground using 100n. Also I will add a switch.

4. CRYSTAL CIRCUITRY
To enhance our knowledge of oscillator, we need to thoroughly read the
AN2867 - Oscillator design guide for ST microcontrollers . I will write down the
important parts of this guide.
 In most MCUs/MPUs manufactured by ST, RF is embedded in the oscillator
circuitry. Its role is to make the inverter act as an amplifier.

Choosing External Capacitors (CL1 and CL2)


The load capacitance is the terminal capacitance of the circuit connected to
the crystal oscillator. This value is determined by the external capacitors CL1
and CL2, and the stray capacitance of the printed circuit board and
connections (Cs). The CL value is specified by the crystal manufacturer. For
the frequency to be accurate, the oscillator circuit must show the same load
capacitance to the crystal as the one the crystal was adjusted for. Frequency
stability requires that the load capacitance be constant. The external
capacitors CL1 and CL2 are used to tune the desired value of CL, to reach the
value specified by the crystal manufacturer.
C L 1∗C L 2
C L −C S= =¿C L∧C S are given∈thecrystal datasheet .
C L1 +C L 2

For CL1 and CL2, it is recommended to use high-quality external ceramic


capacitors in the 5 pF to 25 pF range (typ.), designed for high-frequency
applications, and selected to match the requirements of the crystal or
resonator. CL1 and CL2 are usually the same size. The crystal manufacturer
typically specifies a load capacitance which is the series combination of CL1
and CL2. PCB and MCU pin capacitance must be included (10 pF can be used
as a rough estimate of the combined pin and board capacitance) when sizing
CL1 and CL2.
Note: For information on selecting the crystal, refer to the application note
AN2867 “Oscillator design guide for ST microcontrollers”.

I chose 8MHz oscillator and by the CL and CS values, I calculated the external
capacitors.

5. SWD CONNECTIONS

ACQUIREMENTS
Git and Github with Altium
Part Selection(MCU
ACQUIREMENTS
Git and Github with Altium
Part Selection(MCU

You might also like