Zoomx's postbag

Tell us about the cool things you've recently got
User avatar
zoomx
Posts: 526
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Zoomx's postbag

Post by zoomx » Sat Jun 17, 2017 12:05 pm

You can focus the lens!

User avatar
RogerClark
Posts: 7179
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Zoomx's postbag

Post by RogerClark » Sat Jun 17, 2017 12:42 pm

zoomx wrote:You can focus the lens!
I wonder if it would focus to a few cm for a car or robot

User avatar
zoomx
Posts: 526
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Zoomx's postbag

Post by zoomx » Sat Jun 17, 2017 5:00 pm

It is possible to focus to few cm and less.

User avatar
RogerClark
Posts: 7179
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Zoomx's postbag

Post by RogerClark » Sat Jun 17, 2017 9:06 pm

zoomx wrote:It is possible to focus to few cm and less.
Excellent.

User avatar
RogerClark
Posts: 7179
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Zoomx's postbag

Post by RogerClark » Mon Oct 30, 2017 10:23 am

@zoomx

I decided to buy 2 of those small robots as well.

Did you managed to do much with the ones you bought ?

User avatar
zoomx
Posts: 526
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Zoomx's postbag

Post by zoomx » Tue Oct 31, 2017 9:28 am

I tested an ESP8266 but it seems that the two batteries are unable to power it. I tried a DC/DC too but with no luck.

I have to test the LDR reading and the ADNS3080.

This little sketch drive the robot in a 8 shape track, just to test PWM.
Unfortunately it seems that you can't drive the motor in reverse, you can go forward only. But I believe that you can't get a car toy cheaper than this one.

Code: Select all

/*
  STM32_robot02
  Test sketch for cheap robot kits like D2-1 and D2-5
  Added pwm
  https://developer.mbed.org/media/uploads/hudakz/maplemini_pinout01.png
  http://wiki.stm32duino.com/images/a/ae/Bluepillpinout.gif
*/

#define motor1 PA8  // D7 or 27 on Maple Mini
#define motor2 PA9  // D8 or 26 on Maple Mini
/*
   motor1  | U   |
           |     | motor2
           |     |
     GND   |     |
*/

void setup() {
  Serial.begin(115200);
  Serial1.begin(115200);
  Serial2.begin(115200);
  Serial.println("Hello world this is Serial");
  Serial1.println("Hello world this is Serial1");
  Serial2.println("Hello world this is Serial2");
  pinMode(motor1, OUTPUT);
  pinMode(motor2, OUTPUT);
}

void loop() {
  for (int i = 0; i <= 65472; i += 1023) {
    pwmWrite(motor1, i);
    pwmWrite(motor2, 65472 - i);
    Serial.println(i);
    Serial1.println(i);
    Serial2.println(i);
    delay(250);
  }
  delay(10);
  for (int i = 0; i <= 65472; i += 1023) {
    pwmWrite(motor2, i);
    pwmWrite(motor1, 65472 - i);
    Serial.println(i);
    Serial1.println(i);
    Serial2.println(i);
    delay(100);
  }
  delay(10);
}

User avatar
RogerClark
Posts: 7179
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Zoomx's postbag

Post by RogerClark » Tue Oct 31, 2017 9:39 am

OK.

I paid $5 AUD, which I think is about 3.3 Euros

I guess I should also buy a cheap H bridge e.g.

https://www.ebay.com.au/itm/L9110S-H-br ... 1736182097

User avatar
zoomx
Posts: 526
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Zoomx's postbag

Post by zoomx » Tue Oct 31, 2017 1:20 pm

L9110S is rated for small motors like the ones that are in this cheap car. I have one of this, it's a good idea for a stronger modded version.
Thanks, I forgot to have one!

User avatar
RogerClark
Posts: 7179
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Zoomx's postbag

Post by RogerClark » Tue Oct 31, 2017 8:02 pm

Yes.

I know that those H bridge modules can only drive the small motors.

I have a larger H bridge on another car, but it would be too big and heavy for these little cars.

It would probably be good if I could replace the PCB on these little cars with a custom pcb with headers for a Blue Pill, but I will need to wait until the arrive, so I can take accurate measurements of the existing PCB

Post Reply