-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Add support for L298N driver #54
base: master
Are you sure you want to change the base?
PR: Add support for L298N driver #54
Conversation
Please re-review your changes, it seems that you fixed some conflicts incorrectly |
# define FF 10 // motion control feed forward | ||
# define KP 3 // motion control propportional gain | ||
#>>>>>>> master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts leftovers
pinMode(pin_LED_AMP, OUTPUT); | ||
pinMode(pin_LED_FREQ, OUTPUT); | ||
pinMode(pin_LED_Fail, OUTPUT); | ||
pinMode(pin_USR, OUTPUT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those aren't supposed to exist anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nimrod Nimrod
Pin 5 is defined a Alarm reset It cannot be a PWM output .
define pin_RST 5
define pin_FORWARD 5
// L298N specific | ||
#define L298N false | ||
#define pin_SPEED 7 // analog | ||
#define pin_FORWARD 5 // digital | ||
#define pin_BACK 3 // digital | ||
|
||
// Talon SR or SPARK controller PWM settings ("angle" for Servo library | ||
#define PWM_mid 93 // was 93 - mid value for PWM 0 motion - higher pushes up | ||
#define PWM_max 85 | ||
#define PWM_min -85 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insert the motor's def to #if
statement so the unnecessary definitions won't be compiled
@@ -124,11 +124,12 @@ Use the Rate potentiometer to move the arm up/down. | |||
# define pin_AD 13 // Amp Down - not used when you have potentiometers | |||
# define pin_AU 13 // Amp Up - not used when you have potentiometers | |||
# define curr_sense false // o no current sensor | |||
# define control_with_pot true // 1 = control with potentiometers 0 = with push buttons | |||
# define control_with_pot true // 1 = control with potentiometers 0 = with push butto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert
@RuairiSpain , I've edited the IDE output to be only the last 2 lines. I'll update the PR temlate shortly to make it more clear that's all we are looking for. Please update the information about the build output to indicate your Arduino IDE version and board you chose, as well as the git hash you built which corresponds to that output. |
@@ -181,7 +181,7 @@ PenaltyReturnTypeOnItsOwnLine: 200 | |||
# Note: see DerivePointerAlignment too, as it takes precedence | |||
PointerAlignment: Left | |||
RawStringFormats: | |||
- Delimiter: pb | |||
- Delimiters: [pb] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this change do and why was it required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not my change but let me explain the pwm driver used up until now is a 40$ part the LM298N module is is a 2$ part it is not 10amps but even if you use a https://www.cytron.io/p-10amp-5v-30v-dc-motor-driver it is 10$ . To me dropping bom cost by 30$ or 35$ is a good reason.
As this is community Funded you need to Lower the BOM as far as possible.
Using 20$ pcbs for the TI sensor not 60$ Using PWM PCB that are High Volume not made
for REX Robotics for kids
https://www.cytron.io/p-10amp-5v-30v-dc-motor-driver 10$ (My option)
https://www.4project.co.il/product/l298n-module 5$ ( I do not know if 2amp will do)
2$ from Aliexpress type places.
https://www.revrobotics.com/rev-11-1200/ 40$
Note The Two Top option need PWM on 2 pins and care to create dead time . It Saves 30-35$ on the BOM . The Two Top options are far more of the Shelf Items.
Sorry For the Slow reply. Take a good look at this Project and the BOM costs
https://scitechdaily.com/easy-to-build-75-open-source-arduino-ventilator-with-high-quality-performance/ (it is CPAP I doubt the include the mask in 75$)
Note Today the funds to make 20 units stands on 4260$ Just over 200$ .two weeks into the campaign. To save 600$ on the 20 units for me is worth while and also off the mass produced if they get made.
Note 3v Level shift has been added to the pcb
Description:
Add support for L298N driver boards
Checklist:
./run_clang-format.sh
(see mainREADME.md for details on how)
build output below
the version number string at the top of "ventilation_machine.ino" and updated the Software Changelog
in the main AmboVent readme.
Arduino IDE build output:
Date and time I performed this build: YYYYMMDD-HHMMhrs
(git hash ???????) (IDE ?.?.??) (Arduino __ ? __)
Sketch uses 18140 bytes (59%) of program storage space. Maximum is 30720 bytes.
Global variables use 1076 bytes (52%) of dynamic memory, leaving 972 bytes for local variables. Maximum is 2048 bytes.