Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4531

MicroPython • Help with IR, Pico and Motors

$
0
0
Good day Rpi'ers

I have a learning project consisting of

- 2 x 5V 130 Hobby Motors used as 'wheels'
- Tiny plastic backplane
- 2 x free moving wheels
- RP2040-Zero mini
https://www.aliexpress.us/item/3256805590970423.html
- Tiny breakout board
https://www.aliexpress.us/item/3256807269904265.html
- L9110 motor driver
- 3.7 V LiPO
- IR receiver
https://www.amazon.com/gp/product/B06XYNDRGF
- IR Wireless Remote Control Module Kit - DIY Kit HX1838 for Arduino Raspberry Pi

I am able to move the car forward and backward to my satisfaction w/o the IR components using the Lipo battery.
Life is really good!

The final goal is to have it remote controlled.


Now, I am developing the IR part and am powering the system by USB first.
I'm using https://github.com/peterhinch/micropython_ir/ which I've used before.
qq-min.png

I get IR data but once I trigger the function to move the wheels forward w/the IR right code:

- I get a heap of errors:

Invalid start pulse
Invalid start pulse
Invalid start pulse
Invalid start pulse
Invalid start pulse
Invalid start pulse
Invalid start pulse
Invalid start pulse
Invalid start pulse
Error: bad block

- The IR receiver becomes unresponsive after 15-20 seconds

The motor starts just fine but again the whole system becomes unresponsive

I thought maybe the motors are disrupting the IR receiver, so I tried:

- An external power separate and apart from USB
- Rebuilding just w/the RP2040-Zero mini, breakout / IR receiver on a separate bread board and trying to get IR data.
(It works just fine)
- Moving the IR receiver away from the motors
qq-min (1).png
I did a similar thing with a LARGER set of picos/motors - the same basic code in this repo I am using here in my project:
https://github.com/jouellnyc/Porsche_L9110.

Does the issue seem maybe more electronics related or (likely) something I am doing? It seems like I am fairly close even if it's not the best way to build a tiny car....I am no expert here.

Again it's a learning / fun project. I am not looking to win any races... :D

Any help appreciated

Statistics: Posted by raspmod — Fri Nov 22, 2024 11:28 pm — Replies 3 — Views 69



Viewing all articles
Browse latest Browse all 4531

Trending Articles