wireless tachometer

We aim to do a miniproject -- contactless tachometer. using the principle of receiving the electromagnetic radiation emitted from the spak ignition engines using an antenna. the signal is ampliflied,filtered ,converted to pulses.using an ADC it is then converted to digital form , then counted and by making use of a lookup table,we aim to display the rpm using 1line 16 character alphanumeric display.PIC microcontroller is used for ADC,pulse counting ,storing lookup table and display interface.kindly post ur suggestions regarding this project..{{{}}}

Topic by jaas   |  last reply


making tachometer from dvd writer?

Software like Nero tells speed of DVD burner so there must be a tachometer inside it how can i extract tachometer from DVD burner and use calculator screen for displaying results.

Question by ajain7   |  last reply


pwm o/p pic?

Dear sir,                how to get low frequency 30.....300c/s square wave from PIC MCU ,application required to simulate a tachometer.

Question by padmanabhan.k   |  last reply


What voltage / amperage / frequencies can I expect from the tach line of a 2001 eclipse v6?

The question is all in the title, but any way.  What numbers can I expect to see from the tachometer signal line of my 2001 mitsubishi eclipse v6?  I've read that some times it can be like 3 cycles for every 1 RPM.  I would assume it was running at 12 volts, but is this false?  What kind of amperage could I expect to be pulled on that line as well?  I plan on connecting an arduino to this to get the frequency as an input (new new new newbie to arduinos!).  Can I expect to need to step down the voltage, if so, how?  Is there some basic principle or standard for the tach line that I am unaware of?  Any help with the tach line info or how I should connect it to the atmega chip would be AWESOMELY helpful!!! -James

Question by sephiroth67   |  last reply


Dyna-Flex PowerBall Tachometer Hack HELP !?! Is their anybody out their????

I'm looking for a way to Hack this Dyna-Flex PowerBall Tachometer ( Speedometer ) I wish to use this LCD device to Time ,register shutter speed,& motor speed for 16mm & 35mm Motion Picture Cameras. The Tachometer displayes RPM's, I need to know the exact speed of the camera, ie: 1800 RPM's = 24 fps ( frames per second )I'm not sure how this unit works ? Induction current ? The Dyna-Flex Gyro Ball has coils & a magnet that is incorporated in the Ball. The Tachometer will only register the RPM's if it is on top of the PowerBalls window, and not on the side of the ball.This unit could be used for many other applications. Since it is the size of a Silver Dollar and uses little or no power, with the right pick up ( magnetic ? ) it could be of great technical use with other HACK projects.

Topic by MagicLanternProductions   |  last reply


how to make tachometer with 7 segment display for single cylinder 2 stroke 6v ignition..can anyone help me? Answered

I found a diy project from https://www.instructables.com/image/FU19QM5GH4NN2QX/Building-the-circuit.jpg but i want to use only 3 led(7-segment display) instead  of  4 led.. and another problem is this circuit only fit input signal from 12v ignition 4 cylinder ( car ), but mine is 6v single cylinder 2-stroke( motorcycle ).. what i have to modify so than i can make a circuit that can use 6v signal to the ic and only use 3 led(7-segment display.. can any give an opinion or some one that have done this to help..im not to good with electronic but i understand english. :-)

Question by kill_them_now   |  last reply


Cheap and easy digital tachometer?

I convert engines from weedeaters, leaf blowers, etc. for use on large model airplanes.  I use an aftermarket electronic ignition on the engines.  The ignition uses a Hall effect sensor and a magnet to trigger the CDI ignition.  I would like to build a digital tachometer that would use that same trigger.  They sell them for $25.00, but I thought it would be fun, and cheaper, to make one (or several) myself. Can anyone help with a circuit and parts list? Thanks!! vettebob

Topic by vettebob   |  last reply


What am I doing wrong ??? Arduino - tachometer !? Answered

