Close

Light Block to Arduino / Encoder

A project log for Web Smart (Phone) Screen Blink Bot

Secure web page on smartphone safely drives cheap bot with flashes of light using internal sensors and web services.

james-newtonJames Newton 04/20/2024 at 17:530 Comments

I guess I forgot to share this, but... there is no reason why the light blocks can run into a standard Arduino or whatever. In fact, it reduces the parts count way way down because you can use the internal pullup resistor on an Analog input pin if you choose the right value for the light sensitive resistor. 

Here is the basic idea:

https://www.tinkercad.com/things/hOrpbRnAEXa-light-controlled-pwm-motor

Note that it would be very easy to swap in an RC servo, continuous rotation or otherwise, or even a BLDC with an ESC or whatever you like. All controlled safely and securely from your smartphone.

In general, the advantage is you can get the uC to do the low level high speed timing dependant stuff. Here is a simulation of an encoder with a DC motor. It doesn't have the light based input, but it could easily be added.

https://www.tinkercad.com/things/6cn8U75jjCL-servo-from-motor-and-encoder

And in general, here are all the Tinkercad circuits for this project:
https://www.tinkercad.com/users/gU8oUadQpIk?type=circuits

From the simplest, light based circuit with a coin cell, transistor, resistor and small gearmotor, all the way up to the Arduino and Servo. 

Surely this is enough for someone to actually build a robot and try it out? No? I'm really going to have to just do it myself? :sigh: ok... 

Discussions