Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By tve
#40041 Nice circuit :-). Shouldn't D1 be the other way around?
If you want to use the uart look into the "swap uart" SDK call, allows you to output uart0 TX on gpio31 or 15 (I forget which). Then you don't get the start-up crap.
User avatar
By unsignedchar
#40082
joostn wrote:http://bbs.espressif.com/viewtopic.php?t=49


Thanks! This got me going...

I's more complicated though. This is not your typical garden variety PWM.
This thing does not generate just one on/off cycle each period.
Instead you get a train of short pulses. More or fewer pulses, depending on the data value.
Fine if you want to turn it into a voltage via R/C filter.

So I went at it scientifically... errrm... Well I tinkered until it worked... :)
The prescaler has to go all the way up for the circuit I was using.
I did not want to use a smaller inductor actually, I liked the frequency nice and slow.

Here are two scope shots. One at 0x1FF30 gives -12.7V.
The other at 0x1FF70 that gives 4.7V. The relay still holds. Nice!
It's nicely visible how all the pulses are the same width, but with gaps.
(CH1=PWM, CH2=switch node, CH3=output)

That's now fine by me. If someone want's to calculate the buck-boost through all the way, be my guest.
For me, it just has to work...

Settings:
Write these values into the sigma delta control register.
0x1FF70 -> 4.6V
0x1FF60 -> 5.4V
0x1FF50 -> 7.0V
0x1FF40 -> 9.3V
0x1FF30 -> 12.6V
0x1FF20 -> 17.6V

Power:
Relay measures at 390R
At 12.7V output, the converter takes 135mA at 3.3V = 545mW
Relay takes 414mW (12.7V^2 / 390R), so 130mW loss.

This is active for maybe a second, then the power is reduced.

To hold the relay, I chose the 9.4V setting.
Converter takes 80mA at 3.3V -> 264mW
This is now less than the relay's nominal power use, so who cares if there are converter losses?

The canonical way would have needed an extra 12V. And typical circuits do not reduce relay power after the relay has engaged.

So I can now go into mass-producing the five units I need.... :-)
You do not have the required permissions to view the files attached to this post.
User avatar
By unsignedchar
#40083
tve wrote:Shouldn't D1 be the other way around?


Umh, no. That's a buck-boost converter and not a free-wheeling diode circuit.
https://en.wikipedia.org/wiki/Buck%E2%8 ... _converter

I was aware of the pin swap, but I did not want to lose the UART0.

barnabybear wrote:PCA9685


Possible. But I did set me a challenge to do it with two caps and a coil...

lethe wrote:off-the-shelf boost converter


Ditto. Challenge!
Also, to support power reduction after the relay engages, the off-the shelf converter needs a PWM or analog control signal... Oops...
User avatar
By fantasy2
#43795
unsignedchar wrote:
joostn wrote:http://bbs.espressif.com/viewtopic.php?t=49


Thanks! This got me going...

Sorry for kicking this semi-old thread.

I am trying to get the delta sigma code running on GPIO15 with the same example but no luck. Are you willing to share the code you used? It seems to be hanging at "GPIO_SIGMA_DELTA_NUM" and I cannot find a reference to it anywhere