ST Micro in C Code

Thread Starter

beatsal

Joined Jan 21, 2018
391
I am trying to program a ST Micro in C, basically to control 3 motors. Is there any snippet of ready-made code I can use or if not, if anyone has done this, kindly suggest. Thanks
 

MrChips

Joined Oct 2, 2009
30,712
I am trying to program a ST Micro in C, basically to control 3 motors. Is there any snippet of ready-made code I can use or if not, if anyone has done this, kindly suggest. Thanks
I am doing it all the time.
Which ST micro?
What programming platform?
What hardware?
 

Thread Starter

beatsal

Joined Jan 21, 2018
391
I am doing it all the time.
Which ST micro? STM32G474VET6
What programming platform? KEIL MICROVISION
What hardware? 2x12vdcMOTORS for traction. theses are car seat motors. 1 motor 12V, 1A to actuate a shovel. CONTROLLERS 1 EACH FOR THE TRACTION MOTORS ARE IFX00, for the shovel motor from MCU to a buffer to the motor
 

Thread Starter

beatsal

Joined Jan 21, 2018
391
STM32G474VET6
KEIL MICROVISION
2x12vdcMOTORS for traction. theses are car seat motors. 1 motor 12V, 1A to actuate a shovel. CONTROLLERS 1 EACH FOR THE TRACTION MOTORS ARE IFX00, for the shovel motor from MCU to a buffer to the motor
 

MrChips

Joined Oct 2, 2009
30,712
Can you post photos of your MCU board, motors and controllers?
What do you want to do with the motors?
Do you have position encoders on the motors?
 

MrChips

Joined Oct 2, 2009
30,712
I can see the photos though they are not in focus. I cannot see the model of controllers that you are using.
Never mind, I would like to know in what manner you plan to command the motors.
You can start and stop the motors.
How do you decide when to stop the motors?
 

Thread Starter

beatsal

Joined Jan 21, 2018
391
Here is an attach. showing schem. of the 2 traction motor controllers. Initially start/stop will be done manually by pushbuttons then (when it covers a set distance) when it works, by GPS.
 

MrChips

Joined Oct 2, 2009
30,712
You still have not said what you are trying to do.
You can make a motor run, stop, reverse, stop.
You can do this with a switch. Why do you need a microcontroller to do this?
 

Thread Starter

beatsal

Joined Jan 21, 2018
391
I am trying to develop a robotic snow shovel (snows a lot here!). It will finally be controlled by GPS which would sense end of travel and then shut off the motors, so the switch I mentioned was for testing only - all control will be by microcontroller.
 

MrChips

Joined Oct 2, 2009
30,712
Ok, in order to avoid playing a game of 101 Q & A, I will make life easy for you.
I am doing the same thing. I am building a robotic lawn mower which has the same problems as your snow shovel.

GPS is not going to cut it. You need better resolution than that.
My lawn mover has to find the grass and stay off the neighbour's property. He's mean and has a loaded gun.
It has to avoid the four trees, the rock garden and the fish pond and not mow down the boss's pansies.
It has to miss the kid's skateboard, the baby crawling on the grass and not run over the dog.
And for heaven's sake, don't go anywhere near the dog doodoo!
I am sure I missed something important. :)

Edit: Oh yes. Then it has to go find the charging station when it is running out of juice.
 
Ok, in order to avoid playing a game of 101 Q & A, I will make life easy for you.
I am doing the same thing. I am building a robotic lawn mower which has the same problems as your snow shovel.

GPS is not going to cut it. You need better resolution than that.
My lawn mover has to find the grass and stay off the neighbour's property. He's mean and has a loaded gun.
It has to avoid the four trees, the rock garden and the fish pond and not mow down the boss's pansies.
It has to miss the kid's skateboard, the baby crawling on the grass and not run over the dog.
And for heaven's sake, don't go anywhere near the dog doodoo!
I am sure I missed something important. :)

Edit: Oh yes. Then it has to go find the charging station when it is running out of juice.
Mr Chips --please post a picture of your lawnmower with schematics
 

Thread Starter

beatsal

Joined Jan 21, 2018
391
Nice pix. I am sure GPS will work, since am using diff GPS (GETTING IT TO WORK IS ANOTHER STORY so want to tackle the project piece by simple piece starting with the traction).
However, you have not answered my original question - code for the 2 traction motors which are similar to yours.
 
Top