@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
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
ifr_mot_pos=1thensetportd.4on:setportd.5on:setportd.6off:setportd.7offelseifr_mot_pos=2thensetportd.4off:setportd.5on:setportd.6on:setportd.7offelseifr_mot_pos=3thensetportd.4off:setportd.5off:setportd.6on:setportd.7onelsesetportd.4on:setportd.5off:setportd.6off:setportd.7onendif; 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
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@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
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.
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
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?
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?
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.
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.
Would you point me to the correct module?
Is it this here?
https://www.banggood.com/de/GY-VL53L0XV2-TOF-Time-Of-Flight-Distance-Sensor-940nm-Laser-Ranging-Sensor-Module-Breakout-Board-p-1255188.html
That looks like the ones I use. Same writing, etc.
Or https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313.TR2.TRC1.A0.H0.TRS0&_nkw=VL53L0X&_sacat=0
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
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
I did a raw Writing, http://gcbasic.sourceforge.net/Typesetter/index.php/Building-a-Robot-using-a-VL53L0X-laser-range-finder
It needs a bit brush up and maybe some more explanation.
I the next hours I will clean it up and enhance
The Robot hardware looks interesting, where it comes from?
Last edit: bed 2020-06-27
I think that is sehr gut. It works well. Hope it is useful to other people.
Building an obstacle avoiding robot is popular with hobbyists,
there are lots of devices on the internet for sensing distance.
I have tried ultrasonic sensors and they work well, also Sharp https://uk.farnell.com/sharp/gp2y0a21yk0f/sensor-distance-analogue/dp/1243869?mckv=_dc|pcrid|78108398709|&gross_price=true&CATCI=pla-63760520928&CAAGID=20220709869&CMP=KNC-GUK-GEN-SHOPPING-SHARP&CAGPSPN=pla&gclid=Cj0KCQiAwp_UBRD7ARIsAMie3XaimhlDPLsU_qvFmkUAGtk87ItLLAMOW1UcPilwmQRXrw5XMjABPiUaAu19EALw_wcB&CAWELAID=120173390000034163
also
https://www.ebay.co.uk/itm/5X-IR-Infrared-Obstacle-Avoidance-Sensor-Module-Adjustable-Distance-for-Arduino/192421238897?hash=item2ccd331871:g:1sMAAOSwI~taUyOc
but for obstacle detection the V53L0X works best.
Robot hardware- motors https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313.TR5.TRC2.A0.H0.TRS0&_nkw=28byj-48&_sacat=0
sg90 servo- https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2334524.m570.l1311.R3.TR11.TRC1.A0.H1.Xsg90.TRS0&_nkw=sg90+servo&_sacat=0&LH_TitleDesc=0&_osacat=0&_odkw=28byj-48
I have two 3.6V li-ion batteries in series to give 7.2V to drive the robot.
a lead and plug is connected to the batteries unswitched. This connects to the uno DC in and so uses the onboard 5V reg. The uno only powers the V53L0X.
The batteries go through a switch to a variable constant current/voltage supply https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2334524.m570.l1311.R5.TR12.TRC2.A0.H2.Xbuck+co.TRS0&_nkw=step+down+buck+converter&_sacat=0
the 5V output drives the motor boards and the servo as they take 250mA
the power lead that plugs into the uno can be used to recharge the batteries..cool.
oh, and the uno- https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2334524.m570.l1313.TR2.TRC1.A0.H0.Xgeekcreit.TRS0&_nkw=geekcreit&_sacat=0&LH_TitleDesc=0&_osacat=0&_odkw=step+down+buck+converter
the wiring is simple but looks a lot. Drilling holes for the motors was not fun.
And underneath is a ballbearing castor.
Bed. where you thinking of building a robot?
Last edit: stan cartwright 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
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.
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 :-)
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.
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 ;-)
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.