26 Replies Latest reply on Aug 14, 2016 7:12 AM by whittlerkev

    Electrical questions about my robot

    braedan

      Hello Element14 community,

       

      I have an amateur understanding of dc electronics but there are a few questions that i haven't found any other threads or discussions on. Probably because i do not know the name of the specific topic.

      Forgive me if the answer is obvious, but my first question is on current placement. When i look at a solder less breadboard there are two lanes for a positive and negative voltage from a power supply. Say i have an 6v red led drawing 30ma from the power supply, but is connected to the power supply from the middle of the breadboards power lanes. Now if there is a 6v dc motor connected to the end of the power lanes and is drawing 1.5 amps or so, does the high current affect the led in front of the motor? again: there are 1.5 amps going across the power lanes to the motor at the end, but there is a small led drawing much less current before the motor from the same power source.

       

      My second question is about capacitors. I have an array of Sharp (brand) Infrared distance sensors that operate at 5 volts and draw current in sharp bursts rated at around 30-60ma on average. I am planning on wiring all 37 of them to 3, 16 channel multiplexers connected to and Arduino uno that will then read the sensors analog output. (Multiplexer i will be using is the cd74hc4067). I have two questions on this topic, both of them about power connectivity. My first question is about the sensors. On a the sensors website and data sheet they both strongly recommend the use of some sort of capacitor to smooth things out. Please look at the picture attached and help me find the best places to add this extra circuitry. Please keep in mind that the S in the image is the Sharp infrared distance sensor and there are actually 37 sensors and not 3. Second is about the power it self. I was told that the sensor array would take little over 1.5 amps and to be safe i should have a power supply that can supply double the amount of current needed. The problem is that i don't actually need a power supply because i will be running this off a 12v lead acid battery. I'm not sure how to build a voltage regulator that can supply this amount of current (3 amps), if a voltage regulator is what i need. later I found this UBEC DC/DC Step-Down (Buck) Converter 5v @ 3a output on Adafruit but yet again i'm skeptical if it will properly power everything.

       

      P.S. - Could a 12v 7aH lead acid battery (specifically this one: https://www.amazon.com/ExpertPower-EXP1270-Rechargeable-Lead-Battery/dp/B003S1RQ2S/ref=sr_1_3?ie=UTF8&qid=1468962932&sr=… )

      power this arduino sensor array? Specifically how much am i able to draw from this battery? In the future i plan on building a large robot and i need a battery that will be able to power this sensor array, 3 sub 100watt 24v DC motors, 2 small 24v DC gear motors,a raspberry pi 2b and a 12v dc VGA monitor. I know its allot but they all wont be running at once (mainly the motors) and i also know that i can increase the battery capacity by wiring two or more together in parallel (please correct me if i'm wrong). I'm just asking if this lead acid battery type can discharge the required amount of power with out any battery problems, i don't what any battery fires or an explosion.

       

       

      Please write me back and helpful links or answers to my questions!

      Thank you for your time!

        • Re: Electrical questions about my robot
          jw0752

          Hi Braedan,

          The short answer to your first question is that one load will not affect a second load. In reality the motor may load the line and lower the voltage slightly which may slightly decrease the current to the LED but you may not notice it. This loading effect can be minimized but having low resistance wires and connections from the power supply to the loads. The position of the loads will not make much difference if the resistance of the supply lines is low. Think of how you can turn on multiple lights in your home with out a noticeable effect. Also note that when a large appliance turns on the lights may dim. This is the resistance of the supply lines having to be factored into the equation.

          John

          2 of 2 people found this helpful
          • Re: Electrical questions about my robot
            jw0752

            Hi Braedan,

            I will think about your other questions. The battery type that you mention is very good for delivering higher current and for the ability to be recharged. 7 aH basically means that you can expect about 7 amps for one hour though reality will probably cut this down. The equipment that you hope to hook up to this battery is quite ambitious. The 100 Watt 12 volt motor alone will draw over 8 amps. I would recommend that you brush up on the math for figuring currents and wattage so you can plan ahead and not waste time and money on batteries or motors that are not compatible. Here is a link to a tutorial on Current and wattage calculations.

             

            http://www.electronics-tutorials.ws/dccircuits/dcp_2.html

             

            John

            2 of 2 people found this helpful
              • Re: Electrical questions about my robot
                billpenner

                just a few thoughts, Braedan:

                 

                You should definitely use a buck converter for the circuits other than the motors. Since the motors will be 24 volts and other circuits will be 5 Volts, the basic power supply (batteries) will be two 12 volt batteries in series. By the way it is not a good idea to use lead acid in parallel since they will self discharge over a relatively short time compared to lithium for example. Since you will use a buck power converter for the lower voltages there will be no noticeable change in the LED brightness. A large capacitor will smooth out the power surges but it will probably not be a factor since the surges will be the result of the motor turn on and they are pretty tolerant to small voltage changes. This is especially true for stepper motors. 

                1 of 1 people found this helpful
                • Re: Electrical questions about my robot
                  braedan

                  image.pngimage.png

                  So.

                   

                  i have been been doing some research and now know a little more about decoupling. I found this circuit (attached in image) for decoupling an IC. I was wondering if this could be repeated for all 37 IR sensors in place of the IC shown in the circuit. If not could you recommend an new circuit diagram, or maybe better capacitor choices for my needs, thank you!

                   

                  website:De-coupling

                  1 of 1 people found this helpful
                    • Re: Electrical questions about my robot
                      braedan

                      Sorry I couldn't post  the images but they are on the website I linked.

                        • Re: Electrical questions about my robot
                          jw0752

                          Hi Braedan,

                          Your images came through just fine and the link you used went to a good article on decoupling. Yes if you put your sensors in place of the indicated IC you will provide the decoupling that is recommended. Getting the .1 uF caps close to each Sensor is important and make sure they are across the power supply leads and not attached to any of the signal leads unless recommended by the data sheets. The use of the 47 uF capacitor helps keep the volatge from dipping in the line when the sensor turns on. I would not use an individual 47 uF for each sensor as this will put 1700 uF of capacitance on the power supply rails and this would be excessive. Depending on the power supply or buck converter used to supply the 5 volts I would look at the recommended output capacitor size and provide this amount in 4 or five seperate caps. For example if the converter recommends 100 uF capacitor you could use (5) 22 uF caps. These larger caps should be electrolytic caps and the small 0.1 uF caps ahould be ceramic.

                          John

                          1 of 1 people found this helpful
                            • Re: Electrical questions about my robot
                              braedan

                              Hello again John!

                               

                              Im very concerned about how to safely power my raspberry pi off this battery. Specifically I'm worried about the voltage regulator I may be using will not be able to safely power the pi 2 in the case of the motor noise and loading the main power line. I fear that the out put voltage will fluctuate due to the loading and cause the pi to suffer. do you think that a switch mode regulator will harm the pi? If not here's the link to a video i plan on coping. https://m.youtube.com/watch?v=CEhBN5_fO5o

                               

                              Thanks!

                              -b

                                • Re: Electrical questions about my robot
                                  jw0752

                                  Hi Braedan,

                                   

                                  While I am not probably the expert that you hope I am I will tell you that I think that the proper switching regulator is the only way to go. For one thing switching regulators are much more efficient than linear regulators and as such you will not find as large a portion of your batteries energy going up in waste heat. You may also find that the drop out ( voltage where the regulator output is affected) might be better with the switching regulator. This is why many computer power supplies can run on any voltage from 70 volts to 220 volts without having to move any switches. I am confident that a properly decoupled ( correct capacitors added) switching regulator will work well with your pi 2. Now if I have missed anything the smart guys will swoop in and let us know.

                                   

                                  John

                                  1 of 1 people found this helpful
                                  • Re: Electrical questions about my robot
                                    jw0752

                                    Hi Braedan,

                                     

                                    After I answered you I went back and watched the video that you posted. Thanks for posting it as it was very well done and I will probably play around with the circuit he was using for the fun of it.

                                     

                                    John

                                    1 of 1 people found this helpful
                              • Re: Electrical questions about my robot
                                jw0752

                                Hi Braedan,

                                The article that you linked to shows a picture of a small ceramic capacitor labeled 103 but he article talks about a 0.1 uF capacitor. I feel that the 0.1 uF is the correct size and the one marked 103 (which is actually 0.01 uF) may be a little small. Your data sheet may have a recommendation which is best followed.

                                John

                                1 of 1 people found this helpful
                            • Re: Electrical questions about my robot
                              michaelwylie

                              Q1 - Ideally one load does not effect the other. In reality many things can happen. For instance, in your example provided, the motor, or any inductive load, will produce an EMF that will likely feedback onto the rail unless some form of protection is used. In your instance you would need to isolate the motor from the rest of the circuitry. Another situation is called LOADING. This is when you try to pull too much current from a supply, based on its power rating, and the output voltage drops. The more you experiment, the more you will see and learn. The more things you hook up to your rail, the more you have to be aware of what might be happening.

                              1 of 1 people found this helpful
                              • Re: Electrical questions about my robot
                                DAB

                                Hi Braedan,

                                 

                                You have an ambitious plan and I highly suggest you find someone local to help you with the electronics.

                                 

                                Most drive circuits use either a constant current device and or a nice capacitor bank to keep spikes along the voltage lines to a minimum.

                                 

                                I am not sure why you need the 36 sensors, but I need to ask if you intend to keep them all working at the same time?

                                If you have the time budget, you can set up a sensor firing sequence, which will greatly reduce you current demand and reduce any interference as the various devices pull in their current.

                                 

                                I would use a capacitor on each sensor, probably just the 1 microfarad or so.  That will keep each sensor from experiencing induced spikes.

                                 

                                Make sure that you set up diodes around your motor leads to prevent induced currents as you use the motor.  A motor not only uses current, but it can generate current if the wheels continue to move after the power is shut off.  Very bad!

                                 

                                If you take some care in equalizing the load as I have suggested, your 12v battery should be up to the job, depending upon how often you use the motor.

                                 

                                I would also recommend that you use a microcontroller to establish use logic to step through the sensors and analyze the data as it comes in.

                                 

                                Keep in mind that each sensor will need time for the pulse to go out and return to get your distance measurement.

                                 

                                Over what distance are you expecting to measure?

                                 

                                The more information you provide us on your proposed circuit and circuit board implementation the more guidance we can provide you.

                                 

                                Is this a school project or just something you want to do?

                                 

                                DAB

                                3 of 3 people found this helpful
                                  • Re: Electrical questions about my robot
                                    mcb1

                                    I'm also curious about why there is a need for 37 IR sensors.

                                    I've seen other robots use a servo with a single sensor mounted which covers the area ahead very well.

                                     

                                    A lot of the sensors have an onboard regulator so it might be worth checking out one first.

                                     

                                    Personally I'd be splitting the 5v rail up if you need to have that much load.

                                     

                                    Your query about current and rails is best referenced back to water.

                                    The river flows at a certain speed (ie voltage) and has a number of pump which draw 100 litres/minute (ie Amps).

                                    If the river is not wide (or deep enough) then the flow will slow to a trickle (ie the voltage will drop).

                                     

                                    If the river is wide enough to handle the pumps then there will be no effect.(ie your LED will shine just the same).

                                     

                                    Every piece of wire has some resistance, and like a normal resistor as current is passed through this 'resistance' there is a corresponding voltage drop.

                                    The aim is to ensure your distribution loss is minimal and this includes the wires and connectors.

                                     

                                     

                                    Mark

                                    3 of 3 people found this helpful
                                  • Re: Electrical questions about my robot
                                    braedan

                                    Hello!

                                     

                                    Thank you all for acknowledging my post, and I am very sorry for my incompleteness and professionalism. I am currently working on a cuircuit diagram that I will post ASAP.

                                    To fill in any gaps I left out I'll try to tell you all about my current robotics project. I have received a large broken medical telepresence robot from a friends parent who works at the robotics company. After a i confirmed that the bot was indeed busted I began striping it down till it was just the motors and sensors left. Im now planning on putting in my own hardware to control the chassis. The robots features are as follows:

                                    a vga monitor, two cameras with the same output (some wires I dont understand), two 24v motors with mysterious 5 wire encoder (power to the motor isn't applied through the encoder), There are 37 Sharp brand IR distance sensors That are placed all around the base, 1 large speaker, 1 knob (probably a rotary encoder that used to be for controlling the volume), on the bottom are 3 larger 24v dc motors with the same motor encoders mentioned above. The three motors move the robot using holonimic drive. It has been quite the job so far. I'm planning on using a Raspberry pi 2 for the brains, connected to a arduino providing it with sensor data over a usb cable. The raspberry pi will control the 3 motor drivers used and needed. Two sabertooth 2x12 (dual) motor drivers for the bottom 3 motors and a L293D dual h bridge to control the top two motors in the robots neck. I now need help on how to effectivly power all these individual components off a single battery with out damaging anything.

                                    Thank you for all your help!

                                    P.s. I also need help in understanding the pinout of the motor encoders because that information is crucial for the development of this robot. I also would like to know the pinout of the top two cameras though it is not entirely necessary because I will soon replace them both with either a raspberry pi camera module or an xbox 360 Kinect 3d sensor/camera because it provides RGBD data witch could be useful.

                                    thank you once again!

                                    1 of 1 people found this helpful
                                      • Re: Electrical questions about my robot
                                        braedan

                                        Pictures are on there way!

                                          • Re: Electrical questions about my robot
                                            braedan

                                            OK, here are the manufacturers images of the robot and the circuit diagram, i will say before hand that it was my first attempt at using this king of computer program and towards the end it didn't let me do what i needed so i just drew over it using paint. Also the program did a terrible job exporting the image, i am very sorry and i am very mad at the program. The robot is the RP-7 medical telepresence robot by the way. RP-7 robot back.jpgRP-7 robot front.jpgRP-7 robot side.jpgschemeit-project (1).png

                                            you can see in the pictures above of a fully assembled RP-7. So far i have removed (nearly) all open pannels and completely removed its, well, everything exempt motors sensors and a display. Soon i will remove the two cameras you see placed above the screen. I should also mention that since there is a reference available, the two small 24v dc motors control the up down and side to side (x,y) movement of screen. from now on i will reference it as the head. And quite obviously there are three large 24v dc motors on the bottom. in a triangle formation, the on at the tip goes side to side, while the two in the back go forward and back and actually drive it forwards. the one in the front is just for turning and steering. I hope you see why i need to control 37 ir sensors now: all the black rectangles are sensors. In the circuit diagram i intentionally left out the ceramic capacitors that go with each IR sensor because it was to tight of a fit. also i haven't really planned out where i would put the audio amp so i put it where you see now. I am also thinking that there should be some more filtering going on, especially by the monitor. Please correct me if i'm wrong (which i usually am).

                                             

                                            Thank you! - Braedan

                                            1 of 1 people found this helpful
                                        • Re: Electrical questions about my robot
                                          dougw

                                          Question 1 - you won't notice the difference in LED brightness.

                                          Question 2 - the 3A buck converter should be able to drive all sensors. These sensors have high instantaneous spike currents, so I would put large capacitors on the power pins (at least 10 uf)

                                          Question 3 - the battery can run the load but will need some de-rating. Your battery is rated at 7 A-Hr when discharged over 20 hours - this is discharging at only 2.86 A. If you draw 4 times this current (11.4 A) the battery becomes a 5 A-Hr battery (lasting about 25 min) You will need heavy wire to carry this current and the battery will get pretty warm. I would monitor the battery temperature and shut down if it gets over about 50C. You don't need a circuit, just touch the battery while it is running - when it gets too hot  to touch, that tells you how long it can run before you need to cool it off. It might never get too hot if the motor is not under heavy continuous load.

                                            • Re: Electrical questions about my robot
                                              braedan

                                              Thank you Douglas!

                                                  Your response was just was I needed!

                                              I just have two questions:

                                               

                                              #1. When you say " large capacitor", would it be an ceramic cap or an electrolite cap? Also, would I need a cap for every sensor; a capacitor across the positive and negative lines for each individual sensor. Or a cap across the main power rail to all the sensors? Maybe I would need a combination of both?

                                               

                                              #2. Could a raspberry pi 2b run of another 3a buck converter with out damaging it Or the converter?

                                              Also, if the motors charge the main power line from the battery could it damage the pi? Then sensors? The battery it self? Is there some basic circuit or breakout board I could use to protect the main power line (battery) from the motors back EMF or some other damaging force from breaking other components.

                                               

                                              Thanks again - Braedan

                                                • Re: Electrical questions about my robot
                                                  dougw

                                                  #1 - I think these sensors have small ceramic capacitors on-board so you only need electrolytic decoupling. It is better to have one cap at each sensor, but it will most likely be fine with a single 100 uf cap on the supply, especially if the power wires are reasonably heavy wire. Running a star wiring arrangement is better than a daisy chain, but again a daisy chain can still work. If you have problems with a minimal solution, you can always add extra caps or wire.

                                                  #2 - yes this should work fine and it isolates the Pi from sensor current spikes (and vice versa)

                                                  #2a - if you are running all analog and digital circuits from buck converters off the battery, motor noise or other noise on the battery shouldn't affect your sensitive circuits.