Need help wiring arduino board, 2 motors & remote control

Hi everyone- I have just joined this site as I am 100% clueless when it comes to electronics. I have agreed to help my son with a school project. We have 2 motors we want to control via a remote control. I have I have an xc4431 Leonardi tiny arduino board, a L298N motor driver, an xc4427 infrared receiver module (and a remote control) and a battery pack. Can anyone help us with details on how to wire these together? Thank you in advance.

Can you attach a picture of an xc4427 receiver?


Hi RAPTOR7762- Uploaded as requested and thank you.

Ok I did use such a thing with Arduino before BUT

  1. I did not use an IR with L298N ESC
  2. I used the IR with an L293D H-bridge with Arduino tho

You just need to work out the voltage of the Leonardi Board. I don’t know how to code with that, so you are likely on your own…

You would need to provide web sites that describe all the parts you want to use with physical dimensions and connector information so we can identify existing parts or make new ones. There isn’t enough here to do much with.

Peter

Thank you RAPTOR7762- I appreciate your time in getting back to me.

Thank you Peter. I will source the information and post it. However I am not wedded to the components, so am happy to take advice on what we would need or change. I realised I didn’t properly explain the project so:

  • Looking to use 2 small motors to roll forwards and backwards to move a rolled up display showing the 6 house names for my son’s school (think Hogwarts and Hufflepuff, Slytherin etc…)
  • We want to use a remote control to change the display of the 6 houses
  • I was advised the Arduino board was a good option to use as easy to program
  • Was advised to use a L298N motor driver as has dual outputs for 2 motors
    I have attached an image generated by ChatGPT which I know is not correct but was using that as a baseline.

First thing to consider is how heavy are the rolled up displays. It sounds like they may be fairly heavy and thus small motors may not be able to move them. Gear motors can trade speed for torque to move something heavy more slowly. Larger motors need more power and will probably require larger batteries and other components (or will run for a shorter time, until the battery runs down.) Your best bet there would be to try moving the displays with the motor connected to a power supply to both make sure it can move the displays and to find out how much current it draws to move them. You likely need to use another Arduino as there currently doesn’t appear to be a Fritzing part for the xc4431 Leonardi tiny arduino. That isn’t necessarily a show stopper it is easy enough to make a part for it (except there seem to be almost no information about it on the net), but there are other Arduinos that already have Fritzing parts. I suspect most of the excitement may be in getting the mechanics of the motors moving the displays as there are many things that can go wrong in that, making it the thing to start with. Once you know how much current the motors need to move the displays then you can select appropriate motor drivers and batteries (which will also require you to know how long the battery needs to last.) You will most likely need a switching regulator connected to the battery to provide regulated 3.3V or 5V to the arduino and the motor driver (the motor voltage can come directly from the battery most likely as it shouldn’t need to be regulated unless you need constant speed.)

Peter

Thank you Peter- really appreciate the steer, and looks like i have a lot more initial research to do.
Can I just say as a new user here, this forum is pretty awesome!

A google search for “RC Smart Robot Toy Chassis” turns up a bunch of options with motors (there are more, than this that I remember seeing but don’t remember the search term) that may be a good start. Depending on how much current your motors need, there are smaller lighter motor drivers than the L293D and weigh (the heat sink on the L293D will make it heavier) is important for battery life. Feel free to post questions, someone here will probably have an answer.

Peter

You can use L293D as a workaround. L298N is big and bulky

@vanepp @RAPTOR7762 Thank you guys. I have ordered a a L293D driver. I am using the Arduino IDE software to code the Arduino board, however I am now questioning if the c4431 Leonardi tiny arduino board is the best fit ir if I need something else. I need it to be small and the commands are only basic, so move both motors simultaneously a certain amount of revolutions. Have you programmed one if these arduino boards before? (Again- apologies if my terminology is incorrect)

The nano has a Fritzing part in core parts


but is slightly larger

There are a couple of ESP32 boards of a similar size available as fritzing parts (I think, although I have never used them) also supported by the Arduino IDE. There is very little documentation on the xc4431 Leonardo tiny and what there is is contradictory, it claims to be able to take 7-12V but appears to be powered by the USB cable (which won’t exist in your case I don’t think) and doesn’t have any pins labeled as power input (of course I can’t find any pin out description at all!) I suspect it won’t be a good choice due to the lack of documentation. The nano is the smallest Arduino that they sell, there is this smaller one

which has a VIN pin which will likely take between 7 and 12V to power the unit without the USB cable which could come from a boost type switching regulator from the battery. I expect that or a nano would be your best bet. The aliexpress one comes from China and may be long delivery if you are in the US. The nanos are commonly available pretty much anywhere. The local parts stores here in Canada have them in stock.

Peter

@vanepp Hi Peter- apologies for the late response. I managed to connect all the components and write the Arduino code and it works perfectly. Now I want to shrink them all down. (Having never programmed anything or soldered anything before it has been a steep, yet fun and satisfying learning curve)
For the next iteration I have ordered the fllowing parts:

  • Seed Studio XIAO RP2040 microcontroller
  • TB6612FNG DRV8833 DC Motor Drive Module Dual Motor Driver Board (TB6612FNG)
  • 2 * Ruimou DC 6V 100RPM Speed Reduction Motor N20 3mm Shaft Mini Metal Gearwheel Gear Motor with Full Metal Gearbox
  • 5mm Infrared Emitter VS1838B Infrared Receiver
  • DC 3.7V 1100mAh 102050 Rechargeable Lithium Polymer Battery
  • V Micro USB 1A TP4056 18650 Lithium Battery Charging Board with Protection Charger Module

parts help It looks like I will need to obtain a custom PCB board for these components. are you able to provide any guidance on wher and how I can have one built? Thank you in advance.

1 Like

There should be Fritzing parts for most of these so you can produce a pcb in Fritzing. There are some places that (within limits I think and I am not sure how expensive one unit is going to be!) that will assemble boards but the usual way is to order boards from a board supplier such as Ainsler or pcbway (both available in the fab tab in Fritzing) I think but have no experience with both will build boards. You likely need to create a pick and place file which you need to manually edit to get it in to a form the board house will accept (there is a post in the forum on how to do that for pcbway I think.) You may be best to order just boards and assemble it yourself (that may in fact be your only choice at any affordable price, I expect custom assembly is expensive!)

Peter

A late response:

I have been happily using Aisler in the past and they have provided reasonable prices and quality, particularly for prototyping (1 board costs as much as 3 boards, but affordable in comparison to some others who charge tooling cost).

Also intricate details did throw warnings but the resulting boards were still perfect despite ignoring the warning (e.g. holes for specific LED holders very close to tracks and vias).

You have the option to pay more to get it it quicker but if time is not so critical then price is absolutely okay even for hobby projects (IMHO).

I cannot say much about pcbway though.