0

Arduino Lesson 16
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Arduino Lesson 16

by PeteBrad on Thu Apr 30, 2020 12:07 pm

Hi. I am a rank beginner at microcontrollers but I do have hardware and software experience on computers and peripherals. I am finding the wealth of choices in this field somewhat bewildering but I am starting to navigate my way through it. The next step is to gain some practical experience.

I have a little project that I want to try and in searching around I came across your Arduino Lesson 16 which would seem to give me a good starting point.

Consequently I am looking at buying an Adafruit METRO 328 and various other components to start playing with. I have some small questions however.

Why is the lesson using an L293D and a breadboard instead of using a motor shield? Either the Arduino Motor Shield or your own Adafruit Motorshield kit would seem to perform the functions of the lesson. Having said that I do see you have a tutorial for the Adafruit Motorshield kit. An alternative choice might be your Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board.

What I am trying to achieve is a low power consumption battery powered instrument with a small stepping motor. I would ultimately need to fit a button to trigger repositioning of the stepping motor if required. I could describe it a little like a clock but it will go both clockwise and anticlockwise. The motor will only have to carry an light indicator needle so it does not need to be particularly powerful. Low power consumption is the ultimate aim.

As far as I can see I can do everything I want with the Metro 328. I would like to know if, once I have it doing what I want I can then transfer the program to a smaller microcontroller board such as the Adafruit Trinket M0?

PeteBrad
 
Posts: 43
Joined: Thu Apr 30, 2020 10:45 am

Re: Arduino Lesson 16

by adafruit_support_bill on Thu Apr 30, 2020 12:30 pm

Sounds like you may want a gauge stepper like this one: https://www.adafruit.com/product/2424
That can easily be driven with the TB6612. The TB6612 requires at least 4 GPIO pins to operate. The Trinket M0 has 5 GPIO pins, so as long as you only need one button for repositioning, you should be able to port your project to that.

adafruit_support_bill
 
Posts: 81528
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Lesson 16

by PeteBrad on Fri May 01, 2020 6:33 am

adafruit_support_bill wrote:Sounds like you may want a gauge stepper like this one: https://www.adafruit.com/product/2424
That can easily be driven with the TB6612. The TB6612 requires at least 4 GPIO pins to operate. The Trinket M0 has 5 GPIO pins, so as long as you only need one button for repositioning, you should be able to port your project to that.

Thanks for the reply.

I did see the gauge stepper but it is out of stock at the moment and I was worried that it may be a little small as I am thinking of a needle of about 10cm (4 inches). A friend has just offered to give me an Arduino board and stepping motor that he used to learn about stepping motor control. I will see if I can get basic functioning with that and then switch to Adafruit components and a suitable stepper to complete the project.

PeteBrad
 
Posts: 43
Joined: Thu Apr 30, 2020 10:45 am

Re: Arduino Lesson 16

by cdb0ewm on Tue Sep 29, 2020 3:31 pm

This lesson is great. I want to do something very similar to this but with a Nano 33 IoT, which doesn't have a 5v. Is there anyway to get this done, maybe powering the LD23D and the stepper with an external 5v?

cdb0ewm
 
Posts: 48
Joined: Tue Nov 04, 2014 6:30 pm

Re: Arduino Lesson 16

by adafruit_support_bill on Tue Sep 29, 2020 3:39 pm

Yes, you can provide 3.3v for the logic level to pin pin 16 (+V). And 5v for the motors to pin 8 (+VMotor).

Image

adafruit_support_bill
 
Posts: 81528
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Lesson 16

by cdb0ewm on Tue Sep 29, 2020 4:30 pm

Thanks for the quick reply. How about the 5v ground?

cdb0ewm
 
Posts: 48
Joined: Tue Nov 04, 2014 6:30 pm

Re: Arduino Lesson 16

by adafruit_support_bill on Tue Sep 29, 2020 4:38 pm

All grounds must be connected together.

adafruit_support_bill
 
Posts: 81528
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Lesson 16

by cdb0ewm on Tue Sep 29, 2020 4:42 pm

Perfect
Thank you

cdb0ewm
 
Posts: 48
Joined: Tue Nov 04, 2014 6:30 pm

Re: Arduino Lesson 16

by cdb0ewm on Wed Sep 30, 2020 3:45 pm

Just to make sure I'm getting the right Pin 8, which pin is it relative to the dot that is in the corner of the L293D?
Thank you

cdb0ewm
 
Posts: 48
Joined: Tue Nov 04, 2014 6:30 pm

Re: Arduino Lesson 16

by adafruit_support_bill on Wed Sep 30, 2020 4:04 pm

The dot indicates pin 1.

adafruit_support_bill
 
Posts: 81528
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Lesson 16

by cdb0ewm on Wed Sep 30, 2020 4:36 pm

Thank you

cdb0ewm
 
Posts: 48
Joined: Tue Nov 04, 2014 6:30 pm

Please be positive and constructive with your questions and comments.