How to make a charger for a 4 volt 4.5 ah sla battery? Answered

I have a 4 volt 4.5 ah sealed lead acid battery out of a cordless phone battery backup thing and I have no way to charge it. Does anyone know how to make a charger for it or even at what voltage and amps to charge it at? Thanks.

Question by JasonYMN   |  last reply


can you answer a few questions i have on SLA batteries? Answered

1.As you can see in the diagram i have eight 4.5 AH SLA batteries joined together to make four 12 volt 9 AH batteries. how would i incorporate my bigger 7 AH 6 volt SLA into this? 2.Is my math correct that i did up in the corner? 3.Does an amp an hour storage in a battery mean it will supply one amp for one hour? 4.If so and my math is correct i would have 516 watts of power for one hour stored in these batteries?

Question by harry88   |  last reply


Need to make charge indicator for 4 V 1 Ah Lead Acid battery Answered

Hi,  I have made a solar study lamp. I am using 4 volts 1 Ah lead acid battery for the same and 3 Watt solar panel. It charges well with the current circuit. But it does not have a charge indicator. I am looking for a battery charging circuit with charge indicators as follows: 1. Low battery indicator  2. Battery full indicator 3. Charging indicator - to indicate battery is getting charged Trying to keep this simple and inexpensive as this lamp is a part of social initiative for rural areas. Thanks in advance! 

Question by rahuldj   |  last reply


can i connect 4 11.1v lipo batteries in series AND parallel?

I have 4 11.1 v 2200mAh  lithium polymer batteries, and i want to connect 2 in series to give me 22.2 v with same aH and connect the remaining 2 in parallel to  give me 11.1v but 4400mAh.  is the a configuration of the two pairs i can do to archive max voltage and mAh. thanks in advance.

Question by icey.hood   |  last reply


How to hook up 2 batteries in parallel ?

I'm building a portable MP3 "boom box". I have two 12 V SLA batteries on hand, one is 12 V 4 AH and the other is 12 V 7 AH capacity. My question is: can these 2 batteries be connected, in parallel to power the amplifier I have ( 12 V) and 1) it would give me a ~ 11 AH battery? 2) could I charge them both, ( connected like that ) with a 12 V battery charger ( a automotive battery trickle charger) I have at hand?

Question by Phoghat   |  last reply


Loaded backwards

This one day, I was trying to open a page, and I noticed something funny. The thing at the bottom of the page that shows you how much of the page has loaded was going backwards! Seriously, it was on 99, and then it went to 97, 89, 78, 65, 55, 43, 20, 4... My Fasterfox timer (which counts how long it takes for your page to load) even started going backwards! Ah well. I guess that's just what I get for using an old version of Firefox. (2.00.01, I know it's old.)

Topic by YummyPancakes   |  last reply


building a portable lead-acid charger?

I have two lead acid batteries rated 6v 4.5 AH (is AH ampere? or ampere/hour) boast/equalize 7.2-7.5v float 6.75-6.9v max charge current 1.35A both my batteries are identical the question now is.. i want to build a charger for it and something to lower is current so some feature i want is  1) rechargeable by a simple plug in adapter (i have a 12v 4A ac-dc adapter) 2) output of usb voltage and current (optional adjustable current and voltage) 3)led indicates 4)optional: a switch to power usb devices directly from the adapter/bypass battery to extend battery life 5)around 5 usb out puts? i want to build this project cos i have the won batteries which are in good conditions but not being used in anyway.. i hope someone can help me with the technical specs..especially on the circuit diagram   have access to an electrical components shop but it does not sell chips so i need to salvage them

Question by michaelgohjs   |  last reply


Convert 48V battery bank to 12V for boat appliances - Is this inefficient?

I need a 48V bank for an electric motor on my boat. I also need 12V for my appliances. Obviously keeping both a 48V and 12V bank would be most efficient but the space required and cost of maintaining 2 banks is a bit much. So I was thinking of using a 48V DC to DC convertor to convert a 48V bank to 12V for my boat appliances(lights, pumps, etc.) http://pt.mouser.com/ProductDetail/Murata-Power-Solutions/HPQ-12-25-D48N-C/?qs=sGAEpiMZZMtwaiKVUtQsNaluUzA10QGezHFBNv8sYMI%3d But how much would I lose in terms of efficiency? Would the losses be too great? Would the bank of 4 x 12V 100AH batteries connected in series give me roughly 4800W ( 4 x 12 x 100 = 4800) or 16 hours of 300W use when drawing only 12V after the conversion?  Or would the available AH be much less due to the losses from the conversion?

Question by mchin2   |  last reply


Is this lion battery bank expensive? 150AH @12-14v

