PWM via RS485

Discussion in 'The Projects Forum' started by Jraft, Jan 31, 2013.

  1. Jraft

    Thread Starter New Member

    Jan 30, 2013
    9
    0
    My main goal is to be able to adjust the duty cycle of a PWM chip (LTC6992 or something similar) remotely via RS485. My idea is to send commands over RS485 to a digipot (AD5228 for example) in a voltage divider configuration, allowing adjustment of the LTC6992's duty cycle. (Duty cycle of this chip is controlled by a 0 - 1V input on the respective pin.)

    The actual sending and receiving/interpreting the commands is where I am unsure of how to proceed. Could I simply have two push-buttons connected to a MAX483 IC, one for high, one for low, and have the outputs of another receiving MAX483 IC connected to the base of a transistor each, which short the proper pin to ground on the digipot, corresponding with an increment/decrement of the resistance?

    I am unsure if the MAX chips would work with just simple push button inputs or if I would need to interface with a PIC. According to the datasheet for the MAX483, Inputs are simply 2V for high, 0.8V for low.


    Any thoughts or suggestions? I can further clarify or post a drawing if it would help.
    Thanks.
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,425
    3,359
    No, this is not the correct approach.
    The idea of a network is to communicate information across the network.
    You cannot connect the push-button directly to the network via an RS-485 driver.
    You need to encode the button information into a data packet which is then transmitted across the network using the RS-485 driver. The simplest way to encode the data is to connect the push-button to a microcontroller and then to the RS-485 chip:

    Push-button -> Microcontroller -> MAX485

    You can connect both push-buttons to the same microcontroller.
     
  3. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    You need a PIC (or equivilent)
     
  4. Jraft

    Thread Starter New Member

    Jan 30, 2013
    9
    0
    Any suggestions on applications notes or examples of something like this? The push button part is easy but as far as interfacing the pic with a MAX483 or some other 485 device I am not familiar with.
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,425
    3,359
    You use the UART TXD output of the mcu to drive the MAX485.
     
Loading...