Hey Team.
I have a question. I need to get a higher resolution than 255 on pwm channels.
the problem I’m driving a low current coil 1.8 ohms up to 1.1 amps(max 1.98v) from a 14.5volt car power system.
I need to have at least 200 steps from 0-1.98 volts for accurate control. the more the better.
I know i could run a buck converter to drop the voltage. but i’m trying to minimize the parts that i use. on my project.
and it needs to run at a minimum of 20khz to not hear the coil. (this part i already figured out and have my mega running at 31khz)
is there an I2C ADC add on board that will do what i need?
             
            
              
            
           
          
            
            
              Hi! @magnaride 
https://www.amazon.com/16-Channel-12-bit-Servo-Driver-Interface/dp/B00EIB0U7A/ref=sr_1_1?dchild=1&keywords=pwm+12+bit&qid=1605701470&sr=8-1 https://www.amazon.com/Dorhea-PCA9685-Interface-Controller-Raspberry/dp/B07RMTN4NZ/ref=sr_1_3?dchild=1&keywords=pwm+12+bit&qid=1605701446&sr=8-3 
The module works via I2C. I didn’t find a XOD library for this module in our libraries base, so probably you’ll have to write it yourself. The good news is that it’s not complicated at all.
             
            
              
            
           
          
            
            
              I found that controller and have used it, the issue is now that it only operates at 1.6hz and that is far too low to drive a coil and not hear it
             
            
              
            
           
          
            
            
              I have a solution. 16-bit PWM-enabled GPIO expander on STM32 with I2C communication. But I do not know the upper limit for pwm freq. In theory it should be much more than 8KHz
  
  
    
This I²C expander will add nine additional GPIO ports to your controller to be used as digital, or analog, inputs, or outputs. The purpose and function of the pins are specified programmatically, directly in the sketch. 
 The module is built on the...
  Price: EUR 1195 
    
   
  
    
    
  
  
 
  
  
    
/*
 * This file is a part of modules library.
 *
 * Defines: gpio expander driver
 * © Amperka LLC (https://amperka.com, dev@amperka.com)
 * 
 * Author: Vasily Basalaev <vasily@amperka.ru>
 * License: GPLv3, all text here must be included in any redistribution.
 */
#include "i2cioCommands.h"
#include <Arduino.h>
#include <Wire.h>
#ifndef __GPIOEXPANDER_H__
#define __GPIOEXPANDER_H__
#ifndef INPUT_PULLDOWN
#define INPUT_PULLDOWN 0x3
#endif
show original 
   
  
    
    
  
  
 
             
            
              
            
           
          
            
            
              that looks really interesting, i’m betting we don’t have a node for it yet.
I suppose i could always use a Teensy as well and replace the Mega 2560 all together
             
            
              
            
           
          
            
              
                system  
              
                  
                    December 22, 2020,  2:53am
                   
                  6 
               
             
            
              This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.