Hello ... I would like to ask, what am I doing wrong. I'm trying to create this instructable www.instructables.com/id/Arduino-Based-Optical-Tachometer/ ... I downloaded the code, created the circuit (photo provided) ... and I'm using these components :  1. IR LED = SFH487-3 www.maplin.co.uk/module.aspx (code CY88)  2. Phototransistor = SFH300-3 www.maplin.co.uk/module.aspx (code NP64) Resistors are the same value, like in the instructable. Please, could you tell me, what am I doing wrong ??? Thank you very much. Zholy P.S. : IR LED is working, the PhotoTransistor is working as well <- I tried to measure it with my voltmeter - for CONTINUITY ... and as I was getting closer to the IR light, the value was decreasing.

Question by zholy   |  last reply


Arduino LDR tachometer (RPM counter)- not sensitive enough ?!?

Ladies & Gentlemans  ... I would like to ask you, what I'm doing wrong, in this RPM counter ??? As mentioned in my previous questions, I 've got an ARDUINO and I started with my first part - of my project. To count RPM / or speed. I'm using a LDR (light dependant resistor) and green laser as light source. The scheme is like this: + 5V ------- LDR -------------Analog pin 1                                     \                                       \--------resistor (220kOhm) --------- GND The code for this project looks like this : int LDR=1; // LDR is on analog port 1 int val=0; // this is the value, I get from the LRD void sextup(){  Serial.begin(9600); } void loop() {  val = analogRead(LDR); // read the value getting from LDR Serial.println(val); if (val<1018) {delay(4000);} } To explain the value 1018 in the IF condition ... when pointed the laser on the LDR,I get value from 1019-1020. So my idea was, when the value decrease just by one or more ... let me know, that the laser beam has been interrupt. But I realised, that I can cross the laser beam very quickly, and the LDR/Arduino will not notice it. I really don't know, where I'm going wrong. My few suggestions are : 1. wrong method - to use LDR ... should I use something else ??? 2. wrong RESISTOR value ??? ... should I change to different value to make it more sensitive ??? (I tried 2 different values = 220kOhm, 46kOhm ... that's what my voltmeter said :) ... but with both of them I have the same result ) 3. should I use different code ??? Any ideas ??? Thank you in advance for your answers. Zholy

Question by zholy   |  last reply


Whasing machine motor help?

Hi, I have a washing machine motor that I want to use for some projects of mine, and before I burn it using the wrong voltage, I wanted to ask you guys how it's done right. The motor is from a Whirlpool washer, and it's got 5 wires going in it.  From whirlpool's manuals I understand that leads 1,2,3 are the motor windings, and leads 4,5 are the tachometer. The resistance between leads 1 and 2, 1 and 3, and 2 and 3, are all 6 ohms. The attached picture shows the sticker on the motor. My question is, how do I make the motor spin?  Do I just plug it to the mains?  I'm guessing the tachometer wires are useless to me, since I don't have a control unit, which means I have 3 wires to work with.  Also, is there a way to make it spin slower/faster without a control unit? Thanks for the help!

Question by Morgantao   |  last reply


Gas engine tachometer phone app?

Does anyone know of a tachometer app for a phone or PC that can estimate gas engine rpm by sound? One would enter options like 2-stroke or 4-stroke and number of cylinders, then hit the analyze sound button. I found one for RC helicopter rotors but couldn't find anything else.

Question by robbtoberfest   |  last reply


Is there a way to build a simple tachometer without a microcontroller? Answered

I would like to measure the speed of a motor that i have, but have nothing to do it with. If there is a simple kit (cheaply), then please point me to that. I don't want to have to program a microcontroller, though.

Question by qwertyboy   |  last reply


Use LED VU meter as Tachometer?

Hi, i want to share and ask something.   Somedays back i bought a digital tachometer with dial and needle. I wanted to test it, so i connected its power terminals (12V) and connected the Tach input wire to audio speakers output (+ve) terminal and played a loud song.  I saw Tach needle going up at certain frequencies. I want to ask that if tach can detect audio signals SAME AS a VU audio meter does. So, CAN A LED VU METER BE CONNECTED SAME IN PLACE OF TACHOMETER  to detect car RPM signals.? Plz help and guide.

