Page 3 of 3
Re: MIAC-RC LawnMower
Posted: Thu Jun 15, 2017 1:42 pm
by Monie Jacobsen
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!

- Egenskaber.JPG (27.56 KiB) Viewed 10262 times
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:
Re: MIAC-RC LawnMower
Posted: Fri Jun 16, 2017 7:24 am
by Monie Jacobsen
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?
Re: MIAC-RC LawnMower
Posted: Fri Jun 16, 2017 9:21 am
by LeighM
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
Re: MIAC-RC LawnMower
Posted: Fri Jun 16, 2017 10:07 am
by Monie Jacobsen
Hi Leigh
A lot of thanks and a nice explanation.
I will try your suggestions.
Will probably come with info.
Good weekend
Re: MIAC-RC LawnMower
Posted: Sun Jun 18, 2017 12:47 pm
by Monie Jacobsen
LawnMower Wheel steering!
I can not use the MIAC outputs in full bridge mode.
I have purchased SmartDriveDuo60 MDDS60

- SmartDriver.JPG (36.61 KiB) Viewed 10241 times
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

- RC-Reciver.JPG (16.53 KiB) Viewed 10241 times
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

Re: MIAC-RC LawnMower
Posted: Fri Jun 23, 2017 11:40 am
by Monie Jacobsen
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.

- Billede1a.jpg (144.55 KiB) Viewed 10181 times
Re: MIAC-RC LawnMower
Posted: Mon Jun 26, 2017 9:45 am
by LeighM
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)
Re: MIAC-RC LawnMower
Posted: Mon Jun 26, 2017 11:06 am
by Docara
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
Re: MIAC-RC LawnMower
Posted: Mon Jun 26, 2017 11:09 am
by Monie Jacobsen
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.

- Level Shifter, Logic Level Converter.JPG (24.57 KiB) Viewed 10140 times
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!
Re: MIAC-RC LawnMower
Posted: Mon Jun 26, 2017 11:59 am
by LeighM
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
Re: MIAC-RC LawnMower
Posted: Mon Jun 26, 2017 4:05 pm
by Monie Jacobsen
Hi LeighM
Thank you for the info I will continue on your info.