Thank you to the guys at HEGE supporting Badcaps [ HEGE ] [ HEGE DEX Chart ]

Announcement

Collapse
No announcement yet.

Arduino current sensing (in car)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #81
    Re: Arduino current sensing (in car)

    I was thinking of that at one point, but I don't want to alter the car's setup too much, that's why I stuck with the transistor idea - to keep it as PnP as possible (pun intended )
    Wattevah...

    Comment


      #82
      Re: Arduino current sensing (in car)

      fsck it if you want to be safe, get two optoisolators and connect the diodes inverse parallel and a dropping resistor (of course) - and hook them to green and blue. Then use the output transistors of the optoisolators to drive the microcontroller. There, no more level translation problems.

      Comment


        #83
        Re: Arduino current sensing (in car)

        Here is real good question are going to make micro controller control the windows if so there is an easier way to do this at least to me

        Use optic sensors that hook to the switches that are there now and use the micro controller to read the inputs and control the H Bridge Motor Drive Controller with the micro controller

        One question I have for you is this does anything out of the ordinary happen when you disconnect the window switch from the wiring harnesses to the window

        If nothing happens when you do this then what I have point out above should work
        Last edited by sam_sam_sam; 05-24-2018, 07:22 PM.
        9 PC LCD Monitor
        6 LCD Flat Screen TV
        30 Desk Top Switching Power Supply
        10 Battery Charger Switching Power Supply for Power Tool
        6 18v Lithium Battery Power Boards for Tool Battery Packs
        1 XBox 360 Switching Power Supply and M Board
        25 Servo Drives 220/460 3 Phase
        6 De-soldering Station Switching Power Supply 1 Power Supply
        1 Dell Mother Board
        15 Computer Power Supply
        1 HP Printer Supply & Control Board * lighting finished it *


        These two repairs where found with a ESR meter...> Temp at 50*F then at 90*F the ESR reading more than 10%

        1 Over Head Crane Current Sensing Board ( VFD Failure Five Years Later )
        2 Hem Saw Computer Stack Board

        All of these had CAPs POOF
        All of the mosfet that are taken out by bad caps

        Comment


          #84
          Re: Arduino current sensing (in car)

          Originally posted by sam_sam_sam View Post
          One question I have for you is this does anything out of the ordinary happen when you disconnect the window switch from the wiring harnesses to the window
          If nothing happens when you do this then what I have point out above should work
          I didn't quite understand what you mean, but I believe you mean if the ECU or something senses the button's been disconnected and throws an error - no, it doesn't. The ECU is not involved in the window control at all - just 2 wires going to each motor and that's it. No electronics involved at all. Good idea with the optoisolators tho....would any one from the junk box work or should I looks for something specific in them ?
          Wattevah...

          Comment


            #85
            Re: Arduino current sensing (in car)

            I seem to be having issues with the current sensors...either I have no idea how to use them or they're defective (granted, I only have one on hand ATM): the output pin of the sensor always puts out 2.7v, so what is up with that ? It should a few millivolts at zero load, according to the datasheet....I must be doing something wrong, so given that there's only 3 pins: VCC, GND and OUT, I'm about to be put to shame by someone who'll straighten me out right away for messing up such a simple thing

            EDIT: NVM....I had a look towards the end of the datasheet and there's some graphs there and apparently at 0 current, the output is half the input voltage, so 2.5v...
            Last edited by Dannyx; 05-25-2018, 01:39 AM.
            Wattevah...

            Comment


              #86
              Re: Arduino current sensing (in car)

              Yeah I think pretty much any (transistor output) optoisolator will work, frequency is so low and output requirements so lax (if you design it right). Just don't fry the input LEDs.

              Comment


                #87
                Re: Arduino current sensing (in car)

                I breadboarded something with a single optocoupler and push-button, but not sure I got it right/tested it right: cathode of LED side connected to GND via 1k resistor, anode connected to 5v via button. I placed my meter across the transistor to measure its resistance and when I pushed the button, I got around 200ohms which gradually began to rise and jump around. I think 1) the resistor value was too high and 2), that's not how I was supposed to measure it. I saw a tutorial once where the guy did this to test his optoisolators, but can't remember what values he got and whether a value of 200 is acceptable or usable - don't want the input to oscillate. I didn't want to hook it up to the micro just yet to try.
                Wattevah...

                Comment


                  #88
                  Re: Arduino current sensing (in car)

                  you can use a higher resistor, opto's use low current leds and the distance to the transistor is tiny.

                  try with your meter set to diode test instead of resistance.
                  your probing a P-N junction.

                  Comment


                    #89
                    Re: Arduino current sensing (in car)

                    Originally posted by Dannyx View Post
                    I think 1) the resistor value was too high and 2), that's not how I was supposed to measure it.
                    The resistor is probably too high. Calculate a new resistor using the standard LED forward voltage drop 1.2V for a LED current of 15mA, or use the values in the optocoupler's datasheet.

                    Also on the transistor side, connect emitter to GND, collector to 1k resistor, other end of resistor to 5V. Use your multimeter to monitor the collector voltage as you push the button (the voltage should drop from 5V to 0V).

                    Comment


                      #90
                      Re: Arduino current sensing (in car)

                      Originally posted by Andyy View Post
                      or use the values in the optocoupler's datasheet.
                      I actually calculated that and given a Vf of 10mA at 1.5v if memory serves, it should be somewhere around 350 ohms: 5v-1.5v = 3.5v. 3.5v / 0.01A = 350 ohms...hope I did it right That seemed a bit small at first so I didn't want to risk it.
                      Wattevah...

                      Comment


                        #91
                        Re: Arduino current sensing (in car)

                        Originally posted by Dannyx View Post
                        350 ohms...hope I did it right That seemed a bit small at first so I didn't want to risk it.
                        Yep all good. Obviously there's no such thing as a "350 ohm" resistor, so use the nearest one higher, 360 ohms. Even 470 ohms should work, it's not that critical.

                        As for burning one out, I guess you don't accumulate broken e-junk for component salvage like I do (I've got heaps of optocouplers from modems, power supplies, etc.).

                        Comment


                          #92
                          Re: Arduino current sensing (in car)

                          Originally posted by Andyy View Post
                          As for burning one out, I guess you don't accumulate broken e-junk for component salvage like I do (I've got heaps of optocouplers from modems, power supplies, etc.).
                          Nnnno, I don't keep broken individual components - they go straight in the bin, after all what's the point ? However I do have broken BOARDS around - that's a whole different story....heaps of them in fact. I keep saying I'll strip down one per day to toss the boards themselves....yeah, sure....it's been like an year now and they keep piling up ATX supplies, TV boards, you name it...it's there

                          EDIT: just realised you suggested salvaging optoisolators from broken boards....*facepalm*...I did just that and have a few salvaged ones in my drawer labeled "opto/IR", but these particular ones I experimented with are brand new. Read Danny, read !
                          Last edited by Dannyx; 05-25-2018, 10:21 AM.
                          Wattevah...

                          Comment


                            #93
                            Re: Arduino current sensing (in car)

                            Gosh I would use something like 3k3 for the LED resistors and 47K for the pullup/pulldown as that transistor would be driving a MOSFET input...

                            Remember you're driving the optoisolator LED with... 12V !!!

                            Comment


                              #94
                              Re: Arduino current sensing (in car)

                              Make it 15v, worst case scenario How about a resistor divider to drop it down first ? Just a thought...I don't think those optos will survive very much otherwise...
                              Wattevah...

                              Comment


                                #95
                                Re: Arduino current sensing (in car)

                                These are the ones I'm using BTW, so we have some exact figures.
                                Wattevah...

                                Comment


                                  #96
                                  Re: Arduino current sensing (in car)

                                  your a menace forrwarding through google, no wonder they know so much!

                                  Comment


                                    #97
                                    Re: Arduino current sensing (in car)

                                    Originally posted by stj View Post
                                    your a menace forrwarding through google, no wonder they know so much!
                                    I don't know much about that I'm afraid...I just select "copy location" and that's it
                                    Wattevah...

                                    Comment


                                      #98
                                      Re: Arduino current sensing (in car)

                                      The URL without tracking information is: https://cdn.badcaps-static.com/pdfs/...cac4dcd71c.pdf

                                      Characteristic is the CTR that needs to be honored. I think overdriving it may not be so bad, though around a milliamp should be sufficient.

                                      Comment


                                        #99
                                        Re: Arduino current sensing (in car)

                                        well this:
                                        google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwj0xNWb06HbAhWKXSwKHTwJAfcQFggmMAA&url=http%3A%2F%2Fwww.ct-micro.com%2Fuploads_zip%2FCT816D3.pdf&usg=AOvVaw3yyhtAHdOWTRXatSWoRaM4
                                        is not a reasonable substitute for this:

                                        Comment


                                          Re: Arduino current sensing (in car)

                                          Later facefsck will know more than google when they get the first pass at processing search requests...

                                          Comment

                                          Working...
                                          X