Menu

photo for Bed and the gcb website

2020-06-23
2020-06-27
  • stan cartwright

    stan cartwright - 2020-06-23

    @Bed. Hope you are ok. Another picture for the gcb home page.
    a "robot" that uses a V53L0X laser range finder and cheap geared stepper motors.
    it works great.
    it took a while to get the V53L0X to work with gcb but it is sorted and works well.
    A video of the robot and it going through gaps and dead ends. https://www.youtube.com/watch?v=YO7ghMglLkA

     

    Last edit: stan cartwright 2020-06-24
  • bed

    bed - 2020-06-25

    Hello Stan, the video is very convincing!
    Unfortunately the two photos are not ideal.
    Can you try to position your robot a bit better, best against an even, white background. At the moment the background distracts me too much.

     
    • stan cartwright

      stan cartwright - 2020-06-26

      ok.some more..in the bath...it's white.
      the v53l0x is good for robot obstacle avoidance.
      check this..it sees a pen ok. https://www.youtube.com/watch?v=s5-5DNa36jk
      best obstacle avoiding robot I made.
      I could turn interupts off and on and use number of steps to control motors
      ie turn 90degrees or left 180 degrees. so versatile project.

       

      Last edit: stan cartwright 2020-06-26
  • bed

    bed - 2020-06-26

    Much better.
    Let me see how I can integrate it in the Homepage.
    I might be a good Idea if you do a small success story... Stan, would you please?

     
  • stan cartwright

    stan cartwright - 2020-06-26

    For sure Bed,no prob. hope it is useful.

    This project is 4 unfinished ideas
    1 getting 28byj-48 stepper motors to work at peak power...the answer was an every 2ms interrupt.
    2 sorting the interrupt...I sorted an every 2ms interrupt to drive the motors forward.backwards,or off
    3 getting the V53L0x i2c laser rangefinder to work. started by posting to picace forum then gcb forum. it is working now but inline code subs not an include file.
    4 sorting the avoidance algorithm.
    Since the distance sensor is mounted on a servo and the servo needs a pulse every 20ms max
    I used the same every 2ms interrupt to run an every 20ms event.
    Also adding a variable for last turn, Added if obstacle left then servodir=left and same for obstacle right ie servodir=right.solved problems with robot "oscillating"left/right.added reverse when obtacle forward.
    The V53L0x rangefinder is ideal for an obstacle avoiding robot. It is accurate..ish for short distances. It has a narrow infrared laser beam to sense an obstacle and the response
    is stable...ish for different colours.

    so I've learnt how to set up an interrupt to run 2 stepper motors and a servo and get a V53L0x to work in an "application"

    need the latest code Bed?

     
  • bed

    bed - 2020-06-26

    Ok, thank you. This is a base, I will place an arcticle for our Homepage. Hopefully this weekend.
    Code would be nice, maybe others could learn from it.

     
    • stan cartwright

      stan cartwright - 2020-06-26

      The idea that others can use others code was the point.
      this is a humble project...but my grandson has played with it and thought it interesting.
      latest code is commented and hope it is useful...like defining vars instead of dim..
      I just tried changing case select to if then. no differece but told select case uses memory.
      I would have used goto after the first two if thens to not test the rest but goto is frowned upon.

        if r_mot_pos=1 then
          set portd.4 on:set portd.5 on:set portd.6 off:set portd.7 off
        else if r_mot_pos=2 then
          set portd.4 off:set portd.5 on:set portd.6 on:set portd.7 off
        else if r_mot_pos=3  then
          set portd.4 off:set portd.5 off:set portd.6 on:set portd.7 on
        else
          set portd.4 on:set portd.5 off:set portd.6 off:set portd.7 on
        end if
      ; select case r_mot_pos ;this sets 4 bits of portd to control right motor
      ;  case 4
      ;    set portd.4 on:set portd.5 off:set portd.6 off:set portd.7 on
      ;  case 3
      ;    set portd.4 off:set portd.5 off:set portd.6 on:set portd.7 on
      ;  case 2
      ;    set portd.4 off:set portd.5 on:set portd.6 on:set portd.7 off
      ;  case 1
      ;    set portd.4 on:set portd.5 on:set portd.6 off:set portd.7 off
      ; end select
      
       
  • bed

    bed - 2020-06-27

    I ask because you embezzled an "L" there :-)

    I will take the liberty of making a few sentences as introduction.
    When I am ready, I'll write here :-)

    Please make an Photo from the Sensor module alone, if possible. Cutting it out of your Pics is not very nice. I don't like to use an image from a commercial platform

    Oh, and what for a PCB did you use for it? Geekcraft.... what is it?

     

    Last edit: bed 2020-06-27
  • stan cartwright

    stan cartwright - 2020-06-27

    Geekcraft is just another arduino uno clone for £5. It has pins for spi, i2c, serial and grounds and 5V and 3.3V.
    A digital camera can "see" the laser.
    Some info from one seller. L33T.uk/VL53L0X

     

    Last edit: stan cartwright 2020-06-27
  • bed

    bed - 2020-06-27

    I am thinking about hundrets of projects. That is my carma, I need more time :-)
    But yes, this is a huge fun playground, why not? ;-)
    showcase is online now

     

    Last edit: bed 2020-06-27
    • stan cartwright

      stan cartwright - 2020-06-27

      I do not finish projects usually but I had time recently, ha ha. not!
      Finding worthwhile progects for gcb? flashing leds is boring but applying it to something else is the challenge.
      good luck with your projects and stay well.

       
      • bed

        bed - 2020-06-27

        Thanks for your commitment. Now we finally have a new entry in the Schowcase section. Now I have to finish my current project again, there is not much missing, it is just too summery for me :-)

         
  • stan cartwright

    stan cartwright - 2020-06-27

    I do not do 28 degrees C . Only on a bicycle and mines got a 250W brushless motor...
    nice breeze.
    I am paranoid about UV levels. here it is sort of "stay in-stay safe"...get things done..I know when to go out, when to stay in. hmmm... opening lyrics https://www.youtube.com/watch?v=ZfvvPwP4brQ
    peace.

     
    • bed

      bed - 2020-06-27

      I'm not always in the sun, on the contrary. But the desire to do programming or tinkering around in the house is not so great with the heat ;-)

       
  • stan cartwright

    stan cartwright - 2020-06-27

    But it's a dry heat......that comes from a film.
    anyway it is 10+ degrees cooler today and misty rain. relief, get to sleep now because it is not hot.
    coding after midnight is not good.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.