author
3Instructables45,795Views36CommentsBuenos Aires, ArgentinaJoined December 1st, 2015
I'm 18 years old and a 2nd year Electronics Engineering student at UTN, Argentina

Achievements

10K+ Views Earned a bronze medal
  • How to Make a PIC Programmer - PicKit 2 'clone'

    Hi! Take a look at Step 3: Programming the Programmer

    Hi! From what I understand the pinguino uses a bootloader and it is programmed via USB so it does not require a PICkit. However you cant simply modify the configurations from the bootloader without one.

    Hi! The PIC in the programmer needs no bootloader. It just needs the firmware as it is explained in Step 3.

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Hi, the code is divided in two files for better structure and when you open the file with the same name as the folder, the Arduino IDE should automatically open both files in different tabs. So you can upload the code even if it is in two separate files.The motor driver I used works with brushed DC motors, which have 2 wired each.In the Yeti_v4.ino file there is the folowing line of code:#define COLOR BLACK //Line colorYou can leave it like this for a black line on white background, or change it to:#define COLOR WHITE //Line colorfor white line on black background

    Hi!The function that calculates the line position, first scales the raw values from the sensors to the actual range that they can measure.Before the race, you can calibrate the sensors so that the white is read as 1000 and the black is read as 0 or viceversa, because is reality the sensor reads for example 956 for white and 68 for black, or some other similar values, because the sensor is not perfect. So first I map the values to a scale from 0 to R_SENS (1000 in my code).Then where it says "reverse scale", if I want to follow a black line instead of a white line then the measurements have to be flipped, so that a high value means you are on the line.After that, I use a strategy for following the line when the robot can't see anything because it has gone too far away from the ...

    see more »

    Hi!The function that calculates the line position, first scales the raw values from the sensors to the actual range that they can measure.Before the race, you can calibrate the sensors so that the white is read as 1000 and the black is read as 0 or viceversa, because is reality the sensor reads for example 956 for white and 68 for black, or some other similar values, because the sensor is not perfect. So first I map the values to a scale from 0 to R_SENS (1000 in my code).Then where it says "reverse scale", if I want to follow a black line instead of a white line then the measurements have to be flipped, so that a high value means you are on the line.After that, I use a strategy for following the line when the robot can't see anything because it has gone too far away from the line and none of the sensors see some part of the line. The strategy is to keep turning in the direction it was going to. So if the last reading of the line was 1950 and now no sensor reads part of the line, I "pretend" that the line is the maximum 2000 so that the robot spins and gets back to the line.In order to detect if none of the sensors can read the line, I ask for each sensor if the reading is at least halfway between black and white. That is P_LINE_MIN. If you define P_LINE_MIN to be higher then the sensor reading will have to be higher in order to consider that particular sensor to be on top of the line. This is a value that you can tweek in order to properly detect if the robot has gone outside of the line. However I found that 0.5, exactly halfway between black and white is a good value and works pretty much everytime.Please ask me if you have any other question, I am sorry if it takes time to answer

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Maybe try connecting them directly to a 6v power supply to see if they are broken or damaged in any way.

    Hi! I was also a little confused with that at first, but it is perfectly possible to have a weight be zero because the value of the sensor is summed up with the others and appears in the denominator of the average:(Value[0]*weight[0] + Value[1]*weight[1] + ... ) /(Value[0]+Value[1]+Value[2]+ ... )So the Value[0] matters just as much as the others.For example:If you have 4 objects that cost $0 and 1 object that costs $10, then the average cost of the 5 objets would be (4 * $0 + 1 * $10) / (4+1) = $2The number 4 is multiplied by 0 in the denominator but it appears in the denominator of the fraction.You can think of the sensor values like they are "pulling" the result towards their weight, so the Value[0] tries to pull towards 0 and the bigger that value is then the closer to 0 t...

    see more »

    Hi! I was also a little confused with that at first, but it is perfectly possible to have a weight be zero because the value of the sensor is summed up with the others and appears in the denominator of the average:(Value[0]*weight[0] + Value[1]*weight[1] + ... ) /(Value[0]+Value[1]+Value[2]+ ... )So the Value[0] matters just as much as the others.For example:If you have 4 objects that cost $0 and 1 object that costs $10, then the average cost of the 5 objets would be (4 * $0 + 1 * $10) / (4+1) = $2The number 4 is multiplied by 0 in the denominator but it appears in the denominator of the fraction.You can think of the sensor values like they are "pulling" the result towards their weight, so the Value[0] tries to pull towards 0 and the bigger that value is then the closer to 0 the result will be.Hope that this clears up why the weights start with 0.

    The code is uploaded in the instructable

    Hi! One button is pushed to start the race and the other to make a sensor calibration

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Hola, el código para tomar el tiempo usa una librería que se llama TimerOne. Si no esta instalada, no se va a tomar el tiempo cuando se calibra. Sin embargo creo que voy a subir una nueva versión del código que no use esa librería

    Hi, it heavily depends on the particular track. Also the grip of the wheels, the motors you chose and plenty other things matter aswell. I would say that for my case the robot can go faster than 1 m/s but definitely slower than 2 m/s

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Hola! La calibración que se hace con el botón 1 sirve para ajustar la sensibilidad de los sensores. Se ejecuta 4 veces para girar en el lugar algunas veces tomando mediciones con los sensores y asume que en ese barrido el valor más oscuro que se detectó es el más oscuro posible, y el valor más claro sensado es el más claro posible. Esto lo hace para ajustar la sensibilidad y adaptarse a cada pista, o a diferentes condiciones de luz. Si abrís una ventana quizá tengas que calibrar de nuevo porque todo se hace más brillante.Algo muy distinto es calibrar el PID. El PID se modifica para que el robot ande lo más rápido y fluido posible, sin oscilar o desviarse. Para modificar el PID hay que cambiar 4 variables...

    see more »

    Hola! La calibración que se hace con el botón 1 sirve para ajustar la sensibilidad de los sensores. Se ejecuta 4 veces para girar en el lugar algunas veces tomando mediciones con los sensores y asume que en ese barrido el valor más oscuro que se detectó es el más oscuro posible, y el valor más claro sensado es el más claro posible. Esto lo hace para ajustar la sensibilidad y adaptarse a cada pista, o a diferentes condiciones de luz. Si abrís una ventana quizá tengas que calibrar de nuevo porque todo se hace más brillante.Algo muy distinto es calibrar el PID. El PID se modifica para que el robot ande lo más rápido y fluido posible, sin oscilar o desviarse. Para modificar el PID hay que cambiar 4 variables y reprogramar el Arduino. Las variables son maxVel, KP, KD, KI. Yo recomiendo poner KI en 0 porque a mí nunca me sirvió mucho. Un consejo es empezar poniendo maxVel en un valor bajo para que vaya lento, y usar solo KP, poniendo KD en 0. Luego probar distintos valores de KP hasta que ande lo mejor posible. Recién ahí empezar a subir el KD y ajustar el KP para compensar, ir probando valores y ver que funciona. Después ir subiendo la velocidad, el KP y el KD proporcionalmente, y ajustar un poquito el KP y el KD para que ande bien a la nueva velocidad. Hacer esto varias veces subiendo la velocidad y probando valores. Yo lo veo como un prueba y error. A medida que vas probando empezás a entender qué se necesita, principalmente subir el KD o bajar el KP suele reducir las oscilaciones, y bajar el KD o subir el KP evita que se salga en las curvas, pero cada situación es distinta.Espero que te sirva

    View Instructable »
  • How to Make a PIC Programmer - PicKit 2 'clone'

    I am not sure what you could do, it could be that there is a short on the board like you said, causing the pin to be connected to some other voltage on the board. If you cant solve the problem perhaps you could ask on the Microchip forum

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Yes you can! Although you would need a 3 cell lipo battery to supply the 12v since a 2 cell isn't enough. Alternatively you can use a DC-DC step-up converter module. This module can output a higher voltage than the one at the input, but at a lower current. Also remember to get a small battery so that it is as light as possible. Hope this helps!

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Hola, perdón por la tardanza. El shield tiene un integrado, el 7805, que regula una tensión mayor a 7 v (aprox) a una constante de 5 v para alimentar el Arduino. En la cuarta foto de la sección del shield está el esquemático del circuito que regula la tensión. De esta forma conecto una batería de 7,4 v al shield y al mismo tiempo usa ese voltaje para los motores y usa 5v (obtenidos del 7805) para el Arduino. En la quinta foto de la parte del shield se muestra el circuito de la parte del controlador de motores. Los inputs del controlador están conectados a las patas 2, 3, 4 y 5 del Arduino. Las patas 3 y 5 controlan la velocidad con PWM y la 2 y 4 controlan la dirección. En el programa de Arduino adjunto hay una funció...

    see more »

    Hola, perdón por la tardanza. El shield tiene un integrado, el 7805, que regula una tensión mayor a 7 v (aprox) a una constante de 5 v para alimentar el Arduino. En la cuarta foto de la sección del shield está el esquemático del circuito que regula la tensión. De esta forma conecto una batería de 7,4 v al shield y al mismo tiempo usa ese voltaje para los motores y usa 5v (obtenidos del 7805) para el Arduino. En la quinta foto de la parte del shield se muestra el circuito de la parte del controlador de motores. Los inputs del controlador están conectados a las patas 2, 3, 4 y 5 del Arduino. Las patas 3 y 5 controlan la velocidad con PWM y la 2 y 4 controlan la dirección. En el programa de Arduino adjunto hay una función para controlar los motores si todo esta conectado como en el esquemático. Saludos

    Hi! If you go to the shield section you will find some images of the shematic circuit. there are 3 conectors from the shield to the Arduino, J1 goes to the digital pins, J2 to the power pins and J3 to the analog pins. In the schematic they are layed out in a similar way to what their actual positions are in the board to keep track of them. J1, J2 and J3 are pins soldered on the bottom of the board and connect on top of the Arduino. In this way, the circuit for the motor controller and the buttons are connected to power an to the digital pins, and the sensor connector is, through the board, connected to the analog pins.

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Hi! Maybe this is too much for a first project. I would suggest trying some simpler projects to get a little more experienced with coding and electronics. The first thing to try with Arduino could be blinking a LED: https://www.instructables.com/id/Basic-Arduino-Tut.... Then you could work your way up by doing other simple projects.To answer your questions, you can use this code for an Arduino UNO R3. You can use any sensor you want that outputs an analog signal corresponding to the brightness of the track. You would have to change the line that says:#define COLOR NEGROAnd mantain NEGRO or change it to BLANCO depending on the color of the track and the way your sensors output voltage.Hope it helps

    View Instructable »
  • How to Make a PIC Programmer - PicKit 2 'clone'

    Great! I'm glad it worked after all.

    View Instructable »
  • Simple Line Follower Robot With No Programming - Analog Line Follower

    Hi! If you are using 2 AA batteries then the voltage that can be applied to the motors will be at most 3v. If your motors have a higher rated voltage then it may not be enough to make them spin, thats the reason why I put low-voltage motors in the materials list. You may want to try connecting the motors to a 9v battery or any power source with a voltage higher than 3v to check if they work better that way and consider getting some motors for lower voltages, in my case I used modified servos that are rated at 5v, so 3v still makes them spin, but for example, some 12v motors may not spin at all.

    View Instructable »
  • How to Make a PIC Programmer - PicKit 2 'clone'

    I would think it is very likely that any generic transistor would work as long as it has reasonable electrical characteristics like max current or voltage drop. I am not 100% sure since I didn't design the circuit but you can try and tell us.

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Hi! I'm sorry if I didn't explain in detail some parts of the code.In order to code faster I defined 'digitalRead' as 'dR' with the #define command.BOT1 is defined to the arduino pin number connected to the 1st button (or "BOT" short for "botón" - button in spanish).So, dR(BOT1) returns the value of the BOT1 pin which will be 0 or 1 changing when the button is pressed. Since the buttons are 1 when released and 0 when pressed (because of the way it is wired), "dR(BOT1) == 0" is asking whether the button is pressed."calibrar" means to calibrate and it is a function I defined. You enter 2 speeds, one for each motor, and then the time. The function will set calVel (calibration velocity) to the left motor and negative calVel to the right motor, ...

    see more »

    Hi! I'm sorry if I didn't explain in detail some parts of the code.In order to code faster I defined 'digitalRead' as 'dR' with the #define command.BOT1 is defined to the arduino pin number connected to the 1st button (or "BOT" short for "botón" - button in spanish).So, dR(BOT1) returns the value of the BOT1 pin which will be 0 or 1 changing when the button is pressed. Since the buttons are 1 when released and 0 when pressed (because of the way it is wired), "dR(BOT1) == 0" is asking whether the button is pressed."calibrar" means to calibrate and it is a function I defined. You enter 2 speeds, one for each motor, and then the time. The function will set calVel (calibration velocity) to the left motor and negative calVel to the right motor, for 300 miliseconds. The robot will rotate in its place and for 300ms it will take many readings of the sensors to determine the maximum and minimum values it can possibly have. In this way if you use calibrar() a couple of times alternating the speeds the robot will rotate back and forth while calibrating the sensors with all the readings it is making.I hope this clears it up. If there is any other thing you would like to know please ask :)

    View Instructable »
  • Simple Line Follower Robot With No Programming - Analog Line Follower

    Hi, you need to have 2 CNY70's or reflectance IR sensors. The schematic for the CNY of the first picture needs to be made twice for the 2 sensors, so you will need 2 resistors for each sensor and they need to be connected like in the drawing. Each of the 2 circuits for a CNY has a place (A0 in the picture) which is the output of the sensor. You would need to connect the A0 from the picture of both sensors to the "CNY output" 1 and 2 from the second picture. Then the "Comparator output" goes to the "Comparated output" from the third picture. I hope that clears any confusion regarding the connections between the pictures. Remember to double check the circuit with the schematic and to turn the trimpot to the right sensitivity.

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Yes you can, the code works with any motors, just be aware that the robot will be a little bit slower

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Hi! If you don't have access to a 3d printer you will have to make the structure and the motor brackets in some other way. If you are using the Pololu motors as I am, you can buy brackets from them as well here: https://www.pololu.com/product/989 To make the structure you can use MDF, plastic, or even foamboard. You will need to cut it with a saw or a cutter and drill the holes. Even if you don't have a drill, you can stick the components with double sided tape since the robot is very lightweight. I attached 2 images with dimensions for a basic structure that will work with the Pololu motor brackets. If you want to use the 3d printed brackets you would need to change the distances of the holes. The structure I made is based on these dimensions but with some reduced areas and rounded edg...

    see more »

    Hi! If you don't have access to a 3d printer you will have to make the structure and the motor brackets in some other way. If you are using the Pololu motors as I am, you can buy brackets from them as well here: https://www.pololu.com/product/989 To make the structure you can use MDF, plastic, or even foamboard. You will need to cut it with a saw or a cutter and drill the holes. Even if you don't have a drill, you can stick the components with double sided tape since the robot is very lightweight. I attached 2 images with dimensions for a basic structure that will work with the Pololu motor brackets. If you want to use the 3d printed brackets you would need to change the distances of the holes. The structure I made is based on these dimensions but with some reduced areas and rounded edges. Good luck with the robot!

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Hi, J1, J2 & J3 are upside down pins to connect to the arduino as a shield. J, as in 'Jack', is the default designator for male connectors in many design softwares. You can learn about designators here: https://en.wikipedia.org/wiki/Reference_designator

    Apart from the tuning of the software, it generally depends on the traction of the wheels to keep up with the speed of the robot. It may happen that the robot goes so fast that the wheels start drifting.The slower the robot goes the sharper the turns it can make, and also, with higher traction the robot can go faster and also make sharper turns.In my case, with the robot from the pictures, at FULL speed (even higher than the video) it can make up to about 7cm-8cm (~3in) radius turns. However, I can make it go slower to achieve even sharper turns.

    The only library needed is the TimerOne library. You can download it here: https://code.google.com/archive/p/arduino-timerone...And if you want to learn about it you can go to: http://playground.arduino.cc/Code/Timer1Using this library makes it easy to implement timers in the code and avoid using delays which are generally not preferred.

    View Instructable »
  • Simple Line Follower Robot With No Programming - Analog Line Follower

    You can search on Instructables for a tutorial to modify a servo, here is one of them: https://www.instructables.com/id/How-to-Make-a-Tow...You can also use any kind of DC motor, just check that they work when connected to 2 AA bateries.

    View Instructable »
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Yes! In fact the code is already made for 5 sensors.If you need another number of sensors you can modify the number in the line that says:#define CANT_SENS 5Which is the amount of sensors or "Cantidad de Sensores"

    View Instructable »
    • Simple Line Follower Robot With No Programming - Analog Line Follower
      1,493 views
      18 favorites
      0 comments
  • Line Follower Robot With Arduino - Very Fast and Very Simple

    Yes, as long as it outputs an analog voltage

    View Instructable »
  • How to Make a PIC Programmer - PicKit 2 'clone'

    Hi, I have never tried it but I think it is possible. With a quick search I found this tutorial that might help you: https://sites.google.com/site/thehighspark/arduino...Maybe you can try it and tell us how it went

    View Instructable »
    • How to Make a PIC Programmer - PicKit 2 'clone'
      2,252 views
      67 favorites
      7 comments
  • How to Make a PIC Programmer - PicKit 2 'clone'

    Hi, this programmer can program your PIC, but you need to make the programmer with the 18f2550 since the code is made for this pic

    View Instructable »
  • Mod a USB to TTL Serial Adapter (CP2102) to program Arduino Pro Mini like the FTDI Board with Auto-reset

    Thanks for sharing! Quick and easy solution, works great!

    View Instructable »
    • Line Follower Robot with Arduino - Very Fast and Very Simple
      1,546 views
      44 favorites
      1 comments
  • Mati_DIY followed Mati_DIY1 year ago
      • Line Follower Robot with Arduino - Very Fast and Very Simple