School project how to connect NE555N DIP8 (timer) with arduino?

Thread Starter

Matt243

Joined Apr 18, 2023
2
How to connect a NE555N DIP8 (timer) with an arduino that will control the Modul motor driver L298N v2 which is connected to an electric motor.
Where do I need to insert the pins in the arduino and the timer and the L298N driver? And how to write the program?
 

Alec_t

Joined Sep 17, 2013
14,314
A '555 can only handle delays of a few seconds with any degree of repeatability and accuracy, so wouldn't be suitable for time-of-day timing.
 

dcbingaman

Joined Jun 30, 2021
1,065
Not sure about the Arduino. I generally use a PIC microcontroller. A lot of the PIC's come with built in 'Real Time Clocks'. I would imagine the Arduino would as well and probably has code examples. I would recommend using that, especially if you want to do something at specific times of the day. The 555 could never keep time good enough, not to mention it cannot handle Day Light Savings Time for you where an RTC can.
 

Reloadron

Joined Jan 15, 2015
7,517
Because the electric motor must rotate to the right at 7 a.m in the morning and to the left at 7:00 p.m
Motors don't turn left or right. They do rotate clockwise and counter clockwise. Depending on the motor going from CW to CCW may not be a good idea. You may want a brief stop.

Because the electric motor must rotate to the right at 7 a.m in the morning and to the left at 7:00 p.m
What is the plan for knowing what time it is?

What exactly are you looking to do? Exactly means in detail. What is the 555, L298 and the Arduino supposed to be doing? The L298 is an old solution for a motor drive. It does not use MOSFET technology. Any plan for motor speed?

How about you post your version of a hand drawn schematic or at least a block diagram?

Ron
 

Alec_t

Joined Sep 17, 2013
14,314
Things get posted in all sorts of inappropriate fora, but the design (if not actual build) of a coop door operating arrangement would be suitable as a school project. The 'turn right' and 'turn left' at 7am and 7pm are clues as to the end use.
 

Reloadron

Joined Jan 15, 2015
7,517
The chicken coop door projects normally open at dawn and close at dusk. I once baby sat my neighbors chickens and I let them out at dawn and let them back in the coop at dusk. Open door or not they would not go back in their house till dusk. Dawns first light and dusk do not happen automatically on a 12 hour interval.

On another note I worked with the fin drive motors on the tomahawk cruise missile and burn in consisted of running the motors forward and reverse at 12 hour intervals for 72 hours as part of acceptance criteria. About a dozen motors at a time in a test bed. :)

I have no idea where this is going.

Ron
 

djsfantasi

Joined Apr 11, 2010
9,163
Not sure about the Arduino. I generally use a PIC microcontroller. A lot of the PIC's come with built in 'Real Time Clocks'. I would imagine the Arduino would as well and probably has code examples. I would recommend using that, especially if you want to do something at specific times of the day. The 555 could never keep time good enough, not to mention it cannot handle Day Light Savings Time for you where an RTC can.
An Arduino does not have a built-in RTC. It does have several timing functions. If you need a RTC (like determining when 7am and 7pm occurs), there are many inexpensive RTC modules available with libraries for setting and reading the time with simple functions within the Arduino code. I provided a link to an appropriate DS3231 based RTC.
 

djsfantasi

Joined Apr 11, 2010
9,163
Or you can use a timer interrupt and a few lines of code to count 12 hour intervals.
The problem that may exist is setting the number of interrupts before the next trigger time. Let’s say we start the system at 13:27:53. How many interrupts will occur before 7pm? How are we going to input that initial count into the microprocessor? Use of an RTC does not require setting initial conditions.
 
Top