MIAC-RC LawnMower
Moderator: Benj
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC-RC LawnMower
Hi LeighM
It is with great regret that I have to ask for a downside!
Output on MIACdsPIC as:
Tur_Forward_Back (Macro)
OutputON D continuously blinks for approximately 1 sec ON / OFF
Turn_Rigth_Left (Macro)
OutputON B flashes continuously for about 1 sec ON / OFF
Have tried but many options in Properties but unsuccessfully! Can not see how to solve the problem?
Do you have a suggestion for the above flashes constantly ON / OFF
Hope you will be helpful
Please see Attached file:
It is with great regret that I have to ask for a downside!
Output on MIACdsPIC as:
Tur_Forward_Back (Macro)
OutputON D continuously blinks for approximately 1 sec ON / OFF
Turn_Rigth_Left (Macro)
OutputON B flashes continuously for about 1 sec ON / OFF
Have tried but many options in Properties but unsuccessfully! Can not see how to solve the problem?
Do you have a suggestion for the above flashes constantly ON / OFF
Hope you will be helpful
Please see Attached file:
Best Regard
Monie
Monie
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC-RC LawnMower
Hi LeighM
MIAC dsPIC og 2 x PWM
PWM 1 and PWM2 are both declared Enable and are not changed anymore in this loop.
Why does PWM 1 and PWM 2 Disable run within Loop.
Is there anyone here what's going on?
And what to change and where?
MIAC dsPIC og 2 x PWM
PWM 1 and PWM2 are both declared Enable and are not changed anymore in this loop.
Why does PWM 1 and PWM 2 Disable run within Loop.
Is there anyone here what's going on?
And what to change and where?
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: MIAC-RC LawnMower
Hi Monie,
I am not sure how your hardware is designed.
But assuming you have two motors, one on the left and one on the right, and that you want your mower to go forwards, backwards and turn.
I which case I would suggest that you use the MIAC outputs in full bridge mode.
That is, connect the left motor to outputs A and B, connect the right motor to outputs C and D.
Set PWM1 channel 1 to output on PORTF.0 and that will control the power to the left motor.
Set PWM2 channel 2 to output on PORTF.1 and that will control the power to the right motor.
Each motor direction is then controlled by the OutputON() OutputOFF() macros, for example:
Left motor stop
Left motor forward
Left motor backwards
The right motor is controlled in the same way, just use 3 and 4 as parameters in place of 1 and 2.
I would then suggest that you use the variables, that you have got from the pulses, Turn_Forward_Back and Turn_Right_Left.
From Turn_Forward_Back you can get the power variable to set for the duty_cycle of both PWM channels.
From Turn_Forward_Back you can also get the forwards true or false.
From Turn_Right_Left you can get straight, left or right.
From this information you can determine if each motor should be stop, forwards or backwards.
Hope that helps, sorry I don't have the time to write that as a program for you.
But if you need any more help let me know.
Leigh
I am not sure how your hardware is designed.
But assuming you have two motors, one on the left and one on the right, and that you want your mower to go forwards, backwards and turn.
I which case I would suggest that you use the MIAC outputs in full bridge mode.
That is, connect the left motor to outputs A and B, connect the right motor to outputs C and D.
Set PWM1 channel 1 to output on PORTF.0 and that will control the power to the left motor.
Set PWM2 channel 2 to output on PORTF.1 and that will control the power to the right motor.
Each motor direction is then controlled by the OutputON() OutputOFF() macros, for example:
Left motor stop
Code: Select all
OutputOFF(1)
OutputOFF(2)
Code: Select all
OutputON(1)
OutputOFF(2)
Code: Select all
OutputOFF(1)
OutputON(2)
I would then suggest that you use the variables, that you have got from the pulses, Turn_Forward_Back and Turn_Right_Left.
From Turn_Forward_Back you can get the power variable to set for the duty_cycle of both PWM channels.
From Turn_Forward_Back you can also get the forwards true or false.
From Turn_Right_Left you can get straight, left or right.
From this information you can determine if each motor should be stop, forwards or backwards.
Hope that helps, sorry I don't have the time to write that as a program for you.
But if you need any more help let me know.
Leigh
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC-RC LawnMower
Hi Leigh
A lot of thanks and a nice explanation.
I will try your suggestions.
Will probably come with info.
Good weekend
A lot of thanks and a nice explanation.
I will try your suggestions.
Will probably come with info.
Good weekend
Best Regard
Monie
Monie
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC-RC LawnMower
LawnMower Wheel steering!
I can not use the MIAC outputs in full bridge mode.
I have purchased SmartDriveDuo60 MDDS60 I do not want to use the 2 RC Reciver inputs!
As pictured below
Want to use Flowcode dsPIC MIAC wants to be able to load other devices And want to use FlowCode coder to control MDDS60.
MDDS60UsersManual:
http://www.robotshop.com/media/files/pd ... Manual.pdf
Please see here!
Page No: 2
Page No: 20
There are different Input Mothes
Analog/PWM Input Mode - Page No: 18
Simplified Serial Mode - Page No: 21
Packetized Serial Mode - Page No: 23
Is there anyone here that will help me get an output to MDDS60 from
FlowCode, which is attached here! I would like to hear different suggestions
I can not use the MIAC outputs in full bridge mode.
I have purchased SmartDriveDuo60 MDDS60 I do not want to use the 2 RC Reciver inputs!
As pictured below
Want to use Flowcode dsPIC MIAC wants to be able to load other devices And want to use FlowCode coder to control MDDS60.
MDDS60UsersManual:
http://www.robotshop.com/media/files/pd ... Manual.pdf
Please see here!
Page No: 2
Page No: 20
There are different Input Mothes
Analog/PWM Input Mode - Page No: 18
Simplified Serial Mode - Page No: 21
Packetized Serial Mode - Page No: 23
Is there anyone here that will help me get an output to MDDS60 from
FlowCode, which is attached here! I would like to hear different suggestions
Best Regard
Monie
Monie
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC-RC LawnMower
Hi LeighM
I can not get MIAC dsPIC to use SmartMotorDriveDuo60.
But is anyone here on forums that will help modify or make suggestions on how to get MIAC dsPIC and SmartMotorDriveDuo60 to run together?
Below are a few pictures of LawnMower under construction.
I can not get MIAC dsPIC to use SmartMotorDriveDuo60.
But is anyone here on forums that will help modify or make suggestions on how to get MIAC dsPIC and SmartMotorDriveDuo60 to run together?
Below are a few pictures of LawnMower under construction.
- Attachments
-
- Billede2a.jpg (145.47 KiB) Viewed 9296 times
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: MIAC-RC LawnMower
The simplified serial would be the easiest to use with the controller,
the only problem being that the controller expects 5v logic level,
but the MIAC serial is RS232 line voltages (and inverted)
so you could use something like a MAX232 level convertor chip (powered from the 5v out of the SmartMotorDriveDuo60)
the only problem being that the controller expects 5v logic level,
but the MIAC serial is RS232 line voltages (and inverted)
so you could use something like a MAX232 level convertor chip (powered from the 5v out of the SmartMotorDriveDuo60)
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: MIAC-RC LawnMower
Hi,
Just looking at your pictures - I cant help thinking the wires from the battery bank are too small (CSA).
Comparing them with the wires connected to the white terminals block, which I am presuming are connected to either the motor controllers or motors themselves, they look half the size. Have you done a volt-drop calculation based on your current (load).
You must consider that the battery wires need to supply everything unrestricted (basically) to the load to give full performance, in my opinion the wires are too small and the use of those insulated crimps are a poor choice.
I would consider 4mm2 wire size a minimum, unisulated crimps and heatshrink and not forgetting a main fuse to protect the battery bank before any other connection.
Matt
Just looking at your pictures - I cant help thinking the wires from the battery bank are too small (CSA).
Comparing them with the wires connected to the white terminals block, which I am presuming are connected to either the motor controllers or motors themselves, they look half the size. Have you done a volt-drop calculation based on your current (load).
You must consider that the battery wires need to supply everything unrestricted (basically) to the load to give full performance, in my opinion the wires are too small and the use of those insulated crimps are a poor choice.
I would consider 4mm2 wire size a minimum, unisulated crimps and heatshrink and not forgetting a main fuse to protect the battery bank before any other connection.
Matt
Last edited by Docara on Mon Jun 26, 2017 11:09 am, edited 1 time in total.
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC-RC LawnMower
Hi LeighM
Thank you very much for responding to my posts
I have an EB015 - RS232 Board
And 2 pcs Level Shifter, Logic Level Converter 12-Channel. Can these devices be used?
I do not know how you meant connets between MIAC dsPIC and RS232?
And code for controlling the RS232 Board from MIAC dsPIC.
Can even connect Logic Level Converter!
Thank you very much for responding to my posts
I have an EB015 - RS232 Board
And 2 pcs Level Shifter, Logic Level Converter 12-Channel. Can these devices be used?
I do not know how you meant connets between MIAC dsPIC and RS232?
And code for controlling the RS232 Board from MIAC dsPIC.
Can even connect Logic Level Converter!
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: MIAC-RC LawnMower
The EB015 - RS232 Board will work well.
Connect (Tx and Rx) wires from the EB015 "To PIC board" connector to the MDDS60,
Connect the MIAC RS232 Tx and Rx to the EB015 "To PC" connector.
Have a look at the EB015 and MIAC datasheets for details.
The MDDS60 simplified serial commands are listed in the MDDS60 Users Manual
Connect (Tx and Rx) wires from the EB015 "To PIC board" connector to the MDDS60,
Connect the MIAC RS232 Tx and Rx to the EB015 "To PC" connector.
Have a look at the EB015 and MIAC datasheets for details.
The MDDS60 simplified serial commands are listed in the MDDS60 Users Manual
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: MIAC-RC LawnMower
Hi LeighM
Thank you for the info I will continue on your info.
Thank you for the info I will continue on your info.
Best Regard
Monie
Monie