I was thinking about how much would cost making a lion battery bank with enough amps/hours to feed a car audio system (stereo + sub amp). Since this setup would drain around 25-30AH I definitely want a battery bank with around 150 AH capacity to get at least around 4 hours of music at max potency. Woulds this be so expensive? I know that lion batteries are getting cheaper and cheaper, but any idea about how much would this cost? I have made a research on ebay and amazon, I could not get an average idea, and considering many brands lie about the specs, I better first ask here to hopefully get some references. Thanks.

Topic by johanx4   |  last reply


Questions on building a lithium battery pack with pcb?

I have to build a pack to run my portable N64.  I have some experience building with NiMh and NiCad, but I havent built a li-ion yet. Ive done my research but would like some feedback before I start building. Parts 18650's - 3.7V  3600mAh ea 7.4V PCM for 18650 Li-Ion/ LiPo 7.4V Li-ion/LiPo charger at 1.2 Ah Plan Either to build a 2S2P pack or a 2S4P pack.  Currently the N64, 7" TFT LCD, Controller, and Audio amp w/ 2x 8Ohm speakers is consuming just over 1A from what i can tell.  its running off of a perfboard w/ regulator and rail, thats hooked up to a universal transformer that is set to 7.5V  1A.  Everything works but when I turn the volume up it cuts off and then powers back on.  I dont know any other way to find out the over all power consumption.  I cant just look up all the specs because the LCD is from china and i dont have any specs. Anyway, back to my plan.  obviousely I want as much run time as i can get out of it with out compromising weight and space.  all componants of the portable can run off of 7.4V or lower, to include the lcd even though its rated at 12V. it can run as loas 6.5V. I have been debating between the 2S2P which should yeild 7.4V 7.2 Ah, and give me a runtime, some where in the ball park of 4 hours. or a 2S4P which should yield 7.4V 14.4 Ah. It would only be slightly more space and provide approximately 8 Hours+ Thats if I am even calculating everything right Ok, Regardless of whether i run a 2S2P or 2S4P the connections to the Protection Circuit will be the same, Right? Pos --> B+ Neg --> B- + to - ( Between Series connection) --> B1 or BM I understand that Li-Ion are safer when it comes to balancing then LiPo, but is this right?  having 2 parallel cells or 4 parallel cells connected with the only balance connection between the series.  I just want it to be safe. Next  is the charging.  I bought a cheap smart charger for 7.4V 1.2A output.  Will it matter whether i build the 2S2P or 2S4P, or will it work for both.  I know it will obviousely take twice as much time to charge with the bigger pack, but is their a max number of individual cells that a PCB can handle, or does it only matter the overall voltage? I also Included in my diagrahm a setup for a DPDT switch to change between pack powered, wall powered and battery charging.  I want it to have an "ON" and "OFF" setting. while off, pack is disconnected and if wall charger is plugged in, it will charge the pack.  while in the "ON" position, pack will power the device, but if wall charger is plugged in, then it will run off that. Can I even use a wall charger for the Li-Ion pack to power the device, or will it not work.??

Question by supramp 


HELP IDEAS for Mini A/C Unit for Truck

This is an idea that has been tried before with other type equipment & applications. However I think that I have found a way to limit the cost & over size of the application for the use intended. The rubb is that I need help with the fabrication. So I am hoping that the brain power will rally to help in a proto-type or test model of this idea.THE IDEA: A mini A/C unit to keep a vehicle cool for short periods of time 1-2 hours.Why needed?? I own a Private Investigation Agency and have very expensive electronic equipment inside sensitive to the high heat in south Texas during the summer.Equipment on hand for the idea:A. Small Cooler & HEater unit that can be found @ most Walmart, Walgreens, ect... Size 12"x 10" x 6"Input: 100-240VAC 1.2 A 40 watt Output 12 volt 4.0 A (looks like a tall showbox with a single hinge that opens like a center console-armrest-glovebox in a truck or van. Picture below...B. A DC/AC convertor also sold at same stores. The unit is very small but will power the unit very easy. 12 volt 5 A 100 watt, 4" x 3" x 3/4"C. a zeus sealed 12 volt battery 4-5 AH with the PWR use of cooler.D. VArious size small electric fans to be used a blower fans.E. PVC or duct work for the application.F. Optional Solar Cell for battery recharge to be mounted on roof of vehicle.I am sorry if my post is inapropiate for this forum or if I have used this post wrong for my purpose. This is my first time to post anything...If there is anything I can do to help with the concept please let me know.I will try and add Pic's of the parts later.THANKS!!!PS: total cost of everything brand new was less than $50.00

Topic by leebarret   |  last reply


Circuit for power bank? Answered

