Screenshot_2016-07-19_20-15-07

FritzBox Python Class Fritz OS 6.30+ syncing Google Calendar

This project allows to interact with your FritzBox above the new FritzOS 6.30 to 6.60 (tested with Fritzbox 7490 and 7390) by using a self written FritzBox Python Class. It furthermore uses the Google Calendar API to enter phonecalls and online devices status into your google calendar. To use the Google Services you will need to generate your own client api credentials including a valid calendar json. For the expected format see the provided default files.

Of course the FritzBox Python Script also works stand alone, an provides following functionality:

  • read out last 400 phone calls
  • list current network devices

Of course I plan to increase that functionality:

  • add a config.json
  • implement CalDav Support for non google solutions
  • add pictures of google calendar entries
  • enable gant charts of devices (d3js?)
  • get FritzBox phone book(s)
  • sync phone books to Google Contacts
  • sync phone books to CardDav

I’ve you are interested to use or join me developing:

General Usage FritzBox python class

General Usage Google Calendar Wrapper

For phone calls:

For active devices tracking:

 

This also works for multiple FritzBoxes, here you see all phone calls of a week:

FritzBox Python Class - calendar view

FritzBox Python Class – calendar view

It’s pretty easy to add this script to a raspberry pi located in the network of the router. You’ll also can setup an vpnc connection between the box and an server or use a dynamic ip and a custom port.

IMG_0067

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

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.

Screenshot_2016-06-29_14-59-21

decoupling relay scheme

Charging

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

IMG_0991

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.

IMG_0990

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.