Questions tagged [microcontroller]

A device which includes a central processing unit (CPU), memory, and (generally) an assortment of I/O peripherals (UART, ADC, DAC, general-purpose I/O, I2C, etc.) in a tightly-coupled standalone package.

0
votes
1answer
24 views

12V Pump not working

I have interfaced a 12 V pump and a 12 V fan to LPC2138, there are 3 5 V sensors interfaced, according to which the fan and pump function. The whole setup is in PCB. There is a ESP8266 module ...
0
votes
2answers
58 views

Can I read flash from an MCU?

I have two ICs with STM8S005C6 MCUs. Is it possible to read flash from MCU of the first IC and write it to the other one? I checked the STMZ website for tools to read/write to MCU but they seem to ...
0
votes
1answer
40 views

Measure Power Consumption of Battery Charger?

I want to ask how to measure power consumption of battery (Li-On 18650) charger module (TP4056 and USB Boost) and the total power consumption, if i have this circuit: I have already know the power ...
0
votes
1answer
78 views

Increase LED Brightness

The schematic shows one row of my 16(row)x32(Col) LED matrix. Each row has 32 LEDs. I'm Scanning rows @ 1/16th rate.I'm using a PIC micro controller. I use 3V LEDs. The problem is LEDs are dim. How ...
1
vote
2answers
46 views

Understanding Mosfet Circuit with PWM

I am wanting to control a voltage range of 0-10v across a 10k load with PWM from a micro. Now I was told to use this circuit with an n channel mosfet: This is what I understand so far: R1 is to ...
2
votes
1answer
165 views

What is the meaning of the caution in hardware manual of a microcontroller

I am trying to understand the hardware manual of a microcontroller. Here is one caution in this manual: "The behavior and performance are not guaranteed when the alternative functions are not ...
2
votes
1answer
43 views

Why does the Datasheet for the ATMEGA88 have two pins for PORT D bit 5 (with different functions, too)?

The ATMEGA88 Datasheet has two pins for PD5 on page 3 for the TQFP layout. Those pins being Pin 9 and Pin 12. Normally, I wouldn't blink twice, but It seems that both pins have different functions. Is ...
0
votes
0answers
41 views

Alternator field winding VS equivalent inductor

I have a question which I know is going to be more opinion biased than factual. I know this isn't the purpose of the forum, but I would really appreciate some extra opinions so I'm going to ask it ...
0
votes
1answer
42 views

Are the results for Proteus simulation and hardware testing for same purpose using different controllers comparable?

I have used Proteus design suite for simulating sensors (such as temperature sensor) interfaced to LPC2138. The sensors which were not available in the software, for them I have modelled them as ...
1
vote
1answer
39 views

How to avoid duplicate messages in a mesh network of mcus

I'm working on a project, where each pcb has a connector on every side, so you can connect these board in a grid. It's basically a mesh network of modules. These modules need to communicate with each ...
0
votes
1answer
60 views

Atmega32u4 constant `1023` reading on ADC Channel

I can't share the schematics as they are not mine, I'm trying to add an analog thumbstick (4 pins, Vcc/GND/x/y) to my atmega32u4 powered keyboard. The thumbstick pins are connected to pins PB4 (ADC11)...
3
votes
3answers
193 views

Use the oversamplling followed by the “decimation method” to increase the ADC resolution and not normal averaging

To increase the 12-bit resolution of ADC from 12 bit to 14 bit, this can be done through the 'oversampling and decimation method'. An Atmel Application note says that The higher the number of ...
0
votes
3answers
74 views

Stepping down 25V-11V to power 5V micro-controller

I need to power a control circuit from a variety of LiPo batteries 3-6S (12.6V to 25.2V). The control circuit can draw up to 100mA at 5V (atmega328p + other discrete components, LEDs, etc). Choices I ...
0
votes
0answers
50 views

Programming ESP32 Microcontroller with FTDI's FT231XS USB Chip

Purchased FTDI's FT231XS from DigiKey I can see data from the ESP32 microcontroller but when I try to write to it, esptool just says connecting and nothing happens. I can use a usb to serial cable to ...
0
votes
2answers
89 views

Post build flashing of configuration data in embedded systems

I need to implement a mechanism by which I should be able to update the configuration data of some of the modules in a post-build fashion. To describe, consider I have the following files: ...
1
vote
2answers
64 views

How can I program an SOC without a hardware kit?

I am new to the production side of electronics. I was wondering if I can directly use a DA14683 to implement a size-constrained project. I have a few queries in mind Is interfacing a SOC similar to ...
0
votes
1answer
29 views

