2019-03-30, 02:07 PM
(2019-03-17, 04:21 PM)FMJ Wrote: Some AtMega 8 based ESC's have Voltage, Current and Temperature sensing, as well as 2-way I2C communication onboard. Wouldn't it be a logical setup using all these sensors? Makes wiring everything a lot easier. Your probably aren't even in need of the Arduino anymore then?!
In theory, yes, but you still need a shunt to measure current.
The brushed code is written in assembly and only reads pwm input and drives the mosfets. It also monitors current but that is it. This isn't enough to make the motor controller which is why the additional arduino is needed.
The arduino nano code does much more, monitoring end stops, over current, as well as much more, see pypilot/arduino/motor/motor.ino This sketch can drive mosfets directly without the esc, so you basically would need to run this sketch on the atmega8 of the esc. Which it can barely fit in the 8k, but also might be lacking the needed timers, I didn't check much. I think this may be where you run into problems but would be interested if you can make it work.