Questions tagged [timer]

Circuit to generate a signal a specific time after a trigger event. The timing can be defined by an RC time constant, or by clock pulses from an oscillator.

144 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
129 views

Timer activated by Reed on AC solenoid

Let me start by saying thank you for taking the time to read this - I really appreciate it! To the point: I am trying to create a 2-digit timer that resets and then starts at the activation of an ...
3
votes
0answers
1k views

Master-slave timing on ARM Cortex-M0

I have set up a slave timer that starts counting when the master timer is enabled. I want to know if the slave starts counting when the master timer receives a valid edge (my configuration is count ...
2
votes
0answers
48 views

STM32L4 LPTIM as pulse counter of intermittent pulses fails when initializing with no pulse

I'm working with LPTIM as a Pulse Counter on a STM32L432KC, I have a rain gauge connected to LPTIM1 (PB5) and a anemometer to LPTIM2 (PB1). Both configured on STM32CubeMX as Standalone: counts ...
2
votes
0answers
44 views

ADC Overrun with Multimode, Scan and timer-triggered configuration

I'm using the STM32F446VE with 3 ADCs. I have a 50 kHz PWM running and want 2 of the ADCs to measure 2 Channels synchronized with the 50 kHz PWM. To achive this I used the regular simultanuous dual ...
2
votes
1answer
66 views

STM32 Encoder Mode, CNT don't count

I'm using STM32L476RT. I've got encoders based on TLE4946-2K. I can't get it to work. I'm attaching my code and config below. I'm kind of stuck at this point - I tried to lower the voltage by divide ...
2
votes
0answers
55 views

STM32 Timer Discrete Jitter

I'm using a STM32F746 running at 200MHz. A timer (tim2) is counting up at 100MHz and triggers an update interrupt with the following simplified ISR that writes a pattern to GPIOB ...
2
votes
0answers
56 views

Can't seem to properly generate a delay via timer

So I am trying to create a delay using a timer but doesn't seem like it's working as expected. With a clock of 16MHz and a prescaler of 1, it should take 10us to reach a count of 160 (unless I did ...
2
votes
0answers
99 views

Cortex-M DWT cycle counter inconsistent measurement

I recently discovered that it's possible to use a free running counter embedded in most Cortex-M4 cores to measure the performance of a chunk of code. I'm trying it on my LPC4370, where I want to ...
2
votes
0answers
107 views

STM32F103 timer behaves differently after hardware reset instead of st-flash reset

I'm learning to program the STM32F103C8 Cortex-M3 (on a BluePill board) and was playing around with the general purpose timers (TIM2 to TIM5) because I wanted to time some routines. In my simple ...
2
votes
2answers
502 views

8051 baud rate calculator using 16-bit timer for software UART timing

I'm making a project in which pulsed laser beam data is sensed through many optical sensors (one sensor per port pin), so essentially, I'm going to be making 4 UARTs to sense this. Currently I am ...
2
votes
0answers
227 views

STM32L1 Discovery Kit 5MHz PWM Generation

I have been using the STM32L1 Discovery Kit with the STM32L152RCT6 MCU. A project that I am working on requires me to output two PWM signals. One of these is a 100KHz square wave and the other is ...
2
votes
1answer
2k views

What does TIM_OCMode do on STM32F4?

I'm making locked antiphase drive for motor control on STM32F4 board. Im configuring Timer4's 4 channels to be in pairs, ch2 inverse of ch1 and ch4 inverse of ch3. Each pair will control its own motor....
2
votes
0answers
5k views

STM32F4 HAL - PWM Phase shifting channels on the same timer

I've configured my STM32F407VG (STM32F4Discovery) TIM4 timer using the following code: ...
2
votes
0answers
305 views

ATtiny85, timer 1B does not work if COM1A1|COM1A0==0

I read the datasheet, and checked http://www.avrfreaks.net forum, but I cannot understand why on an ATtiny85: ...
2
votes
1answer
1k views

Achieving 32-bit timer resolution

I am trying to achieve 32-bit resolution using 16-bit timer on STM32F103. I found that ST provides an application note AN2592, however, I have two concerns regarding it: 1) I don't understand why are ...
1
vote
0answers
22 views

ATMega32u4 Timer code not working

The following timer code running on a 8Mhz ATMega32u4 should toggle the onboard LED every second, and calling the ISR code manually does so. Yet, the ISR does not seem to get called. Could anyone ...
1
vote
1answer
91 views

Reset and trigger 555 timer with one push button

I want to turn on a LED with a single push button. When the button is pressed, the LED has to be turned on for an X amount of time. But what I also want, is to turn of the LED with the same push ...
1
vote
0answers
51 views

LM555 no output even when trigger is high or low

Good Day! I have been banging my head on the desk because I am failing to get the attached circuit work after PCB assembly. I am using Circuit Wizard and my circuit diagram and PCB simulation works ...
1
vote
0answers
110 views

STM32 - Configure Output Compare Registers on the Fly

since this is my first, feel free to give newbie a feedback :) I have a following setup with my STM32 Nucleo (simplified, ignore the HW behind): a) one input signal acquisition (Square wave, consider ...
1
vote
0answers
22 views

Timer not having output after initial powering

DGM TIMER RELAY BOARD 12V 1S-1HR Time Delay ON or OFF 12V Relay Board with jumper settings and 8 Time Ranges selectable from 0.1s up to 1 hour accessing loads 250VAC 10A or 30VDC 10A I believed this ...
1
vote
0answers
142 views

STM32 TIM2 changing prescaler in IRQ handler works strangely

I am trying to change a prescaler in the timer interrupt handler, and I expected the new value would become active for the very next timer delay. I mean that after the handler exits, the timer will ...
1
vote
0answers
16 views

Cadence simulation graph versus time

please do not know if there is a functionality in CADENCE in the graphs show differences in the times between them (make an average of two values). Regarding the delay of two waves [Automatically in ...
1
vote
0answers
308 views

What is the difference between TIMx_IRQHandler and HAL_TIM_PeriodElapsedCallback function?

I am a beginner, I am using the stm32F103 interrupt function TIM1_IRQHandler function to count, but HAL_TIM_PerodElapsedCallback can also achieve accurate counting, which one should I choose to use? ...
1
vote
2answers
568 views

555 PWM motor driver controlled by external analog signal

I used the below 555 timer PWM circuit to control the speed of a dc motor, and it works like a charm :) now i have a requirement to change the PWM speed externally from another module, that module ...
1
vote
1answer
59 views

M2P DMA transfer with trigger from a different peripheral

The microcontroller on my board is STM32F429IGT6 and I want to use a timer as a trigger of a DMA -e.g. HTIM_SOUND_SAMPLER- and transfer my data from an array to CCP of another timer -e.g. ...
1
vote
0answers
93 views

CircuitLab simulation of 555 timer - OUT HIGH always delivering 5V irrespective of Vcc?

I've scratched together a design for a 555 timer based driver for an IR540 MOSFET. But in CircuitLab the simulator shows the 555's OUT voltage is always 5V when high, for Vcc ranges 3.3V through 24V. ...
1
vote
1answer
144 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 ...
1
vote
1answer
562 views

How to disable timer on MSP430?

I am new to the TI MSP430G2553. I would like to send a PWM signal like in this picture: (Image source: Adafruit - Understanding Infrared Signals) However I can't do that, because I don't know how to ...
1
vote
1answer
77 views

Need help to identify this timer

This device is installed in our electrical panel which act as a timer to control the on/off operation for our LED billboard outside my office. I searched around the device for the brand and model it ...
1
vote
0answers
56 views

IoT wireless solenoid circuit

I am a Newbie and I do not have a lot of expirience. The circuit has been put together from pieces I have found on the internet. My goal is to develop a reliable wireless solenoid circuit to water my ...
1
vote
1answer
65 views

MSP430F2272: Timer B Capture giving shorter measures than the real ones

I'm using: CCS V8 MSP430F2272 DSO-x 2024A Agilent oscilloscope Trying to measure elapsed time between pulses with Timer B, Capture Mode. My square wave source is at 50 kHz and my timer_b clock at 1 ...
1
vote
0answers
40 views

Simple coountdown timer IC that is independant of supply voltage

I'm designing a shutdown circuit that switches off a SMPS regulator after a 10 second time interval. This is a battery powered application and the battery voltage could be anywhere between 7-15V. I'...
1
vote
0answers
100 views

556 circuit not working

I just got my 556 timers and I wired it up just like the 555 but now: it flashes one HighTime and stays off then... I used this calculator and basic diagram: http://www.ohmslawcalculator.com/555-...
1
vote
0answers
315 views

STM32F407 - how do I run one motor at a time? Why do they ignore delays..?

I'm a newbie. I'm using an STM32F407 discovery board, and I want to control 6 stepper motors using PWM, especially OPM(One Pulse Mode). Till now I've made 3 stepper motors work using Timer 8 (CH1, ...
1
vote
1answer
61 views

Simple residential blower control

Basic question is: Is it permissable / safe to connect a $10 plug in timer relay with potential for backfeed from a second source? 20 watt fan being switched. This is a SIMPLE question, compared to ...
1
vote
1answer
60 views

Problems with dividing a clock with 2 command bits

I am trying to make a clock divider commanded by 2 bits :DTPS. For instance if DTPS is: "00" we get the clock as output(2^0) "01" we divide the clock by 2 (2^1) "10" we divide the clock by 4 (2^2) "...
1
vote
0answers
297 views

STM32F4 OC Clock Jitter

I am using STM32CubeMX to configure an STM32F4 to output a clock signal using Timer 3, Channel 4 on PC9. I have read in the datasheet PLL section that jitter shouldn't be more than 15ps RMS but I am ...
1
vote
2answers
279 views

How to replace an LED with a diode and stop LED after timer ends?

So I have been working on this circuit that basically will activate an LED when the lux levels drop low enough. The time that the LED will remain active for is determined by VR4. I'm having two issues ...
1
vote
0answers
255 views

How to vary the range of a potentiometer…is this even possible?

I am a total noob so apologize if this doesn't belong here but I haven't had any luck finding an answer to this... I have a simple circuit with two 555 timers...similar to an Atari Punk Console. I ...
1
vote
1answer
135 views

Aircraft Starting Mockup Display With Buzzer Question

I am stuck in the middle of building a circuit for an aircraft starting mockup that will train our students to correctly start the aircraft without accidentally re-engaging the starter and thus ...
1
vote
1answer
946 views

Control a 12 v circuit using wall plug 220v ac timer

I want to use a standard supermarket 220v ac timer to switch a 12-volt circuit. I was thinking about letting the timer run on the outlet, and just desolder the relay separating it from the ac, keeping ...
1
vote
0answers
1k views

STM32F107 generate PPM signal

I need generate special signal PPM for my rc toys, for example: I'll use stm32F107 and I would use a timer which will be a resolution of 0.1us. The web is a lot of examples to generate the PWM signal ...
1
vote
0answers
738 views

How to set MSP430 Driver Library timerA configurations

I am using MSP430F5529 and MSP430 Driver Library. As you can see, I set upMode timer configuration, compare mode configuration and enabled the initial interrupts. However, timerA interrupt is not ...
1
vote
0answers
46 views

Only allowing input after x amount of time

I've been given a problem to solve - When the input is high (sensor), a timer should start which outputs high for 10 minutes (camera active). After 30 minutes, if the input is high, the process ...
1
vote
0answers
136 views

pic timer triggers twice

I'm programming a pic18f24k50 using Timer0 to trigger an interrupt every 5ms. I'm handling USB interrupts too Here is the code where I init the timer: ...
1
vote
0answers
360 views

PIC12F simulator: Why isn't the oscillator running?

I have written firmware for a PIC12LF1572 that I am testing in the MPLAB X simulator. The program runs and correctly responds to stimuli, except when it needs to wait for a timer interrupt. After a ...
1
vote
0answers
59 views

Circuit that takes input signal and controls led

I am trying to design a circuit that compares a recorded signal to a stock signal. If they are not similar it then inputs a signal into a circuit which will change the pulse of the led to stimulate a ...
1
vote
1answer
501 views

Using a diode or resistor, to supply minimal voltage to LED Driver (Help!)

I'm using a dual 60W LED multi-chip pendant lighting (a.k.a. "high bay" pendant light with two 60W LED chips). This light is using an RGB driver (one per multi-chip) that has a remote control to ...
1
vote
4answers
45 views

What device can I use to parallel 4 dry contact signals from 4 timer relays

What device can I use to multiplex 4 dry contact signals from 4 timer relays to actuate an isolation valve? In other words, any of the signals from the timer relay should be able to actuate the ...
0
votes
0answers
40 views

Encoder high speed error

Our encoder ( https://www.andymark.com/products/redline-encoder-kit ) counts per revolution is 4096. We try to get the encoder data by using CubeMx with Encoder Mode and interrupt. We use encoder mode ...