Voltage or Current Control with a Microcontroller for Pressure Regulator

I am wanting to control the flow rate of a pressure regulator (https://www.festo.com/net/SupportPortal/Files/505126/VEAB_2018-05a_8080669g1.pdf). My idea is to control this with a PWM signal 0-5v. ...
1
vote
2answers
124 views

STM32F7 device freeze: cannot access registers

I am encountering random freezes with the STM32F7. This issue is difficult to debug as any debug session launched in Eclipse crashes when trying to halt the core, which makes it impossible to see ...
4
votes
5answers
2k views

What is the criteria of choosing a given pin pattern in ICs?

For example, why in the Atmega328P or other MCUs, the group of ports are not contiguous? Like PORTC and PORTB in the Atmega example: Another example is this MC9S12ZV: In particular, checking the PPn ...
0
votes
4answers
160 views

How to avoid input floating ports on a microcontroller?

I have 16-bit Thunderbird12 Microcontroller, similar to the Freescale 68HC12. I'm currently working on a project to monitor and control the level of water. Everything is working fine except for the ...
0
votes
0answers
33 views

Best way to ground a pin when Power switch is closed?

I'm using a Particle Electron micrcontroller and powering it by connecting the battery through a power toggle switch. Since I also have a solar panel connected for battery charging, I need to GND the ...
0
votes
2answers
160 views

Can VCC and ground be swapped on a microcontroller?

We have a Particle Electron microcontroller connected to an Adafruit RFID Shield(PN532). Somehow, the microcontroller's VUSB (+5V typical) ended up connected to the GND pin of the Shield and the ...
0
votes
3answers
143 views

stm32 - is there a factory reset?

for the past couple of months I have been developing software for a custom build board. Due to a non disclosure agreement i am not allowed to share the schematics , PCB layout or software of the board....
1
vote
2answers
90 views

ESP32 powered by supercapacitors

It's been ages since I had to design something electrical so please don't laugh if this is stupid idea but I would like to power ESP32 with super capacitors, just for 30 sec or so so it can finish the ...
0
votes
1answer
61 views

How to improve flash time on lights controlled by solid-state relay via Arduino?

My goal is to flash lights around the house on and off to the beat of a song. When doing this with a mini LED and an arduino, it works perfectly with a "flash_time" of ~.1 seconds. This means ...
2
votes
3answers
202 views

How to prevent someone clone PIC [closed]

ACT 1 Okay I know there is code protection system on PIC. But it is preventing someone read the code, not copy. It looks still easy to clone and run on another circuit. Can you suggest another ...
0
votes
1answer
79 views

One led is blinking too frequently using the hardware timer (stm32f103vdh6)

i recently started my internship using embedded C and i'm having some trouble with one of the tasks: Two leds should be blinking at 1Hz, one using the hardware timer, and the other one using the RTX ...
0
votes
1answer
48 views

Configuring ADC on Nucleo-F401RE in Arduino IDE gives erratic values for input freq greater than 100Hz

I want to configure ADC on STM32(Nucleo-F401RE) using Arduino IDE and transmit the values through SPI to Basys 3 FPGA(End Goal). The ADC works for input signal frequency only below 100Hz. How do I ...
-1
votes
2answers
66 views

How do I connect AD9601 to stm32f429? [closed]

I have a problem in connecting an ADC (AD9601) to an stm32f429. I can see three 12-bit ADCs on stm32. But I am stuck in connecting this external ADC to the microcontroller. Need help to proceed ...
1
vote
1answer
41 views

How to connect STM32F429 with AD9748?

I have a problem with connecting STM32F429 with a DAC (AD9748). I found that STM32 has pins PA4 and PA5 that could be used as DAC_OUT. I have been trying to look ...
4
votes
1answer
492 views

Why are the capacitors necessary for a quartz crystal?

I read that it is recommended to connect 2 grounded capacitors to both ends of the quartz crystal. But that doesn't make any sense to me. Since capacitors have no resistance, wouldn't that make it so ...
0
votes
2answers
84 views

How to design an STM32 board with UART over a USB connection?

Sorry if this seems a stupid question but I'm designing a custom PCB based on the STM32F303RE microcontroller and am slightly confused as to how the UART should be connected in the hardware in order ...
1
vote
1answer
40 views

Pullup resistor operation between the ESP32 and a Bus MCU

I have an ESP32 as my main controller and a Bus. The bus operates where Pins 55 & 56 needs to be HIGH in order for the bus to be OFF. My ESP will drive the bus by enabling it by pulling those ...
0
votes
1answer
75 views

Problem getting board to board I2C communication to work on STM32

I have two boards working on STM32F030R8 and F030C6 respectively. I have been trying to get the boards communicate with each other using I2C but so far, no good. One of my boards run at 48MHz and the ...
1
vote
0answers
64 views

Does a Microcontroller act as a Capacitive load or resistive?

I'm designing a unity gain buffer (IC MCP6002) and in the datasheet, it says that a small series resistor is required at the output, if the load is capacitive and is >100pF. The input of the buffer ...
0
votes
1answer
42 views

DC motor & microcontroller sharing power suply: dc motor shuts off after a few seconds of running

I have the following circuit: When I close the mosfet gate (i.e. set pin 1 to high), the dc motor will run for a few seconds and unexpectedly then stop. Inspecting with a multimeter, I found that ...
-2
votes
2answers
108 views

LCD display is garbled in between operations on STM32

I'm using a 16x2 LCD for a project on STM32F030R8. I wrote a library for interfacing and everything was working fine until recently. It displays garbled junk values in between operations, especially ...
4
votes
0answers
109 views

Is it possible to power a MCU with a button press / touch? [closed]

I hope to use a piezoelectric button to harvest and produce a sufficient energy burst to power ON and bootup a MSP430 for a few ms enough to update a simple data structure (e.g. two integers stored in ...
1
vote
0answers
54 views

STM32F042 ADC Interrupt with STMCUBEMX

I need to read 15 channels ADC. However my MCU is specific named STM32F042K6T6. I decided to use an analog MUX to read every channel from just one pin. But, I didn't read accurately the datas by ...
6
votes
1answer
121 views

Using only stray capacitance for MCU oscillator circuits

I've included a diagram of typical Pierce oscillator circuit taken from ST Application Note AN2867: The note suggests that C_L1 and C_L2 should be chosen such that the following equation holds: ...
0
votes
2answers
98 views

Reading a high rate (400 kHz) analog input with an ESP32 (or Arduino)

Tried Googling this but I'm not really sure what vocabulary to use. I have a series of light sensors that will be detecting changes at the speed of 400 kHz (or 2.5 µs). I would like to use an ESP32 ...
1
vote
1answer
54 views

Using the GPIOs of an STM32 Discovery board

I would like to start learning how to program an STM32, because of this I bought the STM32L152C Discovery board. It's a very nice board, full of goodies, but I would like to use just part of them: ...
0
votes
0answers
58 views

CAN bus bit timing STM32F7 (bxCAN)

I am struggling with a bit timing of CAN bus. Perhaps, someone will be able to explain me, how it actually works. There are two configurations of the CAN controller inside STM32 (bxCAN). The desired ...
-1
votes
1answer
25 views

Pairing vs Master-slave between BT Module to BT Module

If I take two identical BT modules, for example HC05 or HC06 then is it possible to pair the two modules with each other or is it like you need 1 master and 1 slave module for pairing? Edit: Now I ...
-4
votes
2answers
109 views

0-3.3V to 0-5V step by step [closed]

I have a 3.3V microcontroller. I want to use dac. I will work 0-5V range. But my microcontroller has max voltage 3.3v. I want to use a amplifier. I wait your recommendation. note: how can i this. ...
-1
votes
1answer
64 views

Bluetooth vs BT Beacon [closed]

While trying to understand how BT devices work I came across another related term "BT Beacon". Is it same as BT communication or if a device is termed as BT beacon then it would have some specific ...
0
votes
1answer
64 views

RTC DS3231 get reset

The RTC module ZS-042 get suddenly reset and show default values (2000/0/0) with no possibility to change it no matter what. The reset can occur after uploading a new sketch (I'm using ESP32) or while ...
0
votes
0answers
31 views

Not getting reading back from HC-SR04 with PIC18F45k50 MCU

Hello I'm trying to measure the distance with HC-SRO4 ultrasound sensor PIC18F45k50 micro-controller however, I'm not reading any value on the LCD screen. Here is the following code that I have ...
0
votes
0answers
31 views

I need help on interfacing STM32F103C8T6 with MPU6050 on keil uvision

I need help with this piece of code. I don't know what I did wrong, or what I'm missing. It is a simple program to interface the stm32f103c8t6 with a gy-521 (the MPU6050 on it), I was able to get it ...
0
votes
1answer
61 views

What component should I use? H-bridge? Relay?

I am working on a senior design project that involves regulating the noise from headphones to make sure no damage to the ear is done. I have all parts working except the part necessary to switch the ...