« first day (2521 days earlier)      last day (2711 days later) » 

01:29
@ThePhoton Preemptive medication
 
6 hours later…
07:33
The point is that it splashes less
07:55
@Giskard42 it doesn't but it tells you that you have to look everywhere again ^^
08:27
auctionsl ike these make me wonder if these things are reliable at all...
08:50
hmm, I think I'm still not getting the idea of combining a constant current source with a PWM modulation
like, it doesn't seem that simply interrupting the circuit would produce credible current results
certainly not the right way to measure wind speed...
I'm trying to understand this
lots of text, tl;dr but driving an LED with a pwmd constant current sounds like dimming, though I probably would not do it that way but build an adjustable current drive
@PlasmaHH what's the difference?
@BartekBanachewicz flickering
09:01
@PlasmaHH isn't that how most e.g. automotive LED headlights are driven?
They all flicker in high-speed shots
well, I was specifically aiming for high efficiency, as this is supposed to run off a battery
yep, they suck
you know buck converters?
@PlasmaHH yep
before you go any further though
so far my plan was to measure the current with a MCU and adjust pwm accordingly controlling a mosfet
I've opened the TL4242 diagram and well
many ways to skin a cat
that's just what it is.
the key is that since LEDs are current driven what you want is to have the control loop control the current, not the voltage as it is traditionally done
09:05
@PlasmaHH again, the idea was to use a known resistor and measure voltage drop on it
but this can't be done directly since the lower that goes, the lower the voltage you're supposed to measure drops
and obviously the lower the better because it's just causing losses there
you can amplify the voltage drop over a shunt resistor
thats how daves µcurrent does it and likely his gw121 too
@PlasmaHH what's a shunt resistor?
the resistor you measure voltage drop over to get the current through it
oh okay
@PlasmaHH oh yeah. The PDF I linked uses an op-amp there if I'm reading this correctly
you can also have the µC create a voltage that sets the wanted current for an all analogue boost converter
09:08
that was my idea as well
@PlasmaHH doesn't that operate on voltages as well?
lets step back a moment and look at a linear regulator like thing. you have a voltage going into an opamp, and the opamp drives a pass transistor and gets the feedback from the transistors output voltage. so that voltage at the beginning controls the voltage of the transistor
then you can change that into taking the voltage drop over a shunt resistor as an input, so it gets a current source.
@PlasmaHH I see
then you make it so the reference voltage comes from a µC and you have a linear current source controlled by a µC
so the only change here is that the uC doesn't have to do the analog measurement
then you replace the opamp+transistor by a buck converter that gets the feedback from the shunt resisotr
it also doesn't control the pwm that drives the buck converter
usually a µC is rather slow compared to opamps and stuff to react to necessary changes when the load or input voltage chaange
09:14
well, in this case the only changes should be the LED warming up and battery draining; I've already constructed the battery measuring circuit which seems to work well, even if it's a tad inaccurate
I think I like the idea of having the current set outside of the mcu though
as I said, many ways to skin a cat
@PlasmaHH this part I didn't understand though, despite my best efforts
so in the opamp case, the measured current (drop over shunt) is added to the PWM from uC and fed to the transistor
nope
oh
so I got lost even before that ;)
at least not if you mean the case I described
09:17
> you have a voltage going into an opamp
you know how the basic job of an opamp is to drive its output in way that the difference between its innputs is 0 ?
@PlasmaHH well, I thought I did
ok, so let the µC produce a voltage, say 1V
you feed that to the opamp as the reference
then you feed the voltage drop of the shunt resistor to the other side, as the feedback, and the output of the opamp drivers the transistor
so the opamp will now do whatever is necessary to the trasnsitor to make the current through the shunt drop 1V
@PlasmaHH I think I sorta meant that but worded myself badly
so if the shunt drops 1V at 1A you make the µC output 2V to have 2A curretn etc.
09:21
ok, how about when it drops very little? like 0.001V?
I obviously can't output 2000V from a pin
you have two choices (or anything in between that). You create such a low voltage, or you amplify that voltage
2000V would be 2000A ^^
so it also depends on the wanted range.
@PlasmaHH ok so I kinda see where I got lost, I mixed two things we're doing here: amplifying the shunt voltage drop and keeping the current constant.
0.001V to 10V over a shunt is going to be rather difficult
09:23
@PlasmaHH well the LED is rated at around 3.7V
you drive one or many of them?
and at what current range?
and what input voltage? 12V car battery?
@PlasmaHH it's one Luxeon K2, supposedly 5W. Driven from a 6V 5-cell NiMH pack
that being said, I am not sure if the lamp itself doesn't have some additional compoents; I don't see the LED, as that's enclosed, and there are 3 wires going out. I am not even sure what the third one is for.
what does the datasheet say?
@PlasmaHH that in order to get the maximum power it shouldn't need more than 3-something V, but I tried with 5 and only got about 60mA of current
I haven't actually tried bringing this up even more. Now that I have the PSU it should be safe to kinda crank it up a bit
you might have fried it, don't put 5V onto a 3.7V LED
09:28
it still lights up
well I was observing the current and slowly raising the voltage
and the current and produced light was nowhere near what I'd expect
Have you observed the drop over the LED? also, even when it lights up it might be damaged. Also you might have a fake device, who knows.
and you should cnosult the datasheet about the third "wire".
@PlasmaHH I hooked the meter right next to the battery. And it's not fake, it worked before, it's just the controller that died.
you should measure over the LED
@PlasmaHH There's none.
no datasheet?
09:31
@PlasmaHH I mean, the LED is inside a lamp, right. So the LED datasheet doesn't mention the third wire, it's something the manufacturer might have put there
like a temp sensor for example
uh, oh, so further disassemble it? ^^
@PlasmaHH I'd rather not if I don't have to I guess
anways, back to the shunt resistor. Lets take 100mΩ and when you run 1.5A through it that means 150mV drop that should be plenty of room to deal with
you will ahve little choice, obviously its not just the LED in there, or you have a different device than you thought
@PlasmaHH I guess
well I'll try taking this apart today then to see what's actually inside
@PlasmaHH so my PWM would need to range from 0 to 150mV?
It should be not much of a problem for a µC to create some voltage between 0 and 150mV and for increased accuracy you could use a divider and have the µC create higher ranges
09:34
yeah, I was planning to operate on 3.3V, so 0.15 is about 5%
(if you want to use the µC pwm to create that voltage you obviously have to filter it to make it (near) DC, and if the µC has an analogue input pin you can measure that voltage too)
wait, measure the voltage I'm putting out myself to control the opamp?
0-3V divide by 20 could work
yes, pwm isn't a voltage itself, its just a square wave, you have to filter that to make it like DC ... if your µC has a DAC output then that would be easier though
I don't think it does
but yeah, good point; so far I've been driving a MOSFET directly, with the idea that the average needs to be right
in this case it would probably make sense to make sure it's an actual DC voltage
so what frequency is your pwm? make a simple low pass filter way below that and you have it output mainly DC
feedback that DC to the µC for increased accuracy and adjust pwm accordinly
09:38
@PlasmaHH I didn't think that would ever be necessary, huh.
@PlasmaHH I was planning to use ATTiny 13
well maybe, maybe not, as I said, increased accuracy, many ways to skin the cat
way too many :)
at least anything like this will make it much easier on the coding side of the µC and it will make it possible for you to split it into two independent parts
you can program the µC to output the DC and until you get that right you can feed into your opamp some DC from another source taht is not the µC to test that and at the end connect both modules
imho much easier as a project when you are not experienced
@PlasmaHH yeah I've been trying to modularize it, so far I've split it into 4 parts - battery measurement, UC power, UC itself/PWM, power control
on 4 different breadboards
and I've been testing them separately
having the PSU simplifies things a lot :)
wait for the time where you run out of PSUs ^^
09:44
Well I have my 3.3 regulator hooked up, arduino has 5V output, so with all that I'm kinda covered for now
so, I'd need to buy an op-amp, because I don't have that
perhaps another MOSFET that's actually line level if I'm gonna make the trip to the store today
 
