See inline.

On Mon, May 4, 2015 at 4:57 AM, Andrew Robinson <mi16c...@gmail.com> wrote:

> Hi Everyone
>
> Im fairly new to electronics and programming.
> I am now a fair way though building my android/ioio powered robot tank,
> and am looking to clear a few points up on my final design.
> I have attached a basic wiring diagram using paint, so forgive its rather
> childish appearance!
>
> I have a couple of queries on if I have everything set up correctly.
>
> First query is around the servo. I am a little confused about how to set
> this up with a ioio.
> I have the servo power running from the 5v out and GND of the ioio board,
> and the PWM signal from pin 40.
> I have seen other servo servo projects use a pull up resistor, which Im
> currently not using. (I have read the sparkfun
> <https://learn.sparkfun.com/tutorials/pull-up-resistors>and ioio wiki
> <https://github.com/ytai/ioio/wiki/Digital-IO> articles and I just cant
> get my head around this concept)
>
>
>    - Servo control seems ok to me and is working in tests, do I need this
>    in place?
>
> The reason for this resistor is that when your app is not running the IOIO
will not assert either high or low on the pin, but rather put it in a
high-Z (aka tri-state) state which is, very roughly speaking,
"disconnected" or floating. It is not generally wise to connect something's
(e.g. your servo's) logic input to a floating signal, since it is undefined
what the voltage is going to be. Hence, we put a weak resistor between this
signal to either high (3.3V) or GND, so that when the IOIO is not driving
we have a well-defined voltage there.


>
>    - If I do need it, does this go on the PWM line, or the positive or
>    gnd wire?
>
> Doesn't strictly matter, but I'd pull it to GND.

>
>    - Would the value of this resistor change based on which type of servo
>    I am using?
>
> Not really. Anywhere between, say, 4.7k to 100k is probably OK across the
board. The bigger the better (less loss).

>
>    - Also would I be better powering this servo
>    <http://www.servodatabase.com/servo/hitec/hs-303>direct from a battery
>    (assuming correct voltage supply), or is the IOIO safe to supply a servo
>    with power?
>
> That depends on the current consumption of the servo. The IOIO 5V
regulator can supply up to 3A. It is also well protected against over
current so don't worry about experimenting. This should be well capable of
supplying at least 3-4 standard size hobby servos.


>
> My second query is around my motor driver board.
> This takes a 5v logic input, and anywhere upto 12v input power for driving
> the motors.
> I am using two separate 7.2v batteries, one to power the ioio and the
> logic for the motor driver, and the second battery for the motors, and
> other accessories I will be adding later.
>
> I would like to be able to isolate the accessories from the power as to
> try conserve power for when the robot is idle.
> To do this I bought a 2 channel relay module
> <http://raspimart.co.uk/shop/5v-dc-two-2-channel-relay-module-for-arduino-raspberry-pi-pic-avr>
> .
>

Are you sure this is not a total overkill? Most motor drivers, when in
"sleep" or "shutdown" mode would consume very little power.


> I have not yet fitted this, but the attached wiring diagram is how I
> believe it would hook into everything.
> I would use pin 13 on the ioio to tell the relay to close, complete the
> circuit and power up the motor driver, or anything else on the other side
> of the relay.
>
> As the relay module uses 5v for its logic
>
>
>    - *again should I be using a pull up resistor here?*
>
> Couldn't find a proper spec for the relay board. If it indeed expects a 5V
logic input, then yes, you'd need to use a 5V-tolerant pin on the IOIO, use
it in open-drain mode and pull up to 5V. Keep in mind, that with this
configuration for the pin, e.g. when your app is not running would be HIGH,
which may or may not be what you want. Then again, as I said, you probably
don't really need the relay. It is a very inefficient way to achieve what
you need.

>
>    - and can anyone give me pointers on what value it would need to be?
>
> Doesn't matter much. Try 10k or so.


>
> Many thanks for reading and for any help offered.
>
> Thanks
>
> Andy
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ioio-users+unsubscr...@googlegroups.com.
> To post to this group, send email to ioio-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ioio-users+unsubscr...@googlegroups.com.
To post to this group, send email to ioio-users@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to