Question by waqasjamil   |  last reply


How to synchronize the brightness of a grille-mounted neon tube/LED bar to a car's tach/speedo?

I have a 1997 BMW 328i, and I've been thinking about installing either a neon tube or a bar of LED's in the grille of the car to use at night (most likely not street legal, I know). I want the brightness of the tube/bar to be controlled by one of two things: The speedometer or the tachometer. I.e., if the speedometer is at 0 MPH, the light is off, and if the speedo is at 75 MPH, the light is fully on. Same thing with the tach, light off at 0 RPM, light fully on at redline. Unfortunately, I haven't the slightest idea how to use the car's computer or the gauges themselves to set up a control module for the light. If any of you has a good amount of knowledge about automotive gauges, I would appreciate your help!

Question by Jonny Katana   |  last reply


Laser Mouse Sub-Rev Tach

I would like to use a laser mouse as a sub-revolution tachometer. I know that a laser mouse can discern 1 part in 1,000. Some can discern 1 part in 2,000. If you print a ribbon with vertical lines and attach it around a disk you could expose the laser to the lines and create a data stream. I have already found a way to increase the USB polling rate in XP from 125 MHZ to as much as 1,000 MHZ. Though I have tried to find information on how to proceed with my idea, I have thus far found little to help me move forward. Is there anyone on this list with ideas that mght help make this project a reality? This could be data acquisition on the cheap. Really cheap. :)

Topic by nickec 


A brighter speedometer? LED display?

My current speedometer uses the same type of display that you may find on a solar-activated calculator or cheap alarm clock (the ones that display black letters on a grey background). problem is, I cant see it in bright sunlight! Is there is a way to make a speedometer with my own set of 7-segments displays that use LEDs, or if I could convert my current one to using them?

Question by phephq   |  last reply


Looking for LED help....

Hi there, I'm looking for for help with a project I'm working on and I'm tryin g to build a *fairly* simple LED bar light (similar to that which you see on an F1 steering wheel or a car Tachometer) for a gaming wheel.   Although I've done a lot of gooling and searched this forum I'm not sure where to start. My aim is to have around 15 LEDs in a row (5 green, 5 red and 5 blue) that light up one by one (and remaining on) from the left to right. Its purely cosmetic and not conntected to anything.  Ideally I'd want this to repeat 3 times on the when first powered then remain off until power is cut then restored. Here's a link to something similar that I'm trying to achieve and picture embedded too http://performancedrive.com.au/wp-content/uploads/2011/07/Ferrari-F150%C2%B0-Italia-1-1-scale-1.jpg I'm sure this must be realtively simple to do but I'm lost where to start.  Any help or simple to follow tutorials would be great. Thanks

Topic by Hazza24   |  last reply


Idea: cheap multichannel remote control system using IC 555 (transmitter), 2917 and 3914 (receiver). Is this feasible?

Can we make a cheap multichannel remote control system using IC 555 as frequency generator for transmitter (with several buttons connected to different resistors to yield different frequencies to blink the IR led), and as the receiver we use IC 2917 to convert freq to voltage and feed it to IC 3914 as the channel selector? The 3914 datasheet tells that it has 'dot mode' beside the bar mode. Do you think it's feasible? Care to help with the schematic diagram?  Thanks a lot. P.S. This vague idea is inspired by the Led tachometer instructable found in here.

Question by verdastel   |  last reply


amount of wind (input) = number of LEDs Lit?

