I’m new in this Arduino world. Though I am a software programmer, I have never used a programmable board. I have downloaded and installed the Arduino IDE both in Windows and Linux o.s.
I need to control two motors for a tracked vehicle. The speed and steering must be proportional. Add to that that I will use a radiocontrol system, so the board should read pulse signals from two RC channels. RC signals are PWM from 1 to 2 ms, being 1.5 the neutral zone (with a dead band, I guess).
So far, I understand that I need an Arduino board and a H-bridge capable of driving two motors, like the L293D.
Now, I have size constraints and the UNO, present in almost every project I find in the Internet, seems to be quite large for my project.
My question is: Can I use a Pro Mini, Micro, Nano instead of an UNO? Are they compatible with sketches that run in UNO?
Besides, I need the board to provide 5V regulated (being 7.4V the power voltage) to the receiver.
This is a picture found of a project where the receiver is connected to an UNO:
The Pro Mini uses the same Atmel processor, the ATmega328P, as the UNO so code will generally run. That is not true of the Pro Micro that uses the ATmega32U4, but most sketches written for UNO will still run on the Pro Micro. The main thing is to be aware of what pins and peripherals the sketch is dependent upon. Watching what pins and peripherals are used is important on the Pro Mini as well, but most of them are the same. About the only thing the Pro Mini does not bring out is the AREF pin.
The UNO uses the NCP1117 voltage regulator that can supply about an Amp of current. The Pro Mini uses the MIC5205 regulator that can supply 0.15 Amps of current. So if you are expecting to power anything significant, you will need an external power source separate from the Pro Mini.
Not having looked in detail at specs or design, I would speculate that the Pro Mini will run the code just fine and control the H-bridge in the same way as the UNO, however the H-bridge will need to be powered separately from the Pro Mini.
rva1945:
Now, does it have a 5V (output) pin for powering a RX?
Yes, pin4 will output ~5v, either from a USB connection or a "raw" voltage > 7v. There's an on-board linear regulator (78M05) that can output a max of 500 mA, to be shared by the Nano and your receiver.
As for the regulated 5V for the RX, isn’t it limited to 0.150mA?
Anyway the RX will not be powering servosas it will just send pulse signals from two channels; I bet the current drain will not exceed 0.05mA, but I have to check it out.
Thanks again, I will stick to the Nano as it fits in my project.
rva1945:
As for the regulated 5V for the RX, isn’t it limited to 0.150mA?
The various Arduino boards have different voltage regulators and thus differing current capabilities. I will note that I wouldn't rely on the max numbers stated so far. Far too often the regulator design is not given the proper thermal considerations it should be to operate at peak current for any sustained period of time. So while you might get 500 mA initially, after a short time the regulator may begin to overheat and shut down.
In your case, there’s probably no concern, other than the battery voltage staying within limits. You mention 7.4v but I’ll assume that’s some nominal voltage (2 x 3.7v). That is when fully charged the battery pack is more than 7.4v (2 x 4.1v) and when fully discharged it’s less (? 2 x 3.0v ?). I suspect the more case isn’t a concern, the regulator will handle that. It’s when the voltage gets to <7v (if ever) that it becomes a concern. At some voltage <7v, (depending on the current draw, the temperature and the luck of the draw) the Nano’s regulator will come out of regulation. At that point, the 5v will drop volt-for-volt with the battery voltage. For example let’s say that in your case you can get down to 6.6v and stay in regulation but not any less. So at a battery voltage of 6.6v you’ll still get 5.0v out. But at 6.5v in, you’ll get 4.9v out. At 6.4v in, it’s 4.8v out. The 328p MCU is still going to work, even at 16 MHz, down to some lower voltage but I don’t know about your receiver.
I’ll note that the MIC5205 regulator, while capping out at 150 mA, is also more tolerant of low input voltages. It should produce a regulated 5v output even when the input is only 5.2v. So there’s that to factor into your choice as well.
I never drain my Li-Po batteries below 7V, and I always use a li-po voltage buzzer that will scream under a preset voltage level.
That, coupled with the low current drain that the two motors will have (less than 400mA each, and of course driven by a L293D or similar) will give me plenty of fun.