TinyCircuits Forum

TinyCircuits Products => Wirelings => Topic started by: RobotDave on September 16, 2020, 02:11:18 PM

Title: RobotZero DC motor difficulty
Post by: RobotDave on September 16, 2020, 02:11:18 PM
Hello, I have the RobotZero board trying to drive a pair of DC brushed motors.  I started with the RobotZero Basic Sketch on the tutorial  (https://learn.tinycircuits.com/Wirelings/RobotZero_Tutorial/) but figured out quickly the included stepper motor example won’t work with my DC motors.

Next I’m trying to use the code for the TinyShield since it’s using the Attiny841 processor and the DRV8837 driver chip (identical to what’s on the RobotZero).  Not having any luck with the MotorDriverBasic sketch included on that page.  I’m not reading voltage through any of the 4 lines coming from the motor connector, even after opening the Serial Monitor (and there’s no message saying the driver wasn’t detected)   (https://learn.tinycircuits.com/Motors/Dual-Motor_TinyShield_Tutorial/)

Is there an example sketch that will run DC motors on the RobotZero board?
Thanks for the help in advance.
Title: Re: RobotZero DC motor difficulty
Post by: lennevia on September 21, 2020, 06:08:49 PM

First things first, always make sure you have a battery plugged in to power the motors (since their power supply is different from the VCC on the rest of the board). That may help resolve any issues with the Motor TinyShield.

As for the RobotZero, the first released revision does not directly support DC motors. The next revision that supports DC motors has been designed, but not yet implemented in production.

You can, however, cut some traces on the board in order to allow DC Motor control. I have attached an image that shows the two traces you would need to cut on the board. You can make these cuts with a sharp hobby/X-ACTO knife. After these cuts, it would be difficult to solder them back together even with the proper equipment - so you would not be able to use stepper motors after this modification. This is a good solution if you only care about DC motors.

For using the DC motors after the modification, I attached an image showing which pins to use on the RobotZero (the two pins closest to the battery port with power on the left, and ground on the right in respect to the attached image) and an example program with a new DC motor function to control DC motors.

I hope that helps!

Thank you,


Title: Re: RobotZero DC motor difficulty
Post by: RobotDave on September 21, 2020, 10:16:55 PM
Thank you for the comprehensive response
-  Yes I had the battery plugged in during testing.
-  Thank you for providing a means for DC motors to work with the  RobotZero; I'm looking forward to try it out. 
-  I made the mistake of pulling the data sheet for the DRV8837 motor driver chip used on the board without looking at the schematic closer to see if a true Phase/Enable scheme was possible instead of only Step.  It would be great to add some clarification to the technical material for the RobotZero page and tutorial to specify it's configured for stepper-only without these new mods. 
-  BTW, the functions packed onto the RobotZero are impressive and with the Wirelings selection it's a very powerful offering in such a small size.   Can't wait to get it all working.  Nice work and keep it going!
Title: Re: RobotZero DC motor difficulty
Post by: lennevia on September 24, 2020, 02:42:16 PM
I will definitely take some time in the next few weeks to update the Learn page with the DC motor possibility for Rev3 - I am sure you will not be the last person to ask about the possibility.
Title: Re: RobotZero DC motor difficulty
Post by: RobotDave on September 26, 2020, 02:58:54 PM
Update:  I performed the mods and ran the new sketch.  The end result is perfection, +/- PWM voltage on pins 1 and 2 of the motor connectors.  Breaking the traces was a bit sketchy using a 10x visor magnifier and x-acto blade; I'd highly recommend a proper microscope for doing that.  Scraping a bit of the mask off the round via helped to get a  spot to check that the connection was broken to the VQFN pin.  All-in, very doable for people with a steady hand.

Thanks again.  BTW, I cannot see the attached files or images unless I log into the forum.  Not sure how the forum settings work but others may want to see those files?

Title: Re: RobotZero DC motor difficulty
Post by: lennevia on September 28, 2020, 12:36:39 PM
Glad to hear everything went well for you! In the next Rev, we are thinking there will just be some small software change for DC motors rather than the board modification.

As for the forum viewing, I wasn't aware of that! I am not sure if it can be altered with the security on the forum, but I will definitely look into it.