Motor MIND B with BSpx module
Hello,
Being complete new to the roboticsworld,·I have a probabily quite easy question. I want to use the motor mind B just for controlling a motor (no tach or brake function). I thought a command like SEROUT 1,1646 [noparse][[/noparse]85,3,127] would make the electrical engines turn at half speed. I also tried it with hexadecimal values, but nothing happens. The Motor mind B receives a valid signal because the green led blinks. After a few hours of search, I'm out of tricks. I'm going to use the SETDC_DIR command. If anyone can give me the code lines he uses for this, please do.
My kindest regards
Being complete new to the roboticsworld,·I have a probabily quite easy question. I want to use the motor mind B just for controlling a motor (no tach or brake function). I thought a command like SEROUT 1,1646 [noparse][[/noparse]85,3,127] would make the electrical engines turn at half speed. I also tried it with hexadecimal values, but nothing happens. The Motor mind B receives a valid signal because the green led blinks. After a few hours of search, I'm out of tricks. I'm going to use the SETDC_DIR command. If anyone can give me the code lines he uses for this, please do.
My kindest regards

Comments
Here is what I used . . .
http://www.parallax.com/dl/docs/prod/motors/MotorMindbMan.pdf
Read the whole thing, but what you really want is the schematic at the bottom of page 10. Works like a charm!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Thank you very much for your help.
The Motormind spec sheet says the default baud rate is 2400 baud.
Your command SEROUT 1,1646 [noparse][[/noparse]85,3,127] specifies a baud rate of 600. The "1646" = 600 baud.
You might try changing the "1646" to "396", which is 2400 baud.
Dave
Silly me. Just after I pushed the send key, I noticed my error. 1646 is correct.
You might try 18030(inverted) and see what happens.
Dave
If you are using two power supplies in your setup, the grounds should be connected together, i.e. you
need a "common" ground for the system.
Dave G
The baud rate is correct to· because the green led on the motorcontroller B blinks when I send my information. I think there is something wrong with my last information. I send 85 for synchronisation, 8 for SETDC_DIR command and then -64 (or another deimal beteen +/-127). Is it possible I need to convert this to a hexadecimal or 2's compliment value? And do I need to specify the order of the bits? I tried the hexadecimal and 2's compliments conversion, but it still doesn't work.
THis is the code I used with a BSIIP to control a MMB:
' ************************ ' * Conditonal Compile * ' ************************************************************************* #SELECT $STAMP #CASE BS2, BS2E, BS2PE T2400 CON 396 T4800 CON 188 T9600 CON 84 T19K2 CON 32 T38K4 CON 6 #CASE BS2SX, BS2P T2400 CON 1021 T4800 CON 500 T9600 CON 240 T19K2 CON 110 T38K4 CON 45 #CASE BS2PX T2400 CON 1646 T4800 CON 813 T9600 CON 396 T19K2 CON 188 T38K4 CON 84 #ENDSELECT ' ************************ ' * Constants * ' ************************************************************************* ' Motor Mind B Settings MMBpin CON 8 ' Pin to which MMB is connected MMBsync CON $55 ' Serial com init MMBBaud CON T2400 ' Serial rate of MMB MMBstop CON 0 MMBlow CON 38 ' low speed value MMBmedium CON 75 ' medium speed value MMBhigh CON 255 ' High Speed Value ' ************************ ' * Set the motor Speed * ' ************************************************************************* SEROUT MMBpin,MMBbaud,[noparse][[/noparse]MMBsync,3,MMBmedium] ' Set the MMB speedThe above code worked with both a MMB (original) and an MMB with the newer firmware. I dont have an MMBe to try it with though... Hope this helps.
Vern
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Take a look at Solutions Cubed, the manufacturer of the MMBe. This link has several programs that worked for me.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.