MCP4725 12 bit DAC and SZBK07 DC-DC converter

Sdílet
Vložit
  • čas přidán 24. 07. 2024
  • In this video I show you how I utilize the MCP4725 12 bit digital to analog converter. This is a very nice circuit which allows me to control the SZBK07 DC-DC converter on a very fine scale. In this demonstration I use the DAC to change the output voltage of the SZBK07 between ~0-20 V. The device behaves linear on the full scale. I am glad about this circuit because it allows me to replace the 8 bit MCP41100 and have a more precise temperature control in my digital thermostat for Peltier coolers.
    Please don't forget to subscribe!
    You can find the circuit diagram, the source code and the chart for the voltage vs bit values on my website: curiousscientist.tech/blog/mc...
    MCP4725 datasheet: ww1.microchip.com/downloads/e...
    If you want to support my work, please consider buying the parts using my affiliate links:
    curiousscientist.tech/tools
  • Věda a technologie

Komentáře • 66

  • @snehanshourya3850
    @snehanshourya3850 Před 2 lety +2

    This is exactly what I needed for multiple applications. Thank you so much for everything!

  • @MethiasZa
    @MethiasZa Před 3 lety +1

    This is cool. Something I haven't yet added to the cooler box is the digital control. I have got it up and running, I'm running 2 peltiers stacked as you suggested, getting down to around -15c on the cold side heatsink (hot side temp was 44c). I'm running 2 separate DC-DC converters to control each peltier separately, but is there a way to calculate the ratio the two peltiers should stay in (Say for EG: 4v on the one on the cold side and 8v on the top one)

    • @CuriousScientist
      @CuriousScientist  Před 3 lety

      Since different Peltiers have different resistances, I would try to put different Peltiers in the same electrical circuit. I haven't tested mixing different Peltiers, but in general the higher the last two digit (which is also the amperage) the lower the resistance. For example, a good example would be the following: You take a TEC12703, and a TEC12715. The '03 has 3.2 Ohm resistance approximately and the '15 has 0.8 Ohm. Connect them parallel to the source. If you provide 10 A to them, the TEC12703 (R1) will take 2 A and the TEC12715 (R2) will take 8 A. This is actually a not so bad starting point. Just think about Peltiers as resistors and you can use the Ohm's law for approximating the expectable values. Check this video for more ideas: czcams.com/video/cX8XHV0c9Aw/video.html .

    • @MethiasZa
      @MethiasZa Před 3 lety +1

      @@CuriousScientist Ye, I got 2 TEC12709's hence my different circuits otherwise they would be running at the same amperage. I was running the one at 6.5v (or roughly 4 amps) and the other at roughly 11.7v (so 7amps). It was working and cooling, I was just wondering if there was a way to find the optimal dT for a setup of stacked peltiers.

  • @diydsolar
    @diydsolar Před 2 lety +1

    Hi, have you tried a "normal" digital pot in parallel with the resistor that is "below" original pot? I mean, between feedback pin (1.215V) and gnd pin ?
    That way we don't need High Voltage digital pots as this pot will be at maximum 1.215V.

    • @CuriousScientist
      @CuriousScientist  Před 2 lety

      Hi! Haven't yet, but it is a good idea, so I will give it a try later!

    • @diydsolar
      @diydsolar Před 2 lety +1

      @@CuriousScientist I have make an excel with lots of rows and columns. With Rfeed2gnd=3.6K (i remember. I dont have now the szbk07 board with me), a digital pot of 10k (7bit) and the 100k normal pot (Rfeed2Vout) at 20k fixed position (or change it with a 20k resistor) ... I have 84 usefull positions of the digital pot: from 10.4v to 14.88v. Probably with a cheap 8 bit pot, we while have about 170 usefull positions. (Sorry about voltages and positions, i am thinking about mppt solar charge controller for a 12v battery)

    • @CuriousScientist
      @CuriousScientist  Před 2 lety +1

      I see. In this example I use a DAC and I don't need to worry about the high voltage, and I can keep the original potmeter too. Same would be with the digital pot. And I can cover the _whole_ range, I am not restricted as in your example. High voltage is a problem when you just directly want to replace the onboard potentiometer with a digital one.

    • @diydsolar
      @diydsolar Před 2 lety +2

      @@CuriousScientist Yes, but I dont replace the onboard potentiometer. I put a 10k one in parallel with the smd resistor "Rfeed2gnd". It will only have a maximum of 1.215V (feedback pin), so it will be a normal digital pot. I will keep both Rfeed2gnd and 100k CV potmeter but I need to turn it to adjust to 20k. Only need to sold one 10k digpot leg to gnd and the other one to 100k potmeter pin that is joined with feedback pin. I understand that may work for a 12v MPPT solar charge as I haven't got the full output scale from 1.2v to 36v. That is true

  • @Rothammel1
    @Rothammel1 Před 2 lety

    awesome, thank you

  • @kaabachiamina4928
    @kaabachiamina4928 Před rokem

    Thank you for this amazing explanation. i have one question please, I want to dim 24V LEDS with no flicker, so I think this would work form me. so how can i set a maximum output voltage of 24V when i have an input of 30V to the converter ?( I don't want to lose steps of the MCP in order to do that) so is this possible ? and also can I control the voltage between 12V and 24V as my leds don't start to light up before 12V?

    • @CuriousScientist
      @CuriousScientist  Před rokem

      Hi! Yes, you can manipulate the current output while leaving the voltage regulator at 24 V which would then dim the LED.
      If you feed 30 V to the input of the converter, I think it could provide 24 V, however, this should be checked. It depends on the efficiency at this voltage which I do not know.
      You can add an additional resistor to the voltage feedback loop of the converter and you can make it output 12 V as default. I do not know the exact value, however, I have a video where I show some manipulation of the voltage feedback loop with multiple resistors. You can use that as a starting point. With two potentiometers in series, you can experiment the values you need to set an upper and lower voltage limit.

  • @fergal33
    @fergal33 Před 3 lety

    Hi, the link in description to the circuit diagram isn't working. Would be very useful to get a look at it as i'd like to do something similar and havn't done anything like this before!

    • @CuriousScientist
      @CuriousScientist  Před 3 lety

      Hi! You can still go to the website and search for it yourself.

  • @MIKE-il6mu
    @MIKE-il6mu Před rokem

    Hi informative video. Can this method be used to replace the current adjustment pot. I am trying to use a boost converter to control the current supplied to a microinverter. The aim is to monitor and control the output of the inverter to prevent grid backfeed. Thanks

    • @CuriousScientist
      @CuriousScientist  Před rokem +1

      Hi! Sure, just refer to the datasheet of the buck controller. The CC pin has to be regulated a bit differently, but it is doable in a similar way than the CV. But not in the exact same way, so don't try to just do the same thing for the CC as for the CV potentiometers.

  • @OppaYA
    @OppaYA Před rokem

    Thank you for your video! The problem when injecting voltage from DAC is that feedback loop is not working good anymore.
    When load applied, let's say 0.5A and using original circuit, output voltage drop at 20 V is 0.1V.
    When same load 0.5A applied when injecting voltage from DAC, output voltage drop at 20V 0.4 - 0.5V.
    Any idea how to fix that?

    • @CuriousScientist
      @CuriousScientist  Před rokem

      Hi! Could you define the voltage drop a bit more exactly, please? If the output voltage should be 20 V then the controller should be set in a way that 20 V is reached. What is your load and how do you power the buck converter?

    • @OppaYA
      @OppaYA Před rokem

      ​@@CuriousScientist I mean voltage drop at the BUCK-BOOST converted output (different one, not your model). I set 20V and connected resistive load - 50W potentiometer, and in that case drop is minimal when original small blue multiturn pot is used to control the converter, no more than 0.1V, so output under load is 19.9V. But when i set 20V using DAC voltage injection and connect same resistive load, voltage at the converter output drops almost 0.5V, which is too much, output drop to 19.5V. So i wonder if anything can be done to fix that.

    • @CuriousScientist
      @CuriousScientist  Před rokem

      If you use a different model, I cannot really help because it is useless to check it on my side if something goes wrong. I have no idea, sorry.

  • @mumbaiverve2307
    @mumbaiverve2307 Před 2 lety +2

    Consider putting schematics instead of fritzing drawings ? So if I am not sadly mistaken (happens all the time) , the DAC output goes directly to the center pin of the CV adjust pot on the DC DC converter through a 10k resistor.

  • @abishekmoorthi2779
    @abishekmoorthi2779 Před rokem

    Hi, should the GND of the DAC be connected to the output GND of the DC DC converter?

    • @CuriousScientist
      @CuriousScientist  Před rokem

      Hi!
      Sure, all ground should be shared (hence the other name used "common.").

  • @abishekmoorthi2779
    @abishekmoorthi2779 Před 24 dny +1

    Hi, Can we do the same process with SZBT07 to make it as variable DC-DC converter?

    • @CuriousScientist
      @CuriousScientist  Před 23 dny

      Hi! I believe so, because it has a similar buck controller chip as the SZBK07. I actually started to work with one of those big 1500 W DC-DC converters a while ago, but reverse-engineering it took a lot of time and I lost my passion. Maybe later I will pick it up again.

  • @MrAbrandao
    @MrAbrandao Před 2 lety +1

    a diagram of the connection of the dac and the dcdc also showing the dcdc potentiometer and feedback part would be most appreciated

  • @algre977
    @algre977 Před rokem +1

    Do you need an external potentiometer ? It seems to be wired exactly like the original blue one, so you should technically just add a 10k ohm resistor directly on SZBK07 blue potentiometer pins 2/3 and feed MCP4725 output to the 10k resistor, and turn the blue potentiometer all the way to the right. Am I correct or wouldn't this give the same result ?

    • @CuriousScientist
      @CuriousScientist  Před rokem

      Hi! It is not an "external" potentiometer. If you look at the video carefully, you can see that I have removed the CV potentiometer and replaced it with another potentiometer with the same value (100 kOhm). The only reason I removed/replaced it so I can demonstrate the circuit better.
      You can keep the original potentiometer in the circuit and attach the 10k resistor to the CV potentiometer. You are correct! Just make sure that you make a solid connection.

    • @algre977
      @algre977 Před rokem +1

      @@CuriousScientist then you for detailed reply! And thank you for the video. I subscribed

    • @algre977
      @algre977 Před rokem

      @@CuriousScientist by the way, I tried this on a different buck converter and didn't work. I guess this only works with this specific buck converter, correct ?

    • @CuriousScientist
      @CuriousScientist  Před rokem

      Yes. Other buck converters might have different feedback circuits.

  • @elgarras
    @elgarras Před 2 lety

    Will it be possible to use an analog output from arduino Instead of an DAC?

    • @CuriousScientist
      @CuriousScientist  Před 2 lety

      Not directly, but if you filter it, yes. You need a filter to make the PWM signal smooth DC. But the step size will be more coarse in that case.

  • @agunghartama9382
    @agunghartama9382 Před 4 měsíci +1

    Hello, how about controlling CC, can we use this MCP4725 too?

    • @CuriousScientist
      @CuriousScientist  Před 4 měsíci

      Hi! CC is a bit different. CV relies on the output voltage. If you look at the schematics, you can see that the 100k potentiometer is directly connected to the output voltage positive side, and then the circuit goes towards the regulation part. The CC is a separate circuit where you just adjust a tiny voltage which controls the current. You can use the DAC to control CC but not in the same way as for the CV. I suggest checking the schematics of the voltage regulator to see how CC works.

    • @agunghartama9382
      @agunghartama9382 Před 4 měsíci

      Oke, thanks for the explaination…☺️

    • @CuriousScientist
      @CuriousScientist  Před 4 měsíci

      You're welcome!

  • @odissey2
    @odissey2 Před 2 lety +1

    I wander how is startup output voltage of the DC-DC converter looks like. If DC-DC converter starts earlier then MCP4725 (Vctrl=0), then there shall be a 20V output spike! I believe that a simple digital potentiometer is more appropriate here.

    • @CuriousScientist
      @CuriousScientist  Před 2 lety

      Fair point! I haven't thought about this thing when I made the video so I cannot answer the question right now because I simply cannot answer it. I will sit down with the device again in the near future and I will try to work out a way where the 0 to 5 V transition increases the output voltage on the DC-DC converter instead of decreasing it. I am pretty sure that there's a way. But I am pretty sure that there is a voltage buildup in the beginning because the feedback for the buck controller chip goes from Vout via that 100k potentiometer. So, in that sense, the converter also needs some time to "decide" what should be the output voltage. Maybe the DAC can turn on in the meantime. But I don't know which one is faster in this competition. I also believe that a digital potentiometer would have the same issue. I am not 100% sure, will check it.

    • @odissey2
      @odissey2 Před 2 lety +1

      @@CuriousScientist we tried using a DAC controlled DC-FC controller from Linear Tech some time ago without success. After blowing a couple, switched to a digipot. I think that 100k pullup resistor should help to protect output from going high on startup

  • @alexsicko
    @alexsicko Před rokem +1

    cool project! but isnt there a way to accelerate the encoder steps when you rotate it faster so you shouldnt rotate it 4000 times?

    • @CuriousScientist
      @CuriousScientist  Před rokem +1

      Thanks. Of course, just apply a multiplier, so one click becomes 10 steps or any required value.

    • @alexsicko
      @alexsicko Před rokem

      @@CuriousScientist im wraping my head by trying to implement acceleration to increment 1 step when turning slowly and 100 when faster. do you have any tutorial or could you please point me to one? thanks!

    • @CuriousScientist
      @CuriousScientist  Před rokem +1

      Check the elapsed time between two clicks. If it is shorter than a certain period (which means you turned the encoder faster), multiply the increment with some constant so you get more steps. Or just simply increment by another number, like 50, 100...etc.

  • @grzesgrzankaify
    @grzesgrzankaify Před 2 lety

    What is the highest sine frequency that can be generated?

    • @CuriousScientist
      @CuriousScientist  Před 2 lety

      What do you mean?

    • @grzesgrzankaify
      @grzesgrzankaify Před 2 lety

      @@CuriousScientist I am trying to generate higher frequencies.
      However, frequencies above 1kHz are unattainable.
      Can the MCP4725 module do more, or 100Hz is its max?

    • @CuriousScientist
      @CuriousScientist  Před 2 lety

      Ah, I see. You should be able to generate frequencies even above 2 kHz, but you'd sacrifice the resolution. If you need a high speed DAC, check out the DAC08.

    • @grzesgrzankaify
      @grzesgrzankaify Před 2 lety +1

      thank you for the advice

  • @fensrg
    @fensrg Před 7 měsíci

    how to control current limit by arduino?

    • @CuriousScientist
      @CuriousScientist  Před 7 měsíci

      Somewhat similarly to controlling the voltage. I published videos on this topic as well as wrote some articles on my website.

  • @moshe778950101
    @moshe778950101 Před 4 měsíci +1

    Hello, I watched all the videos relating the voltage regulator.
    To controll it all I need is to inject my voltage with 10k resistor and leave the CV 10k resistor
    Or should I desolder the 10k CV resistor and only inject my voltage?
    If CV resistor is necessary, to what resistance should I set it?

    • @CuriousScientist
      @CuriousScientist  Před 4 měsíci

      Hi!
      It is simpler if you leave the original potentiometer in the circuit and add the 10k resistor through which you inject the voltage to adjust the output voltage of the voltage regulator.
      The more voltage you inject, the less voltage you receive on the output. In this video I have a full demo of the expected behaviour: czcams.com/video/7PX_UMrXF3g/video.html

    • @moshe778950101
      @moshe778950101 Před 4 měsíci

      @@CuriousScientist I am interested only in the digital control, does it matter what is the trimmer resistance?

    • @CuriousScientist
      @CuriousScientist  Před 4 měsíci

      The trimmer should be the same as the original resistance, which is 100k.

    • @moshe778950101
      @moshe778950101 Před 4 měsíci

      @@CuriousScientist First, thank you very much for the reply,
      I understand that I have to leave it in place, I ask if it matters to what resistance it's adjusted to. In original circuit adjusting the trimmer changes output voltage, I don't want the trimmer to interfere with digital control, I don't care to replace it with just a Constant resistor.

    • @moshe778950101
      @moshe778950101 Před 4 měsíci

      My question is to what resistance should the trimmer be set?
      Maximum, minimum, somewhere in the middle, does it matter?