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

Video on Youtube


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.

First welding experiences!

I could manage to buy a cheap welding helmet with automated darkening feature! I already owned a cheap welding electrodes setup an therefore was allowed to take some training welding today:


First welding experiences – top


First welding experiences – bottom


First welding experiences – top 3

This small welding worms are really not worth mentioning in a welding context, but for me, this is a real achievment of working with metal. With that ability I’ll soon be able to fix the sill issue on the front left door πŸ™‚

VW T4 Project – Interior construction – Realization

The step after planning is realization, so I went to the local home improvement store and bought some sawing rough woodΒ  at 3,69 € per meter. I additionally required several M10 screws at 90mm length for assembling the wood construction directly to the ground floor of the VW T4.

Thanks to my going-to-be-brother-in-law for all the help during the wood construction progress! I am totally surprised by the high level of functionality and very low cost for the interior simplyΒ  by combining the given circumstances.

I have already spent two nights inside and do not miss any functionality of theΒ  bed and couch at all, it’s way better than I could imagine πŸ™‚

VW T4 Project – Interior construction – Planning Stage

Usually it is really helpful to take a decent time to plan the interior design, but due to my available going-to-be-brother-in-law
for one day, I had to do this at night during my well deserved sleeping time. Taking the measures from the carpet I came to this Sketchup model:



VW T4 Project – Interior construction – beddinge as a couch, having 5 cm left as a 1,95 cm guy while sitting


VW T4 Project – Interior construction – right side view – top rectangle is roof

Fortunately at this time I had a left over sofa-bed from IKEA called Beddinge around, which I would like to include into my interior design. It is foldable and usable as a couch and therefore perfect as a the heart of my low cost campervan VW T4:

It is possible to pull the seating area and get an full 140 by 200 cm bed by that:


VW T4 Project – Interior construction – front right view


VW T4 Project – Interior construction – back right view

VW T4 Project – War against Rust – Battle VI – Interioir

As presented in a previous post, my beloved Vw T4 has some Issues with rust on the interior floor. For some reasons I will explain soon, I only got one night to solve these and handle all spots below the carpet as good as possible.

This is where we have to start:

VW T4 Project – Interior construction - Removal of all Seats - looks like an area needs to be treated

VW T4 Project – Interior construction – Removal of all Seats – looks like an area needs to be treated

I forgot to take the right amount of progress pictures but some can be shown here:

it is really time to learn to weld and to plan the interior functional design.

VW T4 Project – Interior construction – Removal of all Seats and carpets

I currently do not know anything about the status of my VW T4 interior. Is there rust? Do I need to fix anything before starting to convert the interior to fit the local camper regulations?

Only one way to find out, therefore I started by removing the seats:

So far, so good, but the real trouble might be under the carpet:

in conclusion, this needs to be handled before it means any further trouble.