rtwin

joined 2 years ago
MODERATOR OF
 

The original remote was missing, so I thought replacing the remote and receiver would be a nice challenge.

Parts used:

  • An old 2 channel 40Mhz remote and receiver "Graupner b4 ssm 40b".
  • This ESC "40A Brushed Esc Electronic Speed Controller Voor Wpl C24 C34 Mn D90 MN99S MN86S" https://aliexpress.com/item/1005005133523842.html for converting PWM into a DC power supply for the already mounted DC motor.
  • A servo "MG90D Digital servo" to replace the original limit-switched-motor, for steering. (The "SG90 tower pro" with plastic gears didn't last)
  • Some 3d printed parts for steering.

The original remote had

  • 1 channel (off/on) for the back connector (to attach a trailer)
  • 1 channel (off/left/right) for steering left/right
  • 1 channel (off/fw1/fw2/bk) for driving

So i lose the option to control the back-connector, but i gain variable speed and steering control.

 

Jan 2, 2020

hello guys!! this is my first video in this video i am going to show you how to change output voltage of laptop power adapter ll it can give 5 volts to 35 volts output remove two feedback resistors in that place connect potential meter, you can find feedback resistors near the ic M101AC don't forget to change the output capacitors THANK YOU!!!

 

To communicate you need:

  • Smartphone (BT) running "meshtastic app"
  • ↕ (BT)
  • IOT device (BT + LoRa) running "meshtastic firmware"
  • ↕ (LoRa)
  • IOT device (BT/WIFI+ LoRa) running "meshtastic firmware"
  • ↕ (BT)
  • Smartphone (BT) running "meshtastic app"

Maps for finding such nodes:

 

i found this lightbox without keyboard at the second hand store. i thought i'd see what i could do.

There's hardly any info on the Cresta AS-0216.

The websites i found, looking like the same (or similar) device;

There's a blog about a repair of a Cresta-0216;

My device looks like this (pictures can be enlarged by clicking):

i'll be posting some update if i have them

 

I've got a few damaged hoverboards. They're not very good quality. Some work others go into error-state after a while.

To be able to do some fault finding i thought to try to readout what these sensorboards provide.

This is the exact model i have

Sensorboard gyroscope taotao 684270 2016-04-20 (where i found the pics: https://www.voltes.eu/products/hoverboard-sensorboard-gyroscope-taotao)

i use the Arduino mega 2560, because it has multiple UART pins.

Baud rate

I first needed to know the baud rate. For that i found some online arduino code measuring the shorted pulse duration, and based on that determine the baud rate. Seems the board is communicating at 57600 baud.

which UART mode

To try to find out what UART mode is used, i created a program which determines the high/low durations of the data pin, and print it as a bitstream, hoping to be able to determine the mode. But i couldn't make sense of it(in hindsight, i can understand it, but i'm too much of a rookie). So i just tried the few available modes. None of the 5 to 8 databits modes produced anything useful.

9 bit data

Turns out the standard Arduino 8 bit UART modes don't work. i needed to try the 9 bit UART mode. For that i used an external library mentioned on this site: https://forum.arduino.cc/t/9-bit-software-hardware-serial/590266/8 Because this library sets an interrupt routine, i renamed the HardwareSerial9bit0.cpp file to HardwareSerial9bit0.cpp.txt so that in my sketch it didn't collide with the Arduino IDE's Serial which i used for debug printing to the Arduino console. The mode which worked for Serial91 is SERIAL_9O2 (9 databits, Odd parity, 2 stopbits )

Finding a frame

To find the start of a frame, i decided to look for a 0, then 2 times a non-0, and a 0 after the frame. For storing the UART data in a buffer, i used the CircularBuffer library by AgileWare v1.3.3 https://github.com/rlogiacco/CircularBuffer . I set it to store 512 integers. When Arduino finished 1 cycle, there are between 10 and 60 integers read into the buffer. But when i enable printing of packets to Serial, then it increases to about 70 - 80 per cycle which are available. When the cyclical buffer contains more then 10 integers, i test if it contains a valid frame, if not, i remove the head, and test again. Update: I changed the frame detection because an actual 0 angle would not be possible. So now it tests for #0 to be 0, #5 to be 0x5 or 0xA, #10 to be 0. Also, i now realize that UART overflows at 64 characters.. i.e. the code must be improved to be faster. /update

Data obtained

The data packets are formatted as

 * 000,102,002,102,002,01A,0B8,0B8,000,000,000,
 *     AA  BB  AA  BB  CC  DD  DD  EE  EE  FF
 * 000   = Start of frame
 * AA BB = LSB,MSB  forward backward angle
 * CC    = Status bits ( 0xA unpressed, 0x5 pressed, 0x20 Error/was upside down )
 * DD    = 9 bit unsigned 0..185..368 intertia left/right       rotation
 * EE    = 9 bit   signed -255.. +255 intertia forward/backward rotation
 * FF    = Start of next frame

Data issues

The doubling of the data in a single frame enables some error checking. I observed the next issue

AA   BB    AA   BB   CC  DD  DD  EE EE  | 'AABB as dec nr' || Bad
Angle reading is dodgy.. Bits are flipping on.offf
V     V    V     V         
63 | 1E1 | 63 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15773 || 
63 | 1F1 | 63 | 1F1 | 5 | B8 | B8 | 0 | 0 | -7581  || BAD
73 | 1E1 | 73 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15757 || BAD
63 | 1E1 | 63 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15773 || 
63 | 1E1 | 63 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15773 || 
73 | 1F1 | 73 | 1F1 | 5 | B7 | B7 | 0 | 0 | -7565  || BAD
63 | 1E1 | 63 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15773 || BAD
73 | 1F1 | 73 | 1F1 | 5 | B8 | B8 | 0 | 0 | -7565  || BAD
63 | 1E1 | 63 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15773 || BAD
72 | 1E1 | 72 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15758 || 
62 | 1E1 | 62 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15774 || 
62 | 1F1 | 62 | 1F1 | 5 | B8 | B8 | 0 | 0 | -7582  || BAD
62 | 1E1 | 62 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15774 || BAD
62 | 1F1 | 62 | 1F1 | 5 | B8 | B8 | 0 | 0 | -7582  || BAD
72 | 1E1 | 72 | 1E1 | 5 | B8 | B8 | 0 | 0 | -15758 || BAD 

But i actually can't figure out which of the reading is 'BAD' i just picked the one which changed much in angle from the previous frame, while accelerometer(EE) says 0. i figured that if the angle changes much, then the accelerometer should also indicate movement.

Statistics

After logging the packages and trying to find a way to read only valid frames, i used an LCD 20x4 I2C screen to show some statistics. For that i used LCD Library by Frank de Brabander v 1.1.2 https://github.com/johnrickman/LiquidCrystal_I2C

I show a databar for the

  • forward/backward angle
  • forward/backward accelerometer
  • left/right-turning accelerometer

and the following info

  • Err/Ok (upside down etc)
  • On/Off (standing on the pedals)
  • %BP (Percentage Bad Packets. A packet is bad when the doubled data isn't the same)
  • BA (amount of 'Bad Angle' packets)
  • BL (amount of Bad Line incidents. i.e. not able to find the starting '0' data of a frame. Testing for nr #0 = 0(start) and #10 = 0(next start), and #1 and #2 are non-null.)

My total setup looks like this

For the presentation not to take too much CPU time, the top 3 bars refresh every 100 msec, the bottom numbers refresh every 500 msec. i Also changed LiquidCrystal_I2C\LiquidCrystal_I2C.cpp to set the I2C speed to 400Khz by calling setClock()

void LiquidCrystal_I2C::init_priv()
{
	Wire.begin();
	Wire.setClock(400000); // Set I2C to 400Khz
	_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
	begin(_cols, _rows);  
}

Next up.. Trying to figure out what sensor-data is acceptable by the main board and which data makes the main-board go into error state.

 

17.376 weergaven 16 mrt 2022 #Hoverboard #electriccar #carrinhoelétrico Arduino na Shopee https://shope.ee/7UlXL85Unt https://shope.ee/5V0SxYJHN2

Caro inscrito,

A comunicação serial está implementada via software devido às limitações do microcontrolador, além de facilitar a adaptação do código para outros modelos de microcontroladores com recursos limitados.

O programa está disponível para download em meu site www.albertonoboru.com.br Caso estejam gostando do canal, ajude-o a crescer. Inscrevam-se, comentem, compartilhem ...

Caso deseje usar o hoverboard na construção de algum veículo elétrico (carro elétrico, electric car), recomendo do modelo sem auto-equilíbrio, pois os motores podem ser desenergizados com o comando 0x0AA, e as rodas vão girar mais livremente caso não esteja acelerando.

Hoje me deparei com mais um padrão. 0x100,LSB,MSB,LSB,MSB,0x055 ou 0x100,LSB,MSB,LSB,MSB,0x0AA

Se gostou do vídeo, deixe seu like, comente e se inscreva no canal. Ajude o canal a crescer para oferecer novos conteúdos.

Não esqueça que os códigos são apenas um ponto de partida e devem ser melhorados por vocês para maior segurança.vocês para evitar acidentes.

  • NUNCA implemente sem os componentes básicos de segurança, tais como botão de emergência, fusível e disjuntor CC.

Caso não tenha afinidade com eletrônica, peça ajuda.

Don't forget that the codes are just a starting point. They must be improved by you to avoid accidents.

  • NEVER deploy without basic safety components such as emergency button, fuse and DC circuit breaker.

If you don't have an affinity for electronics, ask for help.

Link to Download the Sketch Hacking a Hoverboard: Video Version: https://drive.google.com/file/d/1CCNb... REV 1.1: https://drive.google.com/file/d/1X-dx...

Shorts new sketch

• Shorts

Desejo um bom projeto a todos !!

⚠ JAMAIS CLIQUE AQUI ⚠ https://bit.ly/3L4j6Qu

Site: www.albertonoboru.com.br

Autor dos livros:

  • Microcontroladores ARM™ Cortex™-M3 (Família LPC175x/6x da NXP) Programação em Linguagem C - 2ª Edição (Venda na Amazon)
  • Introdução aos SD Cards: Barramento SPI (Venda na Amazon)
  • Microcontroladores PIC18 - Aprenda e Programe em Linguagem C - 4ª Edição

Link dos livros na Amazon https://www.amazon.com.br/s?k=alberto...

Como hackear hoverboard

#Hoverboard #carrinhoelétrico #electriccar

view more: ‹ prev next ›