Category Archives: Robotics

How to set up Arduino IDE for esp8266 programming

The Arduino (or in some cases also Genuino) is a physical hard and software development plattform. During the recent years its developing environment grow to a useful and library rich developing platform. Because of that the esp8266 team created an conversion tool to its internal programming language lua.

Setting up the Arduino IDE for esp8266 programming is really easy. Just follow this small guide.

Step 1: Download the arduino IDE software

Go to the most recent version download page of the Arduino IDE. Please keep in mind that you’ll need at least version 1.6.x. In some cases it is not available at the packet repositories of your beloved Debian Distribution.

screenshot-from-2016-12-28-15-22-44Click on Windows, Linux or Mac Version of your choice. We are going to use the Linux 64bit for further pictures.

screenshot-from-2016-12-28-15-24-53Extract the provided tar.gz. For windows or Mac please use a extraction software like 7zip, Winrar etc accordingly.

screenshot-from-2016-12-28-15-28-32Please make sure the arduino.sh file in your directory is excecutable.

screenshot-from-2016-12-28-15-28-49

screenshot-from-2016-12-28-15-29-01You also can use the terminal command:

After that double click the application…

screenshot-from-2016-12-28-15-33-03or use the terminal to start the IDE. This is also very useful to see possible errors after they occure while flashing the esp8266 from time to time.

 

screenshot-from-2016-12-28-15-33-21

Et voila, your IDE should look somehow like this:

screenshot-from-2016-12-28-15-34-45

Step 2: Setting up the IDE to work with ESP8266 by board manager.

We need to add an additional url to the boards manager sources list. For that open File > Preferences

screenshot-from-2016-12-28-15-37-55

And add http://arduino.esp8266.com/stable/package_esp8266com_index.json  to the Additional Boards Manager URLs.

screenshot-from-2016-12-28-15-38-25After that open Tools > Boards > Boards Manager and search for esp8266.

screenshot-from-2016-12-28-15-39-28

install the latest version:

screenshot-from-2016-12-28-15-40-02

After that you should be able to select the Generic ESP Module board in Tools > Board

screenshot-from-2016-12-28-15-41-22

screenshot-from-2016-12-28-15-42-15Congratulations! You are now able to compile esp8266 code from the arduino IDE.

Step 3: Use the Examples to learn to code

This step is easy. Open File > Examples > ESP8266Wifi > WifiWebServer as a good starting point.

screenshot-from-2016-12-28-18-12-55

In the next post we will have a look at how to wire the ESP8266 up for an easy flashing.

Building a wifi LiquidCrystal-Display esp8266 for less than 10 EUR

As planned, I now built and esp8266 version of the display. Because the breadboard version was working quite well from the start, I decided to build a more permanent version.  The 5V of the USB Cable (or any other 5V Source) gets stepped down by a LM2596 circuit in a Fp6190 I purchased some time ago. This is a quite cheap and energy efficient solution. The complete setup requires about 70mA at 5Vs. This surely can be optimized by dimming the brightness of the display. In case you want to build your own wifi LiquidCrystal-Display esp8266 use the details provided below and check the code on Github. Happy hacking!

Parts List

  • 2,00€ ESP8266 12-Q
  • 2,00€ Fp6190 5V to 3.3V step down converter
  • 1,50€ LiquidCrystal-Display Blue
  • 1.6kOhm resistor or 10k potentiometer
  • prototyping board
  • cables
  • pins

 

Wiring

Code

This time on GitHub.

 

3 axis 28BYJ-48 ROS controllable flash light

I have found a bit older project of mine while browsing through my photos.. on a relatively unclean desk you can see a combination of two 28BYJ-48 motors, some screws, metal parts and a flashlight. Last of them could be replaced for example by a laserpointer, simple sensor or a distance measurement device.

Originally this was created to be placed on my amosero robot as a very simple form of an robot arm. Sadly work forced me to not follow that project side track any further which is why I can’t share more than these pictures: IMG_0068 Maybe some when if time allows, I will recreate this and make it more accessible.

Octoprint - M33-Fio - Raspberry Pi - select positions on the print bed

Running M3D Micro under Raspbian with Octoprint and MD3Fio plugin

The M3D Software is windows only, which causes a lot of wasted power by running a windows machine all time. After several and some successful attempts of running this software on a virtual machine inside my Linux, I figured out a much more easy way to print from a Raspberry Pi. It’s called Octoprint, but on an armhf basis requires a bit attention. In combination with the M33-Fio Plugin its serving perfectly as a printing server for the M3D-Micro I own.

Setting up your Raspberry Pi 3

To save me and you some time in future, I share the step by step code to set up an Raspberry Pi 3 with Octoprint from scratch. (even if there is an image down-loadable from Octroprint Website)

Start using Octoprint in browser

Start your browser at 127.0.0.1:5000 (or the ip of your rasbperry) and config Octoprint further:

Happy printing! With this combination of 3-5 Watt Raspberry Pi, and a maximum 20W M3D you can run the printer 24/7 without wasting more than a light bulb amount of power 🙂

Links:

28BYI-48 stepper motor with Wifi - final setup

Controlling a 28BYI-48 stepper motor with Wifi for less than 10$ USD by using an esp2866 12-q

For low cost robots, remote controlled laser pointers, cat or fish feeding machines I found a really cheap way to move things by programmable wifi. The already handy usable 28BYJ-48 coming small motor driver i board is  available in china for about 2$. It additionally needs to be driven by a fast micro controller like the Arduino or the much more capable Raspberry Pi.  As I was experimenting with the esp2866 12-Q recently, the combination of this two useful things seemed more than obvious.  Therefore I decided to give it a try.

Unfortunately the stepper motor and its driver chip the ULN2003a need at least 5Vs to run, a voltage the esp2866 would by killed by as its maximum rating is about 3.6. in conclusion two power circuits or two power sources would be required. I tried to keep things simple by using an 5V-12V power source and step down converting it to 3.3V with an lm2655 based step down circuit. This setup allows an efficiency about 95% and avoids producing high amounts of heat as linear step down converters would have done. Overall the motor and the controllers consume 0.35 Amps at 5V therefore about 1.75 Watts.

Parts

  • 2$ 28BYJ-48 with ULN2003a motor driver
  • 2$ esp8266
  • 2$ step-down-converter
  • > 0,5$ breadboard 2.5 mm adapter for the esp8266
  • > 0,.5$  for15 cm of additional cables low diameter
  • soldering equipment and an 3.3V FTDI Adapter for flashing the esp2866

Steps to build your own:

  1. solder the esp2866 on the adapter board
  2. reverse the in1 in2 in3 in4 pins to the other side of the motor driver ULN2003a  board
  3. put the breadboard adapter on this pins starting with vcc followed by in1 to in4
  4. connect the v_out of the step down circuit with vcc of the breadboard adapter
  5. connect v_in of the step down circuit to the vcc of the motor driver board
  6. connect all GNDs together
  7. add pins on the breadboard adapter for flasingh the esp2866, GND, VCC, TX and RX
  8. flash the esp2866 with
    https://github.com/PaulPetring/esp2866-28BYJ-48-motor-control/blob/master/simple.ino
  9. test solderinng and apply between 5V an 12V connected to the motor driver board
  10. have fun 🙂

Wiring concept