Hello there! I just wanted to make sure that my electrical circuit is correct. The project is working, but I want to be 100% sure it’s just right. Here is the code for this scheme:
That is a nice diagram, but how do we know that is actually what you did. Either a lot of overhead photos so we can see both ends of each wire, or easier is draw by hand the actual wires and post that.
If it's working, whay do you expect for feedback?
You might want to look at a modern controller, the L298 is often used as a room heater. The Polulu site has a lot of good data. Here is the google answer.
The best, most efficient, and modern replacements for the L298N dual H-bridge motor driver are MOSFET-based, featuring higher efficiency (90%+) and no need for large heatsinks. Top replacements include the TB6612FNG (1.2A, 3.2A peak) for small robotsDRV8833 (1.5A–2A) for low-voltage applications, and VNH2SP30 (30A) for high-power demands.
Welcome Back!
I expect you will have problems. Typicall AAA batteries will look like this:
Alkaline discharge curve is sloped, not flat.
Typical pattern:
1.60 V fresh
1.50 V quickly after light use
1.40 V mid-life
1.30 V usable
1.20 V near end
1.10 V weak
1.00 V mostly done
The L298 will drop 3 volts leaving you 5V on the motor at end of battery life. The PP9 is a bad choice to power the Arduino, it will discharge very quickly.
Looking at your picture it will not work and go through batteries in short order, they have there outputs shorted together.
The 9V will not be supplying enough to properly power the Arduino Mega over time. The battery will start at about 9.8 and drop to about 6.5 when discharged. The minimum voltage for Vin is 7V, that is reached when the battery is about 75% used up.
Your pictures do not pass as an annotated schematic, the language of electronics, and is very hard to follow. It requires a fair amount of knowledge about the parts. There is no indication of what parts you used. These wiring diagrams assume the builder has the exact same parts.
sonofcy, the code for the sensor to take data from the wheel was made with artificial intelligence as I needed some Software Repeat Implementation for the buttons inside the app which managed the motor, so I never ran into the details much. Actually, I do not know exactly how the sensor is managed with the C++ code. The most important thing is the electrical scheme, the code seems to work.
gilshultz, thank you for your reply! The parts on the scheme are just those ones that I used:
Arduino Leonardo
TM1637 Display
8 x AA Battery Pack
Speed Sensor Like FC-03LM393
TT Motor Reductor Arduino
Bluetooth HC-05
Motor Driver L298N
Arduino Mini Breadboard
Arduino (DC Barrel Jack)
Encoder Wheel
Krona 9V
I built it in reality twice. The speed sensor shows 0 - 7 km/h against 0-255 PWM. Of course, I need more being sure in data precision to make it more practical.
sonofcy, no, thank you. I just wanted to be sure that what I have been doing is correct. Yesterday, I forgot about additional ground for this scheme and had to rebuild it quite much.
You missed the links: for example the Battery, possibly a PP3:
Krona produces several types of 9V batteries, including alkaline, lithium, and rechargeable variants. The most common types are marked with designations like 6F22, 1604, and 6LR61, among others.
At this point with the lack of information, I have other things to do with mi time! At this point I will simply say Good Luck!