Hello, Need a circuit design for the following requirement. Checked online available circuit designs but not sure if they meet all needs.  Looking for circuit design as per following details. 1. It will have one or two, 3.7 volts 2600 mah 18650 lithium batteries 2. Batteries will be charged using smart phone mobile charger or solar panel 10 to 20 volts and around 500 mah to 1 ah input 3. Will have mini usb connection for the same on pcb 4. Circuit should have battery level indication. While being charged, when they are fully charged LED should turn on indicating battery full. Also there should be one LED to show that the charging is in progress. When the battery charge drops below specific level another LED should turn on. 5. If we use 2 batteries then they will be connected parallel 6. Output voltage of the batteries should be 5 volts (so step up is required) and current should be appropriate for mobile charging 7. There should be provision for 2 USB connections. Load can be mobile charging / USB mini fan / USB mini keyboard LED (could be 2 at a time) 8. Circuit should be safe enough so no damage is caused to batteries / load etc.

Question by rahuldj   |  last reply


I sense... a disturbance in the Force...

Oh yeah. Bill Gates didn't go to work today.He doesn't work for Microsoft anymore....Even if you're not a Microsoft fan, you have to admit, without Mr. Gates, where would the computer industry be? Where would we be?Flash back time:Ah, yes, I remember my very first personal computer... It was a Hewlett-Packard (not an "hp" ;-) with a MONSTER-sized monitor that took up a good 3/4 of my desk, a clunky keyboard and a "ball" mouse. It was running the latest OS: Windows 95. And get this: we were the first people on our street to get this new thing called the "World Wide Web" - whatever that meant. Our Service Provider? MSN, of course! Man, with my new computer (okay, in truth, it was a hand-me-down from Dad), I was the coolest 6-year-old in kindergarten. I had it made.Yeah, MS has made a a few mistakes...*cough*Vista*cough* (doesn't that go without being said?), but Gates and his company really did shift the industry into gear, and they aren't stopping any time soon.So, gentlemen, I ask you to join me as I tip my hat to Mr. Gates. Without him, I don't know who I would be.

Topic by Labot2001   |  last reply


LED Questions

Help, I'm afflicted with inspiration in quantities that exceed my skills!So I came up with an idea for a project that would probably require the use of LEDs, which I know next to nothing about. Ah, said I, the Internet can teach me much... so I turned here and found the (nearly) perfect Instructable, "LEDs for Beginners":https://www.instructables.com/id/LEDs-for-Beginners/Having read this most helpful I'ble, I certainly came away more knowledge than I'd previously had, but still not enough to properly plan my project.Basically, I'd like to create a 2D "array" of LEDs to use as a light source, in order to backlight a roughly 8.5" x 11" translucent panel.It seems like it would be straightforward to just wire up a bunch of white LEDs in series to a power source and a resistor, and be done. I'm not afraid of a little trial-and-error, but I prefer to know at least roughly what I'm doing going in, so I'm asking for your help. Here are my lingering questions:1. Should I wire my LEDs in series, or in parallel? (Or some combination thereof)? In series, I gather that one LED failing will break the whole circuit, which could be a pain. On the other hand, I've seen several projects and sites that cryptically recommend against wiring these in parallel.2. Are there pre-built strips of LEDs I could acquire that would make this project simpler?3. If I want to vary the brightness of my light source, can I use a variable resistor (potentiometer), or does the nature of the LEDs preclude the use of this type of dimmer switch? If so, could I vary the brightness with multiple switched circuits, turning off half the LEDs for half brightness, 3/4 off for quarter-brightness, etc?4. I've got a slew of transformers from old tape decks, telephones, cell phone chargers, etc. Can I appropriate one of these as my DC power supply?5. How do I gauge how many LEDs I'll need, and what density is best to lay them out? I'm looking to create even, diffuse light, with no noticible bright/dark spots.6. Do I need to worry about heat?7. Are LEDs even the correct way to go here? Should I consider fluorescent light instead?I realize these are a lot of questions, but if you're an expert on LED projects, you could save me a lot of research time. If (I build this gadget, it will definitely show up here as its own Instructable.)Thanks!-JD

Topic by jdtwelve12   |  last reply


Ideal Energy/Battery Source for a Battery Powered Lamppost

