Phobot Rover Kit v1

Hello everyone.

First and foremost, sorry if my questions and explanations are pretty basic, this is all new for me.

I built my Phobot Rover Kit and it works perfectly well.

I would like to continue building onto it but I’m not 100% sure of what’s left as input / output from the Photon board now that it’s mounted on the Phobot shield.

I would like to add a micro servo (ES08A). I know there are M1 and M2 free but I would need an analog input to drive the micro servo. I’m not sure to read it properly but from the Phobot scematic here (https://github.com/simonmonk/PhoBot/blob/master/hardware/Scematic.pdf) all the Photon analog inputs are already used.

How could I connect the micro servo?

Thank you a lot for your time and your help!

A6 (aka DAC) and A7 (aka WKP) seem to be unused analogRead() pins.

But why do you need an analog input for driving a micro servo?

1 Like

Hello @ScruffR and thank you a lot for your reply!!

But why do you need an analog input for driving a micro servo?

Sorry, you are definitely right, I need an output which supports PWM like D0 or D1 on the Photon board. Do you see 1 unused on scematic?

Do you mind explaining to me how you read the linked scematic to find A6 and A7 as unused?

Thanks!

RX/TX are PWM capable I think, but I'll have to check back.

Update:

So you got three unused PWM pins to play with :wink:


There is neither a trace connecting the pin to any other component (as seen for D2/D3) nor is there a tag attached (as seen on e.g. A0..A5).

I’m not familiar with the PhoBot other than looking at the schematic above, but it looks like it exposes the I2C interface on J2.
If you want to drive a lot of additional servos you could use something like a PCA9685. That can drive 16 servos off a single I2C interface on the Photon. Adafruit has a breakout board for it (Part 1411).

So you got three unused PWM pins to play with :wink:

Thank you a lot @ScruffR!!

If you want to drive a lot of additional servos you could use something like a PCA9685. That can drive 16 servos off a single I2C interface on the Photon. Adafruit has a breakout board for it (Part 1411).

Nice! Thanks a lot! So many things I don't know...

@rickkas7, do you know a I2C component that does inputs, outputs and PWMs?

I would like to use the I2C to extends the number the of inputs / outputs. As far as I understand the PCA9685 does not support inputs. I found the MCP23017 but it does not support PWM and also it seems there are users having issues using it with the Photon…

Thanks for your help!

I suspect there isn’t actually such a component, but it doesn’t really matter. The way I2C is designed, you can connect multiple devices to a single I2C bus. They can be different types of devices (PWM output, GPIO, analog DAC/ADC, etc.) even from different manufacturers and usually they will coexist on the same I2C interface.

OH! That’s a really good news!

How can address them if they are living on the same I2C interface then?

Each I2C device has its own factory-defined address. Because the address space is very small (7 to 10 bits) there are some conflicts, but most well-known parts from reputable vendors like NXP don’t conflict because NXP allocates them. These addresses are baked into the libraries that you use to access the devices so you don’t need to worry about it; it is should just work.

Also, some devices allow for multiple instances of the device on a single I2C bus. A common example is the DS-75 temperature sensor. There are 3 pins on the chip that allow you to select which of 8 possible instances of this device this is on a single I2C bus.

Incidentally, a common alternative to I2C is SPI. The Particle products support SPI as well as I2C, and even both at the same time on different pins.

Thank you a lot for all the details!

I think the pins required for the SPI are not available anymore once you connected it with the PhoBot. I only have the I2C left. I will look into 2 I2C devices that can live together.

I Tweeted Monk for this info, but this helped even faster! Needed 2 analog pins for LDRs. Thanks!

1 Like