[Dprglist] Robotics in Costa Rica

Doug Paradis paradug at gmail.com
Tue Jul 31 08:08:09 PDT 2018


Eric,
   You can save one pin on the HC-SR04 by connecting both Echo and Trigger
together. If you use the Arduino newPing library for the sensor, the author
of the library discusses how to do this. Also, as you say you could just
set the motor controller standby pin high (5v).

Regards and good luck on the Science Fair.
Doug P.

On Tue, Jul 31, 2018 at 9:45 AM, Eric Yundt via DPRGlist <
dprglist at lists.dprg.org> wrote:

> Thanks, Clay!
>
> Clayton Timmons wrote:
> > Welcome BAAHCK Eric!
> > Always fun to get back to robotics.   Hope all is well in Costa Rica.
>  Would
> > love to chat and catch up.
>
> Come on down!  jajaja.  I've got the coffee on... a nice roasted blend of
> beans
> from our own farm out back -- just kidding!  I do have coffee plants
> growing but
> they are mostly for show, we drink coffee we buy from the super in a bag.
> ;-)
>
> I expect today is the big Robot day in our house.  Our parts from which we
> hope
> to build Rayo Pinky-Pie should have cleared customs yesterday and last
> night
> would have hopped a truck to the base of our volcano.  I'll head on down
> to pick
> them up this afternoon after I get confirmation they've arrived.
>
> So... I've never seen an Arduino before, but that seemed to be a goto
> brain for
> the simple robot these days.  I ordered an Arduino Uno, some "TT" gear
> motors
> with shaft encoders, the Pololu TB6612FNG H-bridge motor driver, a couple
> of
> HC-SR04 tweeters, a 10-80 cm Sharp IR sensor, the TCS3200 Color Sensor from
> Waveshare, the Pololu QTR-8RC reflectance array, a pair of foto
> interrupters to
> read the wheel encoders, an HS-422 servo, 2 7.4v LiPo battery packs and the
> DFR0205 25W DC-DC converter from DFRobot.  Plus a few sets of the basics
> our new Robot Lab lacks (variety packs of resistors, capacitors, hex
> standoffs,
> breadboard, jumpers, wire stripper, multimeter, etc.)
>
> If we can swing it all in time, we'd like to show the Robot with these
> skills:
>
>     Line Following (QTR-8RC LED array)
>     Find the Color (TCS3200 sensor)
>     Avoid Obstacles / Find Door (HC-SR04 & Sharp IR sensor)
>     Precision Driving (wheel encoders, odometry)
>
> After studying the Arduino pins a bit, our current plan is to hook up
> thusly:
>
>     Arduino Uno powered directly from 7.4v LiPo via Power Jack
>     Motors powered via 7.4v LiPo >> DFR0204 converter >> 6v
>
>     Arduino Uno pins:
>
>         A0 - Sharp IR Vo
>         A1 - QTR LED 3
>         A2 - QTR LED 4
>         A3 - QTR LED 5
>         A4 - QTR LED 6
>         A5 - TB6612FNG STBY
>         D0 - External Interrupt from Motor A Encoder DOUT
>         D1 - External Interrupt from Motor B Encoder DOUT
>         D2 - S3 Color Filter Select TCS3200
>         D3 - S4 Color Filter Select TCS3200
>         D4 - OUT Color Frequency TCS3200
>         D5 - PWM for HS-422 Servo
>         D6 - PWMA for Motor A via TB6612FNG H-bridge
>         D7 - AIN1 Motor A Direction via TB6612FNG H-bridge
>         D8 - AIN2 Motor A Direction via TB6612FNG H-bridge
>         D9 - PWMB for Motor B via TB6612FNG H-bridge
>         D10 - BIN1 Motor B Direction via TB6612FNG H-bridge
>         D11 - BIN2 Motor B Direction via TB6612FNG H-bridge
>         D12 - ECHO from HC-SR04
>         D13 - TRIG from HC-SR04
>
> Of course that runs us out of pins and I've only got 4 of the 8 LEDs for
> the
> line sensor array hooked up.  We can live with that, but six would be
> better!
> I didn't think about ordering any sort of shift-register or pin
> multiplexor stuff,
> nor did I plan for using the I2C or SPI interfaces.  So I've been mulling
> over
> our options...  I can wire STBY on the H-bridge HIGH so it is always
> enabled
> to free up A5 and the turn on LED pin of the TCS3200 HIGH to always have
> the color sensor LED on so no need to waste a pin for those.
>
> I've been trying to figure out if I can double-up on a pin or two to free
> some
> up for either more LEDs from our line sensor or to read a useful button
> state.
> Maybe we'll forgo using both the HC-SR04 and the Sharp IR in the same
> configuration and gain a pin or two that way.  I'd like to keep everything
> we
> might use connected to minimize stress and error on Science Fair day, but
> maybe we'll have to reconsider that and be prepared to carefully disconnect
> something to connect something else.  However we are a team consisting
> of a 5 year old who is a bit clumsy, a 6 year old who is most insightful
> and
> in the end will become the creative inventor, and a 7 year old who is very
> careful with his things.  I think our 7 year old could manage carefully
> undoing
> or redoing a jumper wire with practice...  Maybe all of this could be done
> using switches on a breadboard.  Yeah, that would be safer.  Too bad I
> didn't think about ordering some nice sized breadboard switches.
>
> Already I know we will wish we had more parts, but until I see how this
> flies
> with customs and import tax I thought we ought to get our basic rig going
> and then think about fancy.
>
> I found the RobotShop.com to be a wonderful one-stop shopping place which
> could consolidate all of our basic ingredients into a single shipment which
> simplifies things with my freight forwarder and Costa Rican customs.
>
> If anyone has any insight on our sensors or pin plan I'd love to hear it.
> I
> had to plan this out in theory and take a one-shot leap of faith on almost
> all
> of it.  Once we get rolling and the kids start playing with LEDs I'll be
> happy.  ;-)
>
> BTW, thanks to all involved with putting up such nice videos on DPRGclips.
> They are inspiring and very instructive.
>
> It looks like our mailing list doesn't handle including pics, but I'll
> attach my
> pin plan in case it makes it through.
>
> Thanks again for any feedback and insight on an Arduino Uno based bot.
>
> --
> Eric
>
>
>
> _______________________________________________
> DPRGlist mailing list
> DPRGlist at lists.dprg.org
> http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dprg.org/pipermail/dprglist-dprg.org/attachments/20180731/3d67aba7/attachment.html>


More information about the DPRGlist mailing list