Using and arduino with a 12v motor

I’m trying to make an automatic feeder for my pets and I’ve found several projects online but none suit my needs exactly so I’ve kinda taken ideas from all over. The problem I have is that I am new to arduinos and everything so was wondering if I could get some help and advice on how to hook these components together and maybe suggestions of things I need to replace.

The feeder is a hopper going to a horizontally 3D printed auger. I want to drive the auger with a 12v motor but know I need some sort of shield or driver to have the motor drive off the arduino. Here is my supply list so far

Arduino uno

L298N motor shield (suggestions for replacement?)

16x2 LCD display module

Real Time Clock (automatic feeding)

12v 2a ac adapter (wall power supply)

Momentary button (for manual feed)

12v 100rpm motor

Find the stall current of the motor. The stall current is drawn every time the motor is started. The stall current should be listed on the motor data sheet.

Go to a vendor, like Pololu, to find a quality motor driver. Choose a driver based on motor rated suppy voltage and stall current. Make sure that the driver will handle stall current.

If the L298 will handle the voltage and stall current of the motor you can use it. Just be aware of how inefficient its ancient BJC output stage is.

Use an I2C enabled LCD with the hd44780 librarary.

DS 3231 RTC modules are superior to old DS130x moodues.

Those two go together; you will need to know the (stall) current that the motor requires. You can have a look at the drives from e.g. Pololu: Pololu - Brushed DC Motor Drivers.

You don't specify if it's I2C or parallel; look at examples to see how they can be wired. If you have one with I2C, you can hook it up to A4/A5 or to SDA/SCL (they are the same oins of the processor). If it's not an I2C version and assuming that you need some form of speed control of the motor, you will probably need to keep some pins of the Arduino that are capable of PWM free; pins in the examples that match PWM pins can be moved to A0 to A3 and you can adjust the code.

If you haven't bought one yet, get a module with DS3231. It uses I2C and you can either use SDA/SCL or A4/A5.

That can be connected to any free pin; preferably between pin and GND.

I would simply use a solid state DC relay to run the motor. They are not expensive. There are many form factors available at varying prices. I use one similar to this:

The display is 12c and the RTC I got has DS3231. I’ll have to look at the stall current and specs on the motor. Thanks

I want to run the whole device by plugging it into the wall either the 12v adapter. After doing some research I was under the impression that it would be too much voltage for the arduino directly so I’d have to run it to the shield and then to the arduino. Is that correct? And does the relay help with that at all? I’m thinking the relay is supposed to take a small signal from the arduino that opens a gate?

You can use a buck converter to drop the voltage to about 8V for Vin. If you are not in any rough environment it may work just fine from the 12V. I am assuming the plug in supply can supply enough current to support the motor inrush current and the relay will control the motor. The UNO can supply a small amount of 5V, normally enough to run what you want.

Hi, @jakefisher
Welcome to the forum.

Do you need to run the motor forward and backwards?
If not then you can use a single MOSFET switch instead of a very inefficient L298N .

Tom... :smiley: :+1: :coffee: :australia:

Difficult to imagine you need to run auger feeder backwards... So the question is, do you need speed control or that 100rpm is good as it is. In that case all you need is just normal 5V relay and diode or relay module.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.