Skip to content

Prototype concept

weinzmi edited this page Jan 6, 2019 · 17 revisions

this prototype is developed in the branch "prot"

https://github.com/weinzmi/ergoFACE/tree/prot

Milestones

  • Reverse engineering of signals
  • Analog simulation of SET POINT values
  • safety/fail-safe compliance
  • WATT program simulation
  • Read / write values per webserver
  • Logging of training data

Shopping list

Items shop price comment
DAUM Ergobike 8008 TRS willhaben €75 electronics damaged !?
Osziloscope amazon €44 for signal reverse engineering
Soldering kit amazon €23 because everybody needs new tools
Maker starter kit amazon €40 might come handy for other projects
Raspberry Pi 3 B+ amazon €40 why not!
TOTAL €222 ok for a hobby ;)

Hardware

first board and schematics

since the drive train board is supplied by a +5V signal, there is no need to "drive" this circuit from ergoFACE. To avoid signal problems, the GND (Ground) is connected from drive train board to the ergoFACE. The PWM signal for the electro magnetic brake will be simulated with the GPIO 18 (PIN12) and a LED

for specifications on signals, see Hardware the detection of RPM signal should work out of the box with 3,3V input of RPi. For the PWM signal, there has to be a voltage devider to scale down the 3,3V of RPi to the 2,5V of DAUM.

with 2 resistors, R1=100kOhm, R2=220kOhm, the output voltage of GPIO can be scaled down to 2,27V. Find a voltage devider tool here: https://www.electronicsplanet.ch/Spannungsteiler/spannungsteiler-berechnen.php

GPIOs

PWM - Pulse with modulation

details on PWM: pwm.py

the GPIOs will be used to receive and send the analog signals via the connection cable

Function Parameter Description
p = GPIO.PWM(pin, freq) pin – pin number/GPIO number, freq – frequency of the PWM Creates an PWM instance and assigns it to variable p
p.start(dutyCycle) dutyCycle – Starting duty cycle Values from 0.0 to 100.0
p.ChangeFrequency(freq) freq – new Frequency in Hertz Changes the frequency of the PWM
p.ChangeDutyCycle(dutyCycle) dutyCycle – new duty cycle Values from 0.0 to 100.0 Changes the duty cycle of the PWM
p.stop() none Stops the PWM

WiFi

standard

standard mode will be used, if there is an other wifi available,The ergoFACE and the mobile device have to be logged into the existing network. This will apply to the ethernet connection as well.

AdHoc WiFi / WiFi Hotspot

Hot spot mode will be used, if there is no other wifi available. The ergoFACE will create a hot spot and the smart device has to be logged into the ergoFACE wifi.

Setting up a Raspberry Pi as an access point in a standalone network (NAT)

Connector

MOLEX connector type

3901-3043 - Crimpgehäuse 4P - Molex

the connector will just be unplugged and bridged with cable extensions.

Software

Installation

working on an installable package

Modules

  • watt.py

for the purpose of failsafe and machine safety and getting the power data and duration from yaml files

  • pwm.py

PWM output generation

  • rpm.py

retrieving the rpm input signal

  • machine.py

core of ergoFACE is the state machine

State machine

first - basic design / concept

Basic State Diagram - prototype 001

second - detail design

Detailed State Diagram - prototype 002

third - generated by statemachien itself

Statemachine

Clone this wiki locally