Arduino Code Ultrasonic PWM

AMC, H-Bridge projects etc.
Please use the image gallery for your pictures, a short tutorial can be found here.
The first image in the first post will be shown in the project gallery.

Arduino Code Ultrasonic PWM

Postby TomKlash » Sat 6. Jun 2020, 15:13

Hi,

I am creating this subject because I would need the help of people who know how to code ARDUINO. I use a code which allows to control the motors of my SIMU via MotoMonsterShield cards the famous VNH2SP30. The code was written by RacingMat then updated by it to pass the PWM from 580 Hz to 20KHz in order to avoid the unpleasant engine noise on these low frequencies.

However, this reference code is written to drive 2 motors and I use 3 for my SIMU.

For the classic code I was able to transpose it to go from 2 to 3 engines.
By cons concerning the code "ultrasonic" I am not able it requires knowledge that I do not have (my field being the mechanical design).

Obviously it is necessary to intervene on the Timer of the Arduino and following the pins which one wishes to pass to 20KHz it is necessary to modify the timer 0, 1 or 2 ...


If someone can help me it would be very nice of him, and I would not hesitate to return the favor in my area of ​​competence obviously.


I post here the origin of the information and the Arduino codes.

Forum Links:

https://forum.arduino.cc/index.php?topic=135847.30
https://pobot.org/Modifier-la-frequence-d-un-PWM.html


http://www.racingfr.com/forum/…php?showtopic=47537&st=15


The codes :

Basic code 2 engines: https://drive.google.com/open?…_yZX1rz-lY-PTmK5LeYIxeRnb
Code for 3 engines: https://drive.google.com/open?…C2jUUlreRaaVPRkoOlxYMsuVR

Code for 2 PWM 20KHz motors: https://drive.google.com/open?…PofxcrGqS7KObC2sSQScYjRmf
TomKlash
 
Posts: 28
Images: 40
Joined: Fri 10. Jun 2016, 17:37
Has thanked: 1 time
Been thanked: 0 time

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 1 guest