Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

RolandasRazma/RRBee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RRBee

Pet project for BeeWi Mini Cooper controlling @YPlan

BeeWi Mini Cooper @YPlan

It's not interesting when it's only work and no pleasure, so we got a BeeWi Mini Cooper @YPlan to shorten those "hard" days :)
BeeWi Mini Cooper
It's a nice toy, and best of all - it is Bluetooth controlled over iPhone! All you need is free iOS application. After few drag races with our designer João Pires we started to chat how it would be cool to mod it. You know... like add blinking lights, WiFi camera and etc, and best of all - I can write iOS application to do all that!

Modding BeeWi Mini Cooper @YPlan

First of all I had to figure out how to send signals to BeeWi Mini Cooper over Bluetooth. Apparently it's quite simple. You just need to add UISupportedExternalAccessoryProtocols to Info.plist and connect to it using ExternalAccessory.framework. I got UISupportedExternalAccessoryProtocols from official App by extracting IPA and poking in their own Info.plist. I was about to start sniff Bluetooth data by emulating car, to check what data comes in to control it, but surprisingly found another project on GitHub that already did that @hdi-95 hdi-remotepad. That was pretty simple. Apparently you need only 8 command 0-7.

  • 0 - Stop go forward
  • 1 - Go forward
  • 2 - Stop go backwards
  • 3 - Go backwards
  • 4 - Stop turn Left
  • 5 - Turn Left
  • 6 - Stop Turn Right
  • 7 - Turn Right

You can clone my basic iOS app to control BeeWi!

BeeWi Mini Cooper - Hardware

Ok. So I need more of those signals to turn on and off lights. Disassembling is quite easy. There is only 4 screws at the bottom.
4 screws

Lets inspect whats under the hood. What you see standard Bluetooth receiver on breakout board, and very simple PCB under it.
chassi chassis without Bluetooth receiver PCB back side Bluetooth receiver Bluetooth breakout board

Ok, so we have Bluetooth serial communication module (most likely cheap one) and breakout board with micro controller. I fast checked all 8 pins on breakout board using multimeter and unfortunately only 4 of those are for serial signal, other 4 are for ISP, 2 for ground, 1 for Vcc, and 1 unused for LED.

4 pins only... Go forward, Go backwards, Turn Left, Turn Right… Clearly no place for all cool features I would like to add... even worser - after some experiments I figured out that only 2 of them can be active at the same time (for example 1 go forward + 7 turn right) so there is no way I could do some logic with gates...

Bluetooth breakout board pins

BeeWi Mini Cooper - Modding Hardware

So my choices pretty narrow here:

  • figure out what micro controller is used on breakout board and try to reprogram it.
  • cut micro controller from breakout board and add new one with enough pins I could program.
  • use Shift register to increase number of available outputs.

What is Shift Registers?
Shift register in principle it is "device" that counts how many impulses you gave to it. Every time you give impulse it shifts bit by one position. If you had 00000000 (look at legs of it) after you "give it" 1 it will have value of 00000001, if you then "give it" 0 and 1 again, it will have value of 00000101. It is very simple to operate, you can connect them in daisy chain to get virtually unlimited number of outputs and best of all you need only 3-4 wires to do so.

Depending on Shift register model it might have different pins, but for 74HC595 Shift Register they are as follow:

  • 1 - output (QB)
  • 2 - output (QC)
  • 3 - output (QD)
  • 4 - output (QE)
  • 5 - output (QF)
  • 6 - output (QG)
  • 7 - output (QH)
  • 8 - GND - ground pin you connecting to - of your power supply
  • 9 - output used for connecting several shift register together (QH')
  • 10 - serial clear - Will clear all values if no current is given. Most of the time you want it to be connected to power supply +
  • 11 - serial clock - When this pin is pulled high (has current), it will shift the register to whatever value is given on pin 14
  • 12 - register clock - After you set value you want (by operating pin 11 and pin 14) this pin needs to be pulled high (have current) to set the output to the new values. It must be pulled high after serial clock (pin 11) has gone LOW.
  • 13 - output enabled - enables output when tied to ground (power supply -). If you want to temporary disable output without affecting shift register value you can pull it HIGH
  • 14 - serial input - value for the next bit that gets shifted in (when pin 11 is HIGH)
  • 15 - output (QA)
  • 16 - VCC - + of your power supply


Wireing
I thought that Shift registers is simplest solution as you can get virtually unlimited outputs, it would move all logic to software (iOS app) and most important in my case is that I can control it with 3 wires (remember that BeeWi Bluetooth breakout board has only 4 and allows only 2 be active at same time)

I had couple of 74HC595 Shift Registers lying around as they are pretty common so I decide to hook it up.

Before I start soldering everything to BeeWi PCB I have to test if it would work. I started putting everything on Breadboard. First, Bluetooth breakout board from BeeWi and Shift register, then added simple power supply I had and some LED's. Then wrote simple iOS app to set bits as I wanted. Good, now I have 8 independant outputs!

Breadboard, BeeWi Bluetooth pins, Shift register, LEDs, Transistor, Resistor

Breadboard, BeeWi Bluetooth pins, Shift register, LEDs, Transistor, Resistor, Control jumpers

Breadboard, BeeWi Bluetooth pins, Shift register, LEDs, Transistor, Resistor, Jumpers

Breadboard, BeeWi Bluetooth pins, Shift register, LEDs, Transistor, Resistor, Jumpers - assembled, on

Breadboard


Putting back together
It's time to put all back together. There is no place for shift register on bottom of original PCB so I decided to put it on the top. First of all I needed to cut old connections going to Bluetooth breakout board as they will be replaced with new ones driven by shift register. It's not that hard if you have crafts knife.

to be continued...

About

Pet project for BeeWi car controlling @YPlan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published