Community Question

There has been some discussion on the forum on I2C port extenders for the EZ-B so I thought it may be relevant to show what we are doing with this on the EZ;1 and EZ:2 robots.



The EZ-B is an I2C master so the external (18 pin) micro must be a slave (although it is possible to have more than one master on an I2C bus), in the video the EZ-B script sending the I2C commands can be seen running in the background.

The EZ:1 currently has 25 head functions, the single head micro does all the work (releasing the EZ-B to do other things) like controlling the eye servos, RGB LED pupils, PWM eye rims, smile LEDs, Frown LEDs, ear LED rims and also sends head sensor data back to the EZ-B. When in debug mode the micro also sends out the last command to an I2C LCD that's connected to the bus as you can see in the video. If the head was directly connected to the EZ-B it would use 12 EZ-B port lines.

User-inserted image
Toymaker
Commented January 2014
Hi Rich

I built up quite a big code library for PICs over the years, so what you see in the video is about a days work. But starting from scratch it would take you quite a bit of time to do the more complex stuff like I2C. All my boards have in-circuit programming, so I can download new firmware straight into the head itself, the in-circuit programmers are around £30.

If you need something specific (and dont mind waiting until I get some spare time), I could knock one up to your particular specification, then you will just need to add it to a stripboard. If you had an in-circuit programmer, then if you needed any modification, then all I need to send you is the .hex file

Tony
Rich
Commented January 2014
To be honest I'm just looking to add more strings to my bow more than anything else or anything specific.

Melvin's head could have done with it's own PIC for eye movement and LEDs etc. but now I've replaced the LEDs for BlinkMs it's barely worth doing for 2 servos. I will bear that in mind for future project though, I have a few things in mind that will need a lot of ports where I'd like them grouped together but that project is getting further and further away these days.
irobot58
Commented January 2014
@Tony , thanks for the update, and someone who has extensive experience with PIC s you would naturally implement them :) For me and a lot of others on the Forum keeping the programming simple (EZ) is desirable....but....one likes to explore other possibilities and to quote @Rich " To be honest I'm just looking to add more strings to my bow more than anything else or anything specific."
Glen
Toymaker
Commented January 2014
@Glen You can get ready made I2C I/O expansion ICs like this

www.robot-electronics.co.uk/htm/gpio14tech.htm

My PIC is slightly different as I also build in routines for things like facial expressions like happy/surprise etc and controlling the servos.

Tony
Steve S
Commented January 2014
Toymaker,
You have the experience I want to add to my robotics projects!
Thank You,
Steve S
Question
AvatarToymaker
Asked on Monday, January 27, 2014