0
\$\begingroup\$

enter image description hereIs it possible to send a uart signal to a mosfet driver instead of a PWM signal. I would like to establish wireless communication with a receiver and send it a data string using amplitude shift keying.

Can someone help me?

\$\endgroup\$
  • \$\begingroup\$ If the only interface is PWM, then no. Well, no reliable or straightforward way at least. Add a receiver microcontroller capable of communicating with UART and outputting PWM. \$\endgroup\$ – Eugene Sh. May 7 '18 at 14:40
  • \$\begingroup\$ What chips do you plan to use for transmitting and receiving the ASK signals? If the UART bit rate is within the bit rate capabilities of the ASK TX/RX chips, you can certainly drive a bit stream wirelessly. I don't think MOSFETs and PWM are relevant. \$\endgroup\$ – crj11 May 7 '18 at 15:20
  • \$\begingroup\$ As a microcontroller I use a XMC1100, see link: infineon.com/dgdl/… This microcontroller is intended to transmit an 11-bit long data string by driving a buck converter. The microcontroller has a UART function and the ability to generate a PWM signal to control the Buck converter. The buck converter finally generates the input signal at the drain of the full bridge I quickly drew a schematic \$\endgroup\$ – Luigi May 7 '18 at 15:42
  • \$\begingroup\$ I am now utterly confused. Are you trying to build an own wireless link? And you are regulating the buck output voltage to create a amplitude modulation on the output of your full bridge? If your controller has the ability to create a PWM, why don't you use it? Do you want the UART bits to be directly the AM data bits? \$\endgroup\$ – Arsenal May 7 '18 at 16:03
  • \$\begingroup\$ Please excuse the initially poor formulation Exactly I want to model my UART data string via the Buckconverter. However, I do not know exactly what the best option is? \$\endgroup\$ – Luigi May 7 '18 at 16:25
2
\$\begingroup\$

If a PWM signal is required for operation, then you'll probably just have to use a microcontroller to bridge the gap and generate the required PWM signal based on commands received via a UART.

\$\endgroup\$
1
\$\begingroup\$

Well consider what kind of signals you can usually generate with a UART:

  1. it needs 1 start bit
  2. it needs 1 stop bit
  3. it can have up to 9 data bits
  4. it can have an additional parity bit

I haven't seen many implementations which offer 9 data bits and parity, so let's stick to something which is commonly available:

8N1 or 8 data bits, no parity and 1 stop bit.

The start bit is always low, so it will limit the maximum PWM cycle you can get. The stop bit is always high, so it will limit the minimum PWM cycle you can get.

So we have 10 bits in total, 1 is always low and one is always high, so your maximum control is from 10 % to 90 %. In between that you only get 8 levels (increments of 10 %), that is not very fine control.


To get a continuous PWM signal, you have to use some mechanism which will always keep the UART busy or it will ruin the little control you have.

Depending on the implementation, you can use a transmit buffer empty interrupt to fill the next byte in before the old one is already on the line.

Another option would be to use a DMA which transfers the same byte all the time into the UART transmit register. Then you update that byte and on the next transfer it will be reflected on the line.


Although possible, I would probably go the route the others mentioned already and build a small UART to PWM converter if no other means to control is available.

\$\endgroup\$
0
\$\begingroup\$

It's possible, with some serious limitations. Take a look at this picture.

If you send over UART a value of 255 (0xFF), you get a digital signal that is high for 8/9 ~= 88.88% of the time. If you send 0's, you get a 11.11% duty cycle.

If your application is fine with 11% granularity and no ability to set the output to 0, this will do. Otherwise, you will need a PWM generator on the receiving side.

\$\endgroup\$
  • \$\begingroup\$ OP says he's using ASK. \$\endgroup\$ – a concerned citizen May 7 '18 at 15:53
  • \$\begingroup\$ " I would like to establish wireless communication with a receiver and send it a data string using amplitude shift keying." - I understand this to mean he would use ASK to encode the radio signal carrying the serial/PWM signal. Since the radio transcievers handle the modulation part, it doesn't matter if it's ASK, FSK or whatever. \$\endgroup\$ – Makotanist May 8 '18 at 7:10
  • \$\begingroup\$ True, but then there should also not be any worry as to the amount of logic high, or low, since it would be handled further down, no? Otherwise, yes, the communication can reach that status. \$\endgroup\$ – a concerned citizen May 8 '18 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.