Hello everyone,First time posting, so, thank you ahead of time for all your help!Project:I was tasked with creating an outdoor lamppost for an event at a campground (IE: no immediate electricity source). At first, it seemed quite simple, but, looking at the necessary requirements, it seems to be more complex than I thought. Requirements:I need to find a way to power a high-powered LED light bulb (ideally 12W equivalent) for 10 hours a day (for 3-4 nights - for a total of 30-40 hours) without immediate access to an electrical outlet. So, it would be around 20 watt hours a day. This battery source needs to be able to be outdoors, and face rain/weather. There may be a tarp, tent to cover it. I may have access to a generator to recharge my battery source at another location if need be.I currently have a bright DC 12V light bulb that would be ideal for this project, but, I could also use a AC light bulb if need be.Potential Solutions: Connected 6V Lantern Batteries: Connecting multiple lantern batteries together, and swapping them out on a daily basis. Walmart has a set of Rayovac Heavy-Duty Lantern Batteries for around $2.50 each. Pro: Connecting these batteries in parallel and series would give me the 20 ah, and 12v specs needed. \ It would come out to around $15 a day. Would be easy to put in a large water-proof container and connect to the lamppostCons: Bit wasteful - I'd burn through around 20 of these batteries, and would have to recycle/dispose of them Sealed? - Unsure if I could put them in a waterproof container. Do they need venting? Mid-range cost: Would come out to around $50-60 due to the number of batteries needed12V Deep-Cycle 20Ah+ Battery: A simple 20ah+ deep-cycle battery would provide me the DC power needed on a daily basis. I would then detach it during the day, and bring it to the generator to charge. Pro: Cost - Relatively cheap, at around $50, this battery option would be affordable Set it and Forget It - No need to connect multiple batteries together. This would just be an easy wiring job.Con: Venting - Unsure if I could place this in a simple waterproof container outside. Does it need to vent? Or, would a AGM deep-cycle battery be ok in a vent-free container? Recharging - Unlike the lantern batteries, I would need to bring this to a generator on a daily basis to recharge. Not the end of the world though.Ideas:I am vacillating between both options. Ideally I would like to go with the deep-cycle battery, but I am quite concerned with the venting problem. I don't believe the 6V batteries need to vent, so they could be placed in a simple container.Question(s): Does one of these solutions stand out more to you as the better fit? Are there other battery solutions that you think would work better? Do I need to use a deep-cycle battery, or would something like this battery work?Again, thank you ahead of time for any guidance you could provide!

Question by EddieGRA   |  last reply


500W electric scooter control and instrumentation with Arduino mega