2 hours later…
11:52
O/
Anyone done any robotics work with the tgy-i4x reciever? I need a way to detect if it has lost signal...
 
3 hours later…
14:35
Baking, baking, baking fairy princess
@PlasmaHH I've realized that I can't do that, because that would incur huge losses on the transistor
which I was trying to avoid
@BartekBanachewicz that was the linear example, the next step was to replace the linear regulator by a buck converter regulation loop
@PlasmaHH oh right we actually didn't get to the bottom of your idea
you could probably built a simple one with a 555 and 393 just for the fun of it ^^
@PlasmaHH where would the 393 be?
I've bought a couple op-amps to measure the drop on my shunt resistor
14:49
its the comparator that switches the 555s square wave on and off. very crude bad regulation, but can work ^^
I think we called them "bang bang buck regulator" back then
@PlasmaHH mm, I dunno, I think I'll just go with the regulation on the uC for now
again, not enough cats
if I can read the shunt r voltage precisely enough in theory this should make it easy to calibrate the PWM output
15:18
Cats?
15:44
@Asmyldof Not my favorite baked item. The glitter sticks in my teeth.
16:23
A puddle of hydraulic liquid under the car, this promises to be fun
16:33
... french huh
No, that was the car I was looking at the other day, we have a VW
Clutch hydraulic :/
hm
Out of character
I have a few es left
 
2 hours later…
18:31
That little heavily corroded fellow... must be a diode... any idea whate it could have been? The shape doesn't really look familiar...
18:53
unknown, glass body?
I doubt it is glass body, it has some white corrosion on it, the other glass bodies are fine (you see two on the right there, one blue, one red)
 
1 hour later…
19:59
@PlasmaHH That little "shank" on the right side of the package rings a bell with some old component for some reason
its definetly a diode. or was...
Ah, okay
I am currently trying to reverse engineer that schematic, it makes little sense to me
20:34
and that board has some coating on the other side, can't get it off with anything, no ethanol, ipa, acetone, hexane, tuloul, xylol sigh
 
1 hour later…
21:37
@PlasmaHH Did you try ButaROFL?
22:01
I actually got my diode to finally give me 500mA of current
still not there, but getting closer
22:21
hah, seems I've figured it out
uploading a vid
seems that this is a somewhat crude current control pin
or maybe it's just some random voltage that's there for absolutely no reason
I mean my meter isn't precise enough
but it would seem that it's just a resistor
just like one I was planning to add
so perhaps it would save me one component there

« first day (2521 days earlier)      last day (2711 days later) »