Page 1 of 1

Adding 4 Powerfunctions motors and/or 4 NXT/EV3 motors

Posted: 18 Jan 2015, 01:58
by floppi
Hi,

At the beginning I just wanted to add power function motors to my newly bought EV3 set in order to move the arms of the Ev3rstorm.
Then I was disappointed that I can not easily link my NXT and my EV3.

So I have made two atmega328 based board to drive this !

First board to drive 4 powerfunctions motor with speed and direction using one ev3 sensor port ( bonus : 4 analog input ) :
schema-2.pdf
4 power function driver
(16.86 KiB) Downloaded 1077 times
then I made a second board based on an atmega328 to drive a RS011MC card (4 DC motor driver ) to drive 3 NXT/EV3 motors :
schema-3.pdf
(14.11 KiB) Downloaded 988 times
One sensor port used on the EV3 to drive two atmega328 with I2C.
The two atmega328 are burned with arduino bootloader so it's easier to manage.
Sketch are not ready but are coming !

I can manage 4 PF motors with speed and 3 NXT/EV3 motors with rotary encoders and speed.

I hope this will help someone else.

Re: Adding 4 Powerfunctions motors and/or 4 NXT/EV3 motors

Posted: 18 Jan 2015, 10:42
by HaWe
hey,
nice job!
And nice to see that more people than just me are interfacing AVR CPUs to Lego Mindstorms! 8-)

I did something quite similar for the NXT interfacing an Arduino Mega or Due,
adding simultaneously
up to 8 Lego encoder motors (8 for Arduino Mega - just 6 for Arduino Due),
up to 8 analog sensors (including original Lego Mindstorms sensors or even Lego I2C ultrasonic sensors ),
up to 16 digital touch sensors
and optionally even different devices and sensors like e.g., a PC keyboard or a PixyCam to my NXT :)

http://www.mindstormsforum.de/viewtopic.php?f=70&t=8302
http://www.mindstormsforum.de/viewtopic ... 700#p66006

Unfortunately I am not able to program the EV3 to do the same work being interfaced by I2C :(

Re: Adding 4 Powerfunctions motors and/or 4 NXT/EV3 motors

Posted: 18 Jan 2015, 19:37
by floppi
woow, very impressive !

With my Ev3 I do not succeed in driving a PCF8574 ( I2C-8 i/o) but it works with the NXT. I don't know why !!
But with an atmega no problem with both bricks.

Re: Adding 4 Powerfunctions motors and/or 4 NXT/EV3 motors

Posted: 19 Jan 2015, 15:04
by HaWe
yes, I'm also fine with my PCF8574 for my NXT.

Can it be a 5V vs. 3.3V signal level issue for the EV3 ?

Re: Adding 4 Powerfunctions motors and/or 4 NXT/EV3 motors

Posted: 19 Jan 2015, 17:16
by floppi
I retried today with Lejos on my EV3.
( It's very cool to be able to install lejos on a SD without flashing the lego os on the brick !!! )

Reading a PCF8574 works perfectly with same hardware !

Lego original firmware issue ???