Good afternoon, Im making an exhibition piece that will have children working a set of bellows that are connected to a (pretend) blacksmiths forge. What I need to represent is the more the bellows are pumped the more the "embers" will glow. Im thinking a turbine tachometer that leads to an LED driver set to display as Bar so the faster the turbine spins the more LEDS are lit, or they trigger a series of LEDs to light (this thing has to get pretty bright not sure one LED per step will do it. Trouble is im good with the theory and pretty good with the practical its just the technical that is letting me down. If anyone could see there way to giving this some thought and maybe doodling a circuit diagram / shopping list that would be awesome. You can checkout some of the other things if made here imakemodels.co.uk

Topic by pieceorutt   |  last reply


How can I use a LM2907 and a microphone to distinguish between two given frequencies; either 5400 Hz or 1900 Hz?

I want to use a LM2907 and a microphone to pick up a frequency (also be able to distinguish between the two frequencies and background noise). I see before me that there will be two outputs. 5V or 0V for "picking up frequency" or "Just background noise" and another output telling whether the microphone picks up the 5400 Hz or the 1900 Hz by 0V or 5V, respectively (the order is not that important when I recon I just can put on an inverter).  What I need to know is the values for my C´s and R´s in the circuit. Can anybody help? I think the Minimum Component Tachometer-circuit will be a good starting point.  The outputs are used for inputs for logic gates.

Question by Janniche   |  last reply


The $2500 Car

From a NYTimes article, a story about a new $2500 car hitting the market in India. It won't pass US or European emissions or safety standards, but still- how neat is this?For Tata Motors of India, which will introduce its ultra-cheap car on Thursday, the question was, what could it take out?The company has kept its new vehicle under wraps, but interviews with suppliers and others involved in its construction reveal some of its cost-cutting engineering secrets — including a hollowed out steering-wheel shaft, a trunk with space for a briefcase and a rear-mounted engine not much more powerful than a high-end riding mower.The upside is a car expected to retail for as little as the equivalent of $2,500, or about the price of the optional DVD player on the Lexus LX 470 sport utility vehicle.The model appearing on Thursday has no radio, no power steering, no power windows, no air-conditioning and one windshield wiper instead of two, according to suppliers and Tata’s own statements. Bucking prevailing habits, the car lacks a tachometer and uses an analog rather than digital speedometer,

Topic by canida   |  last reply


Motorcycle Modification, what kind of data might I want?

Hey all, I'm working on a rather complicated modification on one of my motorcycles, and I think I might be using both a rasberry pi and an arduino to drive it. I intend to include some kind of display to use in selecting mod modes. I don't think I'm going to use all of the processing power of either. Since I believe I'll have a digital display to show information to myself, I am wondering what kinds of data I might want to think about including on the screen when I'm not selecting a different mode. I currently have a fuel gauge and a clock, a digital speedometer and a tachometer on my OEM cluster. I was thinking that maybe Heading and or GPS location might be cool. Maybe outside temperature? Or connecting the system to my phone to transmit text/call information? If I had data, maybe I could do something more complicated, but I only pay for text messaging because it's cheap. If I thought of something cool, I maybe would buy some data too. Any ideas?

Question by disturbed1035   |  last reply


Arduino calculation error... Or operator error?

Below is a tachometer program that was patched together... Using a hall effect for the sensor. For some odd reason when the calculation is done for interrupts per second something goes wrong... When set at 30*1000 I get what seems to be a good RPM number... But when changed to 60*1000 the RPM jumps to 20-50k... Not sure what is going on... If someone would be so kind and have a look at the program and see if I am missing something... It would be appreciated.. int ledPin = 11; volatile byte rpmcount; unsigned int rpm; unsigned long timeold; #include LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7); void rpm_fun() {   rpmcount++; } void setup() {   lcd.begin(16, 2);   attachInterrupt(0, rpm_fun, FALLING);   pinMode(ledPin, OUTPUT);   rpmcount = 0;   rpm = 0;   timeold = 0; } void loop() {   delay(1000);   detachInterrupt(0);   rpm = 60 * 1000 / (millis() - timeold) * rpmcount;   timeold = millis();   rpmcount = 0;   lcd.clear();   lcd.print("Rotary Head RPM:");   lcd.setCursor(6, 1);   lcd.print(rpm);   if (rpm > 100)   {     digitalWrite(ledPin, HIGH);   }   else   {     digitalWrite (ledPin, LOW);   }   attachInterrupt(0, rpm_fun, FALLING);

Question by fracture123   |  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