1. Introduction DC 500W motor control with an Arduino mega to limit starting current and to vary the speed of the scooter. The battery is in 24V, 10A.h. The following table summarizes their characteristics: https://i58.servimg.com/u/f58/17/56/35/17/a014.jpg https://i58.servimg.com/u/f58/17/56/35/17/a111.jpg 2. Bibliography: Link download : sketch_escooter_feed_back_reel_V1.ino https://drive.google.com/file/d/0B_fB3GAsM02FSlRTWHdyRkhuUW8/view?usp=sharing escooter_ampli_SIMULINK.mdl https://drive.google.com/file/d/0B_fB3GAsM02FOW9OdmlhdDhJZGc/view?usp=sharing escooter feed back ISIS.DSN https://drive.google.com/file/d/0B_fB3GAsM02FOXdRWFN5OWRMQkE/view?usp=sharing youtube  :  "study trotinette electric e-scooter 100W et 350W, wiring"  youtube https://www.youtube.com/watch?v=QqJ2-YiE8Tg&index;=75&list;=PLfZunVn_gcq7EOurXuWU2sRFmh6CbiUiL Article: «Study of electric scooters 100W and 500W (Arduino), Revue 3EI 2017» Pdf? Book «I realize my electric vehicle» at DUNOD 3. Open loop program To test the programming, we simulate the program in ISIS, as can be seen in the following figure. In addition, we have an LCD display to display data (duty cycle corresponding to the PWM at 32Khz, motor current, motor voltage, action on the pushbuttons, 4 push buttons are used. BP1 to manually increment the duty cycle, BP2 decrement it. BP3 set the duty cycle to 0, corresponding to the brake contact. The speed of the motor is practically proportional to the duty cycle https://i58.servimg.com/u/f58/17/56/35/17/a211.jpg We made our own current amplifier called a step-down chopper but it is possible to buy a shield There are many cards for Arduino to control DC motors especially of low powers and also of great powers as can be observed on the following links.http://www.robotpower.com/products/MegaMotoPlus_info.html http://www.robotshop.com/en/dc-motor-driver-2-15a.html https://www.pololu.com/file/0J51/vnh3sp30.pdf https://i58.servimg.com/u/f58/17/56/35/17/a310.jpg But all these chopper shields measure the current internally but there is no current limitation. In order to have a current limitation, an analog current loop is required using specialized AOP or IC or a fast digital current loop. But what should be the value of the limitation current? The choice of the current value is normally for the 1-hour operation service in order to be able to carry out relatively long climbs without reaching the critical temperature of the engine. In our case, the limitation current must be Limiting motor = Power / Upper battery = 500W / 24V = 20A In addition, the power transistor of the chopper can only support 50A in our case. But in open loop, it has no current regulation, so as not to exceed the maximum current, a ramp of the duty cycle will be used. A 0.1 second interruption routine will be used to measure the voltage of the current (sample measurement, sample). This sampling time is arbitrary but does not allow to be faster than the rise time of the current because the electric time constant of the motor is L / R = 1.5 ms. Open loop operation with a 25.5s (8bit) ramp and 0.1s interrupt routine provides a good understanding of the operation of a DC motor drive. The display will only be done every 0.2s to have a stability of the digits on the screen. In addition, a digital filtering will be done on the current and the voltage on 4 values therefore on 0.4s. [b] Algo open loop [/b] Interrupt Routine All 0.1S Read voltage and current Loop loop (push button scan) If BP1 = 1 then increment PWM If BP2 = 1 then decrement PWM If BP3 = 1 then PWM = 0 Displaying variables every 0.2s Code: [Select] // include the library code: #include #include #include #define SERIAL_PORT_LOG_ENABLE 1 #define Led     13       // 13 for the yellow led on the map #define BP1     30       // 30 BP1 #define BP2     31       // 31 BP2           #define BP3     32       // 32 BP3 #define LEDV    33       // 33 led #define LEDJ    34       // 34 led #define LEDR    35       // 35 led #define relay   36       // 36 relay #define PWM10    10      //11   timer2    LiquidCrystal lcd(27, 28, 25, 24, 23, 22); // RS=12, Enable=11, D4=5, D5=4, D6= 3, D7=2, BPpoussoir=26 // Configuring variables unsigned   int UmoteurF = 0;  // variable to store the value coming from the sensor unsigned   int Umoteur = 0; unsigned   int Umoteur2 = 0; unsigned   int Umoteur3 = 0; unsigned   int Umoteur4 = 0; unsigned   int ImoteurF = 0;  unsigned   int Imoteur = 0; unsigned   int Imoteur2 = 0; unsigned   int Imoteur3 = 0; unsigned   int Imoteur4 = 0;            byte Rcy=0 ;    // 8bit duty cycle unsigned    int temps; // the setup function runs once when you press reset or power the board void setup() {   pinMode(Led, OUTPUT);   // Arduino card   pinMode(LEDV, OUTPUT);   pinMode(LEDR, OUTPUT);   pinMode(LEDJ, OUTPUT);   pinMode (PWM10,OUTPUT);     // Pin (10) output timer2   //  digitalWrite(LEDV,LOW);   Timer1.initialize(100000);         // initialize timer1, and set a 0,1 second period =>  100 000   Timer1.attachInterrupt(callback);  // attaches callback() as a timer overflow interrupt   lcd.begin(20, 4);    Serial1.begin(9600);   TCCR2B = (TCCR2B & 0b11111000) | 0x01;         //pin 10  32khz    http://playground.arduino.cc/Main/TimerPWMCheatsheet                                                   //http://www.pobot.org/Modifier-la-frequence-d-un-PWM.html   //   analogWriteResolution(bits)      https://www.arduino.cc/en/Reference/AnalogWriteResolution lcd.setCursor(0,1); lcd.print("Rcy"); lcd.setCursor(10,1); lcd.print("Um"); lcd.setCursor(5,1); lcd.print("Im"); lcd.setCursor(10,1); lcd.print("Um"); lcd.setCursor(20,1); // 4 lines display * 20 characters lcd.print("BP1+"); lcd.setCursor(25,1); lcd.print("BP2-"); lcd.setCursor(29,1); lcd.print("BP3=0"); } // Interruptions  tous les 0.1s void callback()  { temps++; //toogle state ledv for check   if ( digitalRead(LEDV)== 1 ) {digitalWrite(LEDV,LOW);}     else {digitalWrite(LEDV,HIGH);}     analogWrite(PWM10,Rcy);   // frequency Umoteur=analogRead(A0); Imoteur=analogRead(A1); Imoteur2=Imoteur; Imoteur3=Imoteur2; Imoteur4=Imoteur3; ImoteurF=(Imoteur4+Imoteur3+Imoteur2+Imoteur)/4 ; Umoteur2=Umoteur; Umoteur3=Umoteur2; Umoteur4=Umoteur3; UmoteurF=(Umoteur4+Umoteur3+Umoteur2+Umoteur)/4 ;   }// End routine // Loop corresponding to main function void loop() {    // BP + LED   if ((digitalRead(BP1))==1) {     lcd.setCursor(20,0);      // Column line     lcd.print("BP1");     digitalWrite(LEDR, LOW);        digitalWrite(LEDJ, LOW);     Rcy++;                        // PWM incrementation     if ( Rcy>254)  {Rcy=254;}     delay(100);               //8bits * 100ms = 25S increment 25ssecond slope     }        if ((digitalRead(BP2))==1) {     lcd.setCursor(20,0);     lcd.print("BP2");             Rcy--;      if ( Rcy<2)  {Rcy=2;}  // PWM almost at 0, engine stop         delay(100);      digitalWrite(LEDR, HIGH);     digitalWrite(LEDJ, HIGH);     }   if ((digitalRead(BP3))==1) {     lcd.setCursor(20,0);     lcd.print("BP3");      Rcy=2;               // PWM almost at 0, engine stop     } if (temps>=2)  { lcd.setCursor(0,0); lcd.print("                "); // Erase line lcd.setCursor(0,0);     lcd.print(Rcy); lcd.setCursor(5,0); ImoteurF=(ImoteurF)/20;     //resistance (5/1024)*(10/0.25ohm) si ACS712 66mV/A                            // For resistance 1ohm (ImoteurF) / 20; Simulation 5/25 lcd.print(ImoteurF); lcd.setCursor(10,0); UmoteurF=UmoteurF*10/38;                              //10/38   10/30 simula if (Umoteur>ImoteurF){UmoteurF=UmoteurF-ImoteurF;  }  //U-R*I lcd.print(UmoteurF); temps=0; }// End if time    } // End loop https://i58.servimg.com/u/f58/17/56/35/17/dsc_0614.jpg Since there is a limit of 9000 characters in the forum below Open loop program feature previous The interrupt routine lasts only 250 microseconds, the loop of the main program which scans the action of push buttons is 13micros and the display time of all data is 11ms. Thus, it is possible to improve the sampling period and thus the speed of the regulation of the current. The Arduino makes it possible to make the instrumentation of the scooter so to know the power, the consumption in Ah and Wh, to measure the speed, to know the consumption according to Wh / km, to measure the temperature of the engine, Have a safe operation. But for now we will see how to limit the current 4. Closed loop program, limited current control The sampling period will increase to 0.01 seconds (interrupt routine) If the current is less than the desired value, then the duty cycle can be increased or decreased to the desired value which is the setpoint. On the other hand, if the motor current is greater than the limiting value, there is a rapid decrease in the duty cycle. So as not to exceed the value of the duty cycle if it is saturated to 254 maximum and to the minimum value 6. Code: [Select] if (Imoteur<4000)                    // No current limitation at (20A * 10) * 20 = 4000   {if (consigne>Rcy)   {Rcy=Rcy+1;}   // Pwm ramp + 1 * 0.01second pure integrator    if (consigne    if ( Rcy>254)  {Rcy=254;}           // Limitation of duty cycle    analogWrite(PWM10,Rcy);   // Frequency 32kHz timer2}         } if (Imoteur>4000)  { Rcy=Rcy-5;              // No current filtering, to be faster                     if ( Rcy<6)  {Rcy=5;}       // Rcy is not signed, nor the PWM therefore Rcy minimum must not be less than 6                   analogWrite(PWM10,Rcy);   // Frequency 32kHz timer2}                        } 5. Closed Loop Program, Limited Current Control with Acceleration Handle An acceleration handle provides a 0.8V voltage when not operated and a 4.5V voltage when the handle is fully engaged. Instead of using pushbuttons to increase or decrease the speed setpoint, an acceleration handle will be used Code: [Select] Upoignee=analogRead(A3); // The relation in Upoign and the setpoint which corresponds to the duty cycle corresponds to if (Upoignee>100) { consigne=(Upoignee/2);     //0=a*200+b    et 255=a*800+b                      consigne= consigne-100;                   }                            else { consigne=0;   }               if (Upoignee<100) { consigne=0;  }     // redundancy     6. Temperature and safety program of the motor with the current measurement The outdoor temperature measurement can be easily performed by the LM35 component which charges 0.01V by degrees Celsius Code: [Select] temperature=analogRead(A2); //lm35 0.01V/°C temperature=temperature/2;       // Temperature coefficient lcd.setCursor(5,2); lcd.print("      "); lcd.setCursor(5,2); lcd.print(temperature);   // Display in ° C lcd.setCursor(9,2);      // Erasing secu display lcd.print("     ");   if (temperature>80 ) {lcd.setCursor(9,2);         // If motor external temperature is above 80 ° C                      lcd.print("secuT");                       Rcy=0;} In addition, thermal safety by measuring the motor current will be added. If the limitation current is greater than 10s then the motor will no longer be powered for 30s. A "secu" display will appear on the LCD display. This safety makes it possible to cut the motor on slope too high and when blocking the engine but it would be necessary to add the measurement of the speed in the latter case Code: [Select] if (timesecurite>=10000 ) {flagarret=1;      // If limitation current for a current of more than 10s                               timerepos=0;                               consigne=0;                               Rcy=0;                                 timesecurite=0;}       //   Then stop engine during a downtime    if (flagarret==1 ) {lcd.setCursor(9,2);         // If limiting current for a current of more than 20s                      lcd.print("secU");  }     //   Then stopping the motor for a stop time and display                                                     if (timerepos>=30000 &&  flagarret==1) {flagarret=0;                                           lcd.setCursor(9,2);      // After a rest time here of 30s                                            lcd.print("       ");   }   The display can be observed if the temperature is above 80 ° C https://i58.servimg.com/u/f58/17/56/35/17/a017.jpg Thermal safety by measuring the motor current (digital thermal relay) which allows to know the image of the internal temperature of the engine would be ideal. But for this, it is necessary to know well the thermal modeling of the motor. 7. Measurement of the energy capacity of the battery The energy capacity of a battery is in A.H, we will display the value in mA.H to have a high accuracy. The capacity will be in A.Second in the following equation. So to have in mA.H, it will be divided by capacity by3600. Capacity (A.s) n = I * Te + Cn-1 with Te = 0.01s and I multiplied by 10 So in the interrupt routine Code: [Select] capacity=ImoteurF+capacity ; And in the display Code: [Select] lcd.setCursor(0,3); // Display of energy capacity lcd.print("C mA.h="); capacity1=capacity/(18000);   //18000=3600*5  5=> Current measurement coefficient lcd.print(capacity1); To check a current of 10A with an adjustable resistor and after 30s, the capacity must be 83mA.H 8. Power and modeling with SIMULINK Modeling helps to understand the vehicle and its control. In addition, it is possible to compile the control part directly into the Arduino program from simulation under Simulink. But it will not be possible to simulate the instrumentation with the LCD display. In the following figure, we can observe the simulation of the programming of the chopper with the current limitation with Simulink. In the following figure, the green box shows the duty cycle control to vary the speed and the red border the current limitation. The controller of the control is here a simple integrator but it is possible to carry out a multitude of control. https://i58.servimg.com/u/f58/17/56/35/17/azub_c15.jpg In the previous figure, it can be observed that the current is well limited to 25A from 2s to 9.5s. Then, the current reaches 10.8A under established speed regime at 22.5km / h. The dynamics are similar to the tests carried out. With a slope of 5%, the cyclic ratio reaches only 100% as can be seen in the following figure. The speed will reach painfully 19km / h with a current of 24A and a motor power of 580W. See article: Study of electric scooters 100W and 500W (Arduino), 9. First conclusion It is easy to control a 500W DC motor with an Arduino and some components So repair many scooters that are in DC motors. But it takes some knowledge (automatic, engine) to know how to properly manage the engine and limit its current so as not to damage it The display of the speed, the distance, the operating time to know the Watt.km / km can also be realized with a menu 2. The .ino program as an attached file, But it is not possible to put an attached file in ISIS electronic labcenter? What is this forum? It would be desirable that the compiler could generate the.cof to debug in Isis and test the program line by line .... Arduino still has to make a lot of effort to be on the same level as other microcontrollers 10. speed measurement (tachometer) Velocity measurement is carried out using a hall effect sensor SS495 or A1324 which counts each revolution of the wheel. It is enough to enter the perimeter of the wheel of the scooter (130mm of radius therefore 0.816m in the case To have the speed, it is enough just to divide the number of turn of wheel on an arbitrary time of 1s to have a minimum speed of 0.81m / s therefore of 2.93 km / h. In addition, an average filter with 3 values will be used to display the speed. At 25km / h, there will be 8.5 laps. To count the turns, an external interrupt routine will be used on input INT0 21 of the mega card. http://www.locoduino.org/spip.php?article64 To simulate the speed, a pulse on input 21 will be used with a duty cycle of 10%. https://i58.servimg.com/u/f58/17/56/35/17/a018.jpg Code: [Select] void INT0b21() {   Tspeed++;   // External interruption to count the number of turns } // In the set up declare the interrupt routine when the 5V edge of the magnet detection is done   attachInterrupt(digitalPinToInterrupt(21), INT0b21, RISING );  // External interruption // In loop if (temps09>=5)  {        // 1 second loop lcd.setCursor(13,2);      // Erasing speed lcd.print("kph     "); lcd.setCursor(16,2); speed1=Tspeed*2937;      //1tour*816*3.6/1s=2.937km/h speed2=speed1;           //Tspeed (rate/seconde) speed3=speed2; speedF=(speed1+speed2+speed3)/3000;   // To put in kph lcd.print(speedF,1);    // Display to the nearest tenth Tspeed=0;   // Reset counter temps09=0;  //reset time } To improve the accuracy of the velocity measurement, it is possible that the sampling time of the velocity measurement is dependent on the velocity. For example: For speeds less than 10km / h sample at 1second, but above 10km / h sample at 2 seconds. 11. Distance measurement for autonomy The distance corresponds to the total number of turns of the wheel multiplied by the perimeter of the wheel. So do not set the number of turns to 0 for each sample. On the other hand, the reset of the distance will be done when pressing the reset of the Arduino Mega. The distance display will be displayed to the nearest second. At 32km / h, it will take 2 minutes to do 1km as can be seen in the following figure: https://i58.servimg.com/u/f58/17/56/35/17/a019.jpg Code: [Select] void INT0b21() {   Tspeed++;   // External interruption to count speed   nbrRate++; } lcd.setCursor(13,4);      lcd.print("km      ");  // distance=(nbrRate*816)/1000;  //distance m distance=distance/1000;  //distance km lcd.setCursor(15,4);      lcd.print(distance,1);  You can observe the electrical installation with the chopper, the arduino, and the display when the program is set up https://i58.servimg.com/u/f58/17/56/35/17/dsc_0613.jpg 12. Synthesis The RAM space is used only at 4% and ROM space at 3%, for an Arduino mega. So we could take an arduino a little smaller. But, there are 8 Lipo cells to make the 24V power supply to power the engine via the chopper. Therefore, the voltage measurement of each element will be on the Arduino with a JST connector. This measurement makes it possible to know if a cell with an internal resistance which begins to pose a problem and to know if the balancing of each cell has indeed been carried out. It is possible to switch to 36V with 12 cells also with the arduino mega without using an external shield that multiplex 24 analog inputs on input A0 It is possible to send all data to a smartphone via Bluetooth HC06 via pins 20, 21, RX1 and TX1. But the application under android realized under JAVA Studio can not be shared on this forum. This part will not be explained. After having made the instrumentation of this scooter, a study should be carried out on the precision of the measurements, it is possible to read "Instrumentation of a low-power electrical motor vehicle" eco marathon "type Revue 3EI N ° 81, July 2015 http://www.fichier-pdf.fr/2015/09/07/instrumentation-vehicule-faible-consommation-eco-marathon/

Topic by Iutgeiisoissons 


Don't try this at home, EVER ! The trip to NYC

Ah, I have finally gotten a little time to put some of the details up about my Trip (definition of trip, to stumble, fall, or to almost fall....) to NYC. The bus ride to Manhattan was uneventful. We were dropped off behind the Winter Garden Theater at 50th St. and 7th Ave. For those familiar with the city, this is a little north of Rockefeller Center, and a little west of Radio Music Hall. My little adventure started with me being a little greedy with what I wanted to see on this short day trip. I started down 7th Ave. and decided to scoot over to Broadway. In walking down Broad way (heading south, now) one have to be careful as it crosses the other blocks on a diagonal and it is very easy to lose the road and end up on 7th (and further south; you start ending up on 6th Ave - the Ave. of the Americas). The blocks heading south were shorter then those in the East - West directions. Walking through the Theatre District, and finally reaching Times Square (which is on 7th Ave), I was taking my fair share of pictures (Later, after I get them all posted, I will have to get my Sis in Law to help me identify the buildings, etc.) . Moving from Times square, I get the Garment District. This was a fairly quick walk for me, I didn't see much I really was impressed by there. Madison Square Park, was a nice little area, and then came the weirdest building I have EVER seen (and I have seen a house the shape of a shoe), I came upon the Flatiron building (see pics). In the Flatiron District was Union Square park. A fairly small park. Now, the streets going East and West were numbered, and I had started at 50th St. I was now at 12th, where Broadway becomes University Pl. and it ends at Washing Square Park. This was a nice little park too, so I got a few pictures of it. By this time, not having had a breakfast, I thought it would be good to find something to eat. I moved west along 4th st. until I got to Broadway again. Once I got into Soho (South Houston), I started getting a little turned around (I had just walked nearly 50 blocks). When I got to Canal Street, it was so crowded, I only went about one block on the street and didn't find anything of interest, so I continued on south on Cortland. Somewhere in this area I found (somehow I got to Chamber's St) I found a little Indian restaurant called Jhankar. It was a pleasant atmosphere, and the food was good. I continued on Chambers to get to the east side. I saw the World Financial Center, and eventually found Ground Zero. I took a few pics of what I could see. I did wonder around Battery Park a bit too long, and finally asked someone how to get to the Staten Isl. ferry docking point. I was told it was another 20+ minute walk further south (I was already at the other ferry docking ports and had already walked for over 4-5 hours). He let me know of the Shuttle bus, which the city pays for, which would pick me up and drop me off right outside the area of the Staten Isl ferry. That was a really decent little ferry ride too. 1/2 hour over, 1/2 back. Now it was getting to be near 6 PM and I thought I had better have a little to eat before heading back to 50th st. After walking a few blocks, I realized I was NOT going to make it in time. I looked for a Subway terminal but found none (I had already walked as far as getting back up to the most southern tip of Chinatown. I walked (very briskly) up to Bleecker St. looking for a subway or a cab. I finally got a cab waved down (I am just NOT the type of person that waves down cabs), and we headed off. I called the Bus driver. He said it shouldn't be long, he should get me there in time; and said traffic is a bit heavy here on 4th street. He nearly blew a fuse (and he had just reason too).....but he calmed down and said he'd circle the block and hope I got there soon, and to give him a call when I did. Fortunately, when I finally got back to 50th and 7th, it was only 12 minutes late and he had just pulled up with the bus. Besides the quarter sized blister on the ball of my right foot, and the lunch/brunch I had I brought nothing home with me (well, I forgot about the sunburn on my head.....yeah yeah, I should have worn a cap). All in all, it was nice to see everything......and I will never again walk 70+ blocks just to see everything again. I will become familiar with the subways, as that is about the cheapest way to go (except the shuttle bus). And I am about as stiff as I can be....now for some pictures. UPDATE:More pics UPDATE #2 The few remaining pictures I have left have been uploaded with these to my Facebook album NYC Trip

Topic by Goodhart   |  last reply