Line follower array V1 mblock5 Ultimate kit 2.0


#1

Hey I want to use the line follower array extension published in the extension center in mblock5.

I use the ultimate kit 2.0 and I just want to use Blocks no aduino code etc. The Sensor i want to use is “Me line follower Array V1”

The uploaded extension does not work or i dont get how it works.

Can someone pls. share an example?

Thank you in advance!


#2

I use that sensor on this robot https://www.youtube.com/watch?v=00Utw_X8DM4

I created my own block and in the descriptiotn of the video is a link to where you can download the block but with a Mbot Ranger that has an Arugia board, the ultimate kit 2.0 uses a megaPi boards so the block will need changing to suit megaPi which will need some understanding of ardunio.


Line follower array extension
#3

Thank you! I will try my best. Maybe i will need a little help to understand the programm.


#4

@OutoftheBOTS
I am working on your code right now and i am struggeling with following part:


I dont get how to set the pins right. I got two drivers for the encoder motors and i need to rotate them in different directions.
here is a pictur of my driver. Could you pls. give me your opinion on this?


#5

First of all just try making the line follower array weighted work and don’t worry about my motor blocks.

What you will need to change is the pin definitions. Atm the drop down menu will select the pin number according to the pin on that port. You will need to change those pins to suit the megaPi pinout

This is the pinout for the Augria

You will need to change it to suit the megaPi


#6

I did that and set the megapipro as supported divice.


and i receive the values from the sensor! Thank you…
According to the motors I am not sure how to set the pins within the programm. Is there a possibility to change the code for megapi?


#7

There should be some standard motor control blocks for megaPi. I created my own because they are very simple and light so run faster than the more heavy ones that can standard with Ranger.

You will need to change the pin definitions here to suit megaPi

The Aurgia uses a TB6612 H-bridge and I have used this h-bridge before and the datasheet for it is avialable so it was easy for me to write my own code for it see the schematic for Aurgia

I see more recently Makeblock have changed the H-bridge they use to a new chip and I haven’t been able to find specs about or a datasheet on how it works.

see the 2 different megaPi encoder drivers the first pic is a TB6612 but the second is a MP8049S and I can’t seem to find a proper datasheet for it.
Capture4

Edit I just found the data sheet for it https://www.monolithicpower.com/en/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MP8049S/document_id/1939/


#8

Wow thanks for your great support ! I appreciate it.
For now I will work with the standard blocks for motor power. My focus is not on speed right now.

I am working with the extension and I have a problem. As long as the robot is connected to the computer and the MegaPI is off, I get the array values constantly in. When I turn it on, the array value switches between 0 and the value to be displayed depending on how the robot is on the line. Can this be related to the execution speed of the code ?

Edit:
I have found the error, but I am not yet sure about the solution. As soon as the motors are running, the value is not constant. with the motors switched off, the value is constant. can this be related to the voltage ?


#9

Yes motors cause a lot of electrical noise.

Are you running the sensor on the 5v rail of the V-M rail??

There is readable schematics available for Auriga but it isn’t easy to read the schematics on this page for megaPi https://www.makeblock.com/project/megapi.

The Auriga schematics show several volts rails on the board: VBUS (voltgae from USB), VBAT (voltage from battery), 5v (a regulated voltage from either VBAT or VBUS), 3.3v (regulated from 5v) and V-M (basically just supplied from VBAT unregulated).

5v supplies most of the circuits on the board and ports for sensors
3.3v supplies the gyro only
V-M supplies motor ports at the voltage of VBAT.

There is a lot of capacitors of the 5v rail to try to smooth the electrical noise out as the chips/ICs don’t like a noise supply.

I don’t plug sensors in to the V-M rail and I don’t plug noisy motors into the 5v rail (this includes servos).

Edit I zoomed in close to the megaPi schematic and the labeled unknown on my on top rail is 5v


#10

A little more info here.

When I design my other robotics projects outside makeblock platform I usually just use 2 different batteries to solve this problem. I use 1 battery to run all the electronics and a separate battery to run the motors so that electrical noise from motors won’t be able to interfere with electronics.

This higher powered motor driver has a plug for a second battery to be plugged into it to power the motors seperatly. see http://docs.makeblock.com/diy-platform/en/electronic-modules/motor-drivers/me-hp-encoder-dc-motor-driver.html


#11

I use the standard motorblocks from Makeblock, so i can’t change much on the pins that are used. I’ve tried new batteries, didn’t get much use out of them…
How is it possible that the sensor values break down even at small loads in the circuit. I tried it with only one motor on 50% power and still the LF array sensor changes from 0 to value and back again. If I don’t take off any power the sensor value remains stable.

Is it possible to change something in the code to make the sensor run more stable?


#12

Thanks to Shane Gingell. You’re doing a great job. With the MegapiPro the linefollowing sensor can’t be read properly. Once the motors are running, I get problems not only with the linefollowing sensor but also with the ultrasonic sensor. The circuit board detects the sensor values too slowly. I think this is also the reason why there are no example videos of the Ultimate kit showing a more complex procedure.


#13

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.