Monthly Archives: June 2016

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.


  • 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
  9. test solderinng and apply between 5V an 12V connected to the motor driver board
  10. have fun 🙂

Wiring concept

VW T4 Project – secondary battery

To supplement my electronic needs like running my laptop during my journeys I recently added an secondary battery to my VW T4 Project. There a several ways to connect the second battery like wiring it in parallel to the main battery, charging it separately by socket, using an solar panel with charging controller or the way I decided to do: using an uncouple relay to load the battery  only while the generator of the motor is running. To realize this, a decouple relay and a trigger signal is required. Also some fuses and really big diameter cables are needed to prevent voltage losses and avoid overheating while transporting drect current two or three meters through the car.


decoupling relay scheme


The main wiring is hidden beneath the drivers seat, here you can see the relay and one of the 40Amps fuses.


VW T4 Project – secondary battery – uncouple relay beneath the driver seat

The battery itself is located in a wooden construction directly under the drivers seat. It is an absorbent glass mat model, which is capable of being loaded 5 times faster than regular car batteries without loosing current level over time. Furthermore it is well suitable for a solar setup. Deep discharging (or lets say below half capacity measurable at 12.5V) without ruining the battery is possible but significantly shortens it’s lifetime. One more thing to mention is the different voltage level of the battery, fully charged it completes at 14.4-14.8 Volts, a voltage the main generator is not capable of delivering, and also stresses the main battery which is not of the same type.


VW T4 Project – secondary battery – absorbent glass mat 80Ah

To trigger the relay to wire the two batteries in parallel only when the main generator provides at least 13.9 Volts (or up to 14.3V depending on headlight or fan status) I searched for a suitable D+ wire in the central electric. D+ is a signal provided by the generator, which provides 0V while the ignition is off. If the key gets inserted and turned until all lamps turn on, but the motor isn’t started yet it should provide about and below 10Vs.  Only if the charging regulator of the car has been triggered which usually happens when the number of revolutions hits above 2000 it should provide the Voltage of the generator. Took me several hours to find the right cable, because for some reason all light blue cables (which should have this properties according to my sources) didn’t behave as expected. Finally I found a dark blue and black striped not used cable of the relay board as you can see in the pictures below:

Controlled Discharging

At this point the secondary battery gets charged while driving, but there was no way to plug any 12-14V devices to a car lighter jack. Therefore I built one:

Avoiding deep discharge I planned to use a battery guard device which turns of discharging when a certain amount of voltage gets undershot for a certain amount of time. Unfortunately my absorbent glass mat battery is incompatible to most of these devices as its half capacity voltage is much higher than that of usual car batteries. I found a programmable device that sadly arrived broken and therefore couldn’t be added to the current setup. To oversee the voltage and discharging current at least somehow, I’ve added an digital volt and ampere meter and wired it including an switch to turn it off at night:

VW T4 Project – secondary battery - back wiring

VW T4 Project – secondary battery – back wiring

As you can see it uses a shunt to – lets say guess – the current drain. Furthermore I’ve added an 20A fuse. I used a piece of electric cooker wire and fused two pairs of wiring harness together to increase wiring diameter and prevent voltage drop. The third harness is left unused.

For now this setup allows to use my laptop which drains about 10 Watts on power-safe mode for 10 hours per 100 kilometers driven distance. This of course gets limited by the size of the generator, driving style and battery capacity.

Anyways, this setup somewhen will be supplied by a solar panel to charge the battery to full capacity in summer by the sun, and charge it at least a bit by the generator in winter. Keep in mind that solar power and decoupling relay in combination with an absorbent glass mat battery could not be used in parrallel due to the different voltages of main generator and full capacity agm battery.

Raspberry Pi 3 Model B+ 4 USB Ports

Connecting a Raspberry Pi 3 to Wifi and add defaults

  1. Connect the Raspberry to an existing local area network by cable.
    –  I used the Ubuntu “Shared to other computers”-Network manager Setting to bridge my eth0 to my wlan0 connection providing internet access.
  2. Connect via ssh to this device
    username: pi
    password: raspberry
    – usually you don’t now the ip of the device use nmap -p 22  to search for open ssh devices
  3. Scan for local wifi networks: sudo iwlist wlan0 scan 
  4. sudo nano /etc/wpa_supplicant/wpa_supplicant.conf  and add your wifi connection data:

  5. restart the wifi and bring it to connection sudo ifdown wlan0 && sudo ifup wlan0
  6. Get the latest software status lists: sudo apt-get update
  7. Update all installed software: sudo apt-get upgrade -y
  8. Install common software to harden the system:
    sudo apt-get install x11vnc htop bmon fail2ban vnstat ufw
    x11vnc: nice tool to use VNC connections on the main x session
    htop: visualizes processes and load in color
    bmon: visualizes network traffic
    fail2ban: handles bruteforce attacks by banning Ips for a certain amount of time
    vnstat: counts network traffic over time
    ufw: makes it easier to handle ipables and configure your firewall
  9. Start the Raspberry Pi 3 Configuration Programm: raspi-config
    – expand file system to match your sd card size
    – set hostname in advanced settings
  10. enjoy your new Raspberry Pi 3 \o/

Presentation BHT 2016

I will hold a small presentation about Low-Cost in a Robotic-Context at the BHT 2016. It will start at 17.00 at the Helmut-Härtig-Building of the Technische Universität Bergakademie in Freiberg.



in german, due to copyright, I removed some of the pictures:

VW T4 Project – War against Rust – Battle V – Sill Part Two - welded sill

VW T4 Project – War against Rust – Battle V – Sill Part Two

As I learned recently stick electrodes are not suitable for welding thin sheet metal of a cars body shell. The electrodes tend to burn holes instead of welding anything together. Unfortunately, all other welding techniques like MAG,MIG, WIG (TIG) welding, require expensive hardware and some degree of education.  After some research I found a rent-able workshop including hydraulic lifts, all kinds of tools and MAG-Welding equipment for 8€ an hour. After some practice welding on small pieces of steel, I felt confident enough to start handling the spots i prepared as described in part one:

To improve the durability of the inner surfaces I used a new rust converter called fertan. As research has shown it is used by a lot of  car restaurateur workshops and is quite effective protecting the metal from new rust by creating an  protective coat. After 24 hours of letting it dry I additionally added another new  rust preventing oil: Owatrol. It’s a synthetic resin based oil able to prevent rust to grow by cutting it off from water and air. By that, the spot should hold 2-3 years without replacing the complete sill.