Welcome! Log In Create A New Profile

Advanced

(WIP) I2C System

Posted by alatnet 
(WIP) I2C System
July 07, 2015 09:49PM
So thinking on how I2C with arduino (any size that supports I2C) I am going to be working on an off with creating I2C chips that hopefully will become a standard, among others, for 3D Printers.

Here's my first chip:

Pololu Driver Chip using I2C.
Supports two stepper motors.
Chips:
-I2C: [www.ti.com]
-Pololu Driver: A4988 (can be swappable if compatible.)

EDIT:
Ok either im going insane or something is wierd with the forums...

Arduino Support Library: [github.com]
Feel free to help in adding to or fixing up the library and adding it to any reprap firmwares.

EDIT2:
Ugh... i need someone to do bitwise ops... i am getting confused with them... >.<

Edited 2 time(s). Last edit at 07/08/2015 01:02PM by alatnet.
Re: (WIP) I2C System
July 09, 2015 09:48PM
Did an overhaul of the I2C System code.
Added in multiplexer into it for future proofing.
Using polymorphism with the system to allow for easy-ish expansion of the system.
Re: (WIP) I2C System
July 12, 2015 09:29AM
Second overhaul of the system pushed to github.
Added in a chip database to handle how specific chips handle data being sent to it.
Added in platform defines to allow I2C System to be expanded to different platforms.
Altered file extensions to be more friendly to Arduino IDE.
Added in destroy functions for I2C Objects to be able to destroy I2C Objects cleanly and free up memory.
Re: (WIP) I2C System
July 26, 2015 09:09AM
Updated code.
Changed how multiplexers work.
Previous way dealt with just using addresses which would cause an address clash. New way uses internal object address to deal with referencing the correct I2C object.
I2C_MOTOR is fixed and should be working correctly to add motors into the I2C_System class.
I2C_System::stepMotor should be working.
Still some issues with getting it compiled via Arduino IDE or Visual Micro...
Requires StandardCplusplus to compile: [github.com]
Re: (WIP) I2C System
July 26, 2015 09:17AM
What motor step rate can you achieve over I2C when driving 3 motors at once?


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Full disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Re: (WIP) I2C System
August 03, 2015 07:01PM
i havent tested this yet.
I was able to build a prototype but until i am able to correctly compile my code it remains a work in progress...
but there is documentation that says the i2c line can achieve a data rate of 100kbit/s standard, 400kbits/s full speed, 1mbit/s fast mode, 3.2 mbit/s high speed.
Though i think the only thing that will work with arduino is the standard and full speed (with library editing) data rates.

How to edit i2c arduino speed: [forum.arduino.cc]

EDIT:
Just got it to compile.
Damn variable declarations.
I'll see about doing test runs of the motor setup to see how well it goes when i hook up the prototype and hopefully not burn out the chips... >.<

EDIT2:
New code pushed.

Edited 3 time(s). Last edit at 08/03/2015 07:22PM by alatnet.
Re: (WIP) I2C System
August 14, 2015 09:04AM
New code pushed.
Prototype with LED instead of Motor chip works.
step function needs some work though...
added in two functions for motor control that turns the motor on and off.
Adding in new motors via system config works like a charm along with controlling said motor.
Next step, test it with an actual motor chip and motor and set up configuration to have specific pins as input or output for mixed setup, i.e. both motor and endstop on same chip.

Lets see if we can get some more chips added to the database! ^.^

EDIT: heh, still need to work on it. XD
Dir pin is being outputted when it shouldnt be.

EDIT2:
New code pushed.
Fixed up the dir and reset pins and step function.

Edited 2 time(s). Last edit at 08/14/2015 12:42PM by alatnet.
Sorry, only registered users may post in this forum.

Click here to login