Motorshield v2.3 and combined LCD with controller

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ericson95
 
Posts: 12
Joined: Tue Jun 01, 2021 3:59 pm

Motorshield v2.3 and combined LCD with controller

Post by ericson95 »

Hello there,

I'm using an Arduino Uno R3, an Adafruit Motorshield v2.3 and a Nema17 stepper motor. I soldered the Motorshield on the top of the Arduino board and everything works. Now I want to add a LCD screen and a controller to change the speed and to see the current rpm on the screen. I'm new in this electrical and programming field, so my question is which LCD/ controller (or maybe better two in one) would you use? I found this one: Adafruit 1.8" Color TFT Shield w/microSD and Joystick - v 2?

My second question is, if I want to stack this Color TFT Shield on my Uno and motorshield, can I use also the second inner pin line on my Motorshield for soldering (because I haven't use headers and the first pin line is connected to the Arduino Uno and I'm not good in removing the solder joints)?

Thank you very much in advance.

User avatar
dastels
 
Posts: 15658
Joined: Tue Oct 20, 2015 3:22 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by dastels »

That's possible. However, I expect that soldering to the header rows on the motor board will be awkward. It looks like you won't be able to connect to the stepper header in the event you every want to. In terms of pins and signals you should be ok as the motor shield just uses I2C leaving you the SPI signals and pins for device selects (display and SD card).

I'm wondering how/why you soldered to the UNO as all the ones I've ever seen have had rows of female headers.

Dave

User avatar
ericson95
 
Posts: 12
Joined: Tue Jun 01, 2021 3:59 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by ericson95 »

Oh sorry, but first thank you for your response. I didn't solder the Uno on the Motorshield, I meant I can't stack a second Motorshield or the attached LCD on the top of the Motorshield, because the first pin line is blocked with the male headers to be connected with the Arduino Uno (female headers). So it is no problem to solder female headers on the second pin line of the Motorshield and on the male headers on the LCD to connect each other?

What happened with the 12C when the Motorshield and the LCD is connected to he same pins?

Do you have an advise for a "better" LCD?

Erik

User avatar
dastels
 
Posts: 15658
Joined: Tue Oct 20, 2015 3:22 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by dastels »

That makes more sense. Realizing later that stacking headers would have been better in the long run is a drag. But yes, you should be able to put female header on the inner rows of the motor shield and male headers on the inner rows of the display shield. Notice that A4 and A5 don't line up because of the motor terminal block. But as of UNO R3 they are available on dedicated SDA/SCL pins at the far corner of the board. It also looks like you'll need to install appropriate 2x3 headers on the SPI connector at the end of the boards farthest from the UNO's USB connector. The display uses that.

There are bigger screen shields, but they don't have the second row of pins due to the size of the screen. The 1.8 also gives you 3 buttons and a joystick.

If you do end up wanting to attach servos you could remove the straight 2x3 header (assuming you soldered it in) and replace it with a piece of 2x3 right angle male header.

Dave

User avatar
ericson95
 
Posts: 12
Joined: Tue Jun 01, 2021 3:59 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by ericson95 »

Okay thank you, I also think about adding a touch screen on the top. Like this one :Adafruit 2.8" TFT Touch Shield v2 - Capacitive or Resistive
I would also buy a new Motor shield v2.3 and use the right headers to stack (1. Arduino Uno, 2. Motorshield v2.3 and 3. TFT Touch Shield v2). Do you think that works also and do I have any problems with the power supply (Arduino via USB or 12V adapter and Motorshield via 12V adapter)?

Ant would it be easy to integrate the control possibilities in the touchscreen like higher speed etc.?

Erik

User avatar
dastels
 
Posts: 15658
Joined: Tue Oct 20, 2015 3:22 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by dastels »

Those should stack well. Power should be fine.

I don't know what you mean by the last line.

Dave

User avatar
ericson95
 
Posts: 12
Joined: Tue Jun 01, 2021 3:59 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by ericson95 »

Thank you Dave! I meant in that case I wouldn't have a joystick or a push button to change e.g. the speed of rotation. Is it not so difficult as a beginner to integrate a command platform on the touchscreen? I found only a library for design the screen in different colours, but not with command push buttons on the screen (like speed rpm: 10 -> + increase and - decrease) :/

Erik

User avatar
dastels
 
Posts: 15658
Joined: Tue Oct 20, 2015 3:22 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by dastels »

With an UNO you're going to be limited as to how extensive you can get with the screen. Using several simple rectangular areas is fine. The touch screen lets you know when there's a touch, and where. If you have area defined for different functions then it's just a matter of comparing touch locations to those areas to see what is being touched on the screen.

You could draw the screen as a bitmap and draw it onto the screen on startup (say from the SD card), or draw it in code. It looks like the UNO will handle the GFX library quite nicely https://learn.adafruit.com/adafruit-gfx ... cs-library

Dave

User avatar
ericson95
 
Posts: 12
Joined: Tue Jun 01, 2021 3:59 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by ericson95 »

Okay thank you again. It would be just the change of the rotation of the stepper motor and maybe to display the current Temperature of a connected Thermo Sensor (MAX31856).
One last question (hopefully). How do I handle it, when the touchscreen needs D 4, 9, 10, 11, 12, 13, SDA (A4) and SCL (A5) and the Motor shield D 9, 10, SDA and SCL. SDA and SCL are no problem cause of I2C (I only need different addresses), but what is with D 9 and 10? I guess it is fixed defined in the library...

Erik

User avatar
dastels
 
Posts: 15658
Joined: Tue Oct 20, 2015 3:22 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by dastels »

D9 and D10 on the motor shield are used to drive the servo connectors. If you want to use servos there's a neat hack you can do to move them to other pins. The servo pins are labeled on the top of the motor board "Servo pins -> S1 S2" with "S1 S2" next to pads for D10 and D9 ON THE INNER ROW OF HEADER PINS. If you flip the motor board over you can cut the trace connecting the inner and outer pins for D9 and D10. Then solder a wire to the D9/D10 pins ON THE INNER ROW (which are now just S1 and S2, not D10 and D9) to two other pins that are capable of driving servos.

For servos you just use the Arduino servo library. You explicitly attach servo objects to specific pins, so you'd just have to reflect the change in servo pins.

Dave

User avatar
ericson95
 
Posts: 12
Joined: Tue Jun 01, 2021 3:59 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by ericson95 »

Okay that is great to hear... thanks, I don't want to use Servos, so they are not blocked. The Touchscreen has a 0x38 address and the Motorshield 0x60 - 0x80. Where I need to enter the address in the sketch?

User avatar
dastels
 
Posts: 15658
Joined: Tue Oct 20, 2015 3:22 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by dastels »

The library *should* default to the right address. Otherwise it's typically the begin() method for I2C devices.

Dave

User avatar
ericson95
 
Posts: 12
Joined: Tue Jun 01, 2021 3:59 pm

Re: Motorshield v2.3 and combined LCD with controller

Post by ericson95 »

Thank you Dave! I will let you know in that case nothing will work :D

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”