GBAmp3 Mod PCB Order Now
also available at retromodding.comand Deadpan Robot

Monday, September 28, 2015

Neato Botvac Lidar Repair Part 2: Lidar PCB Replacement

So the final fix will be replacing Lidar turret. But as I said in the part 1 of Neato Botvac Lidar Repair I could not find Botvac Lidar turret to replace. But there are many XV Lidar turrets available on eBay and Amazon.
And they are different. XV series turret has mechanical data and power connection between spinning turret head and base using sliding contacts. This is major point of failure of XV series turrets. And Botvac turret has optical data connection to the base and wireless power, so no contacts would fail. Well how do we replace the Botvac turret using XV series turret if they are not compatible?

Let's take them apart and compare. I removed housing from both units.
As you can see there is a bit different lens and different laser diode housing.

The same 3 wires from laser diode and 5 wires from Lidar PCB soldered to the base. Also a note, that connector for a laser diode may go loose because of rotating vibrations and such. This is a point of failure which cause "can not see" errors. Easy to fix though, just pull it out and reseat. Also cleaning might help, and also metal pins inside laser wire part can be loosen and should be squeezed to sit tighter in the pcb connector.

This is how data and power transferred to Lidar PCB. XV one has rotary sliding connections. And Botvac one has optical data feed and power transfer inductor coil (like wireless Qi charging). There is another coil inside Botvac which produces power and this coil on the Lidar base pcb is receiving power.

Here on the Botvac Lidar base pcb you can clearly see ir detector diode to receive data and ir led to send data back to Botvac. Also there is diode bridge with linear voltage regulator ic to convert AC power from coil to DC power needed for Lidar.

OK, here is a main part. I desoldered Lidar PCBs from bases. Take a closer look. What do you see? Yes, they are exactly the same. They have the same revision/model number and date. So they should be interchangeable. Botvac one has flux residue all over the place because I was retouching it like there was no tomorrow.
They may have different firmware version though. I actually forgot to check that. Because when I soldered Lidar PCB from XV to the base PCB from Botvac and run tests, it just works. Here what the output looks like with working Lidar turret. No 8055 error codes. There was several 8035 errors, but it is because turret head cap has "legs" which cause Lidar to think that something is too close. But robot "knows" about turret cap and ignores that errors.
getldsscan
AngleInDegrees,DistInMM,Intensity,ErrorCodeHEX
0,664,229,0
1,662,266,0
2,670,222,0
3,682,249,0
4,687,306,0
5,684,281,0
...
352,676,464,0
353,678,472,0
354,681,477,0
355,684,440,0
356,688,437,0
357,692,422,0
358,696,422,0
359,700,386,0
ROTATION_SPEED,5.12

And this is how bright laser diode should look like through IR webcam.
Much brighter than on the picture from part 1, isn't it?
Botvac is fixed and works pretty fine since then.

Thursday, August 6, 2015

Neato Botvac Lidar Repair Part 1: IR Camera, Lidar Laser Driver Schematics, Debugging


Here goes a bit of story how I get there, for those who bored of text jump straight to the juicy pictures.

I acquired a broken Neato Botvac

robot vacuum on eBay recently. Seller has said that vacuum asks to turn power switch on, which is hidden in the dust bin compartment. But switching it on does not help and robot won't start cleaning. Otherwise it looks in good condition. Ok, easy fix I thought.

When I received my new robot I turned that hidden switch on and it helped, robot recognized that switch is in on position. I have not started vacuum cleaning that time but gone to clean robot itself first including filter. Next time I turn it on and it asks for that switch again, ok bad contacts perhaps. I flicked that switch couple dozen times and robot started to recognize it every time, fixed :) I do not know why that switch is there, is it some kind of battery kill/safety feature for transportation?

Well, nothing left just to try cleaning procedure. I started it by pushing button with home icon, robot moved away from it's charging bay and started vacuum motor, Lidar spinnig and then brush motors. But it was doing nothing but stopping itself and respin all motors. Then it threw 4000 error to me. I tried several time and everything I've got is a bunch of 4k errors, 400x, 40xx errors. That errors means something wrong with Lidar unit. It can be motor which can not handle specific 5RPM or it can not "see" because of dirt on lens and so on.



That "hat" over Lidar unit is easily removable. So I removed it and cleaned lens and it does not help at all. Lidar was spinning fine though. Ok, not easy fix anymore :)

Now to debugging. There is an USB port on the robot inside dust bin compartment alongside that mystery switch. It is like RS232 USB bridge, just a serial port you can talk to. No drivers needed (if you are on Linux for example). I used "GetLifeStatLog" command which is described in official Neato Programmer's Manual. But is does not work. Botvac is new series of vacuum robots made by Neato Robotics and they removed some useful commands from it. This "GetLifeStatLog" could help me with Lidar debugging, but oh well we'll find another way.

To make a long story short, I was getting the same output from Lidar unit as this guy at robotreviews.com.
TestMode On
SetLDSRotation On
GetLDSScan
AngleInDegrees,DistInMM,Intensity,ErrorCodeHEX
0,0,0,8055
1,0,0,8055
2,0,0,8055
3,0,0,8055
4,0,0,8055
... all the way to 359.
RPM was from 4.98 to 5.12 which is totally fine and correct. Basically this output means that Lidar can not "see" a thing. Either it is blocked lens, broken CMOS sensor, dead Laser diode or dead Laser Driver circuit, all sort of things. But at least Lidar unit can talk and respond to main system.

Lens is clean, I can not "test" anything here. But I can test laser. Lidar laser diode is an IR laser diode. But it is not just regular IR diode which you have in your tv remotes. Regular remotes has 930-950nm wavelength IR diodes and you can "see" them just by looking through your phone's camera for example, try it. But Lidar unit has 785nm wavelength IR which you can not see good enough through that camera. I want clearly see if laser works or not.

Let's make IR sensitive camera

from a regular webcam. Regular cameras has IR filter in front of it's sensor, we need to remove it to make it more sensitive to lower wavelength. I used a laptop webcam module for this purpose, it's cheap HD, it's USB and it's easy to remove IR filter from. Also I can change focus range, more on that later. Sorry for the pictures quality, my normal camera was busy on another installation. This is how it looks.
I already soldered USB wire. Camera suppose to work with 3.3v power. But it works ok with 5v supplied from USB too.
You need to unscrew lens from the camera. There is a microphone in the middle and camera to the right. Lens is adjusted for infinity focus and glued in place. Just scrape glue off and unscrew lens. Then flip it upside down.
On the bottom you can see IR filter glass. You need to remove it to make camera more sensitive to IR wavelength. This filter is glued to the lens housing, just pry it with something sharp and remove. Mine filter was broken in process.
Now you need to screw lens back to the webcam and adjust focus to infinity. Basically connect it to the PC and keep screwing lens until object in the far is in focus. But you can also adjust focus so you can use it as inspection microscope or taking macro photos, but quality is obviously bad, you need much more light that I had. This is silicone die inside 5050 RGB leds with built-in driver IC (WS2812 and APA102C)



QFN32 soldering inspection on home made pcb.

Debugging

So when I've taken pictures of lidar working I could not see laser beam at all. Laser was not working at all. All I could see is IR optical data connection between rotating lidar head and base unit (light in the middle of rotating head). I will use black and white pictures due to quality.

Seems something wrong with IR laser driver or laser diode itself. I disassembled Lidar unit and reversed laser driver to schematics. It maybe a bit wrong, but mostly correct.

It's a bit hard to identify sot-23 transistors and mosfets. So the laser diode driver has 3 controls and 2 feedbacks. There is power on signal to turn power on to the laser diode and driver unit. This signal is constantly on when lidar start spinning. There is also constant PWM signal it also constant when lidar head spinning. And there is some kind of modulation, there are 2 types of pulses modulation. Botvac change this modulation each time lidar start spinning, so next time you get second modulation type. Also this can be laser diode constant current control or it is shared with constant PWM signal.

I disconnected laser diode and tested it with power supply.


It was kind of working. That means driver circuit is dead. I tested Q2 and Q1 and they were dead I replaced them with similar parts. I also shunt Q3, there are jumper pads on the driver pcb. And a result was not that great. Laser diode was working but it was not producing much light than it should.


You can see it's barely visible at all. Then I made a small pcb with 2 color leds and attached it to driver pcb on the spinning lidar head to check control signals. That's how I know there are PWM and modulation.


You can see PWM and modulation here.

All signals seems OK, but laser diode is dim. I think it was damaged when transistors were blown. The only fix is to replace lidar unit now, but I could not find Botvac unit available for sale nor laser diodes available. There is difference between Botvac and XV series lidar heads. XV uses sliding mechanical contacts for data connection between lidar spinning head and the base. But Botvac uses optical data connection.

Let's finally repair it in the second part: Neato Botvac Lidar Repair Part 2: Lidar PCB Replacement

Saturday, February 7, 2015

Oaxis InkCase for iPhone and Note II Teardown


Today I'm going to teardown a pair of Oaxis InkCase thingies. It is a protective case for your phone which has a second screen and the screen is eInk type screen, black and white. This type of screens used for eBook readers like Amazon Kindle. So in theory this "case" should work much longer than your phone on it's battery. A case connects to your phone through Bluetooth 2.0 for N2 and through Bluetooth BLE for i5.
I received these units for beta test in Jan 2014 and found them unusable at that time. Especially N2 case which was chewing batteries like crazy, it would not hold a day without recharging. Also often loosing connection without being able to reconnect without disabling and re-enabling bluetooth first. So I wrote it all to the guys at Oaxis and put units away.
A little tip on how it works. It's very simple. Phone just sends a single image to the case through bluetooth, that's all. All the image compositing done in the phone's app.
Now I see they are released new InkCase Plus model which is designed to fit to almost any android phone.
Enough waffle, let's tear it down starting with N2 model.
 So basically it is just a refitted eBook reader. It has 4 buttons, left, right, select and hidden reset. You can switch to previous images that phone sent. Images in this case is screen updates, like weather, pictures and so on. There is no processing on this device except showing images.
Back side made of smooth plastic with will not scratch your phone.
As you can see, inside it has a generic eBook SoC Allwinner F1 E200 and supporting circuitry. Also they added bluetooth in the corner. 820mAh battery. So this is it for N2. Nothing exiting, right?

Next i5 model.
Again, back is made of very smooth plastic. Take a peek inside.
Battery is half capacity of N2 model 460mAh. But this case is using BLE which is much lower power than Bluetooth 2.0.

Ok, the circuit is completely different to N2. This one has a Rockchip RK2818 SoC which used in low-end android phones. Also to note, i5 model has only one single button.
While I was playing with i5 disassembling it and reassembling, trying to charge a battery etc. I somehow entered into a recovery mode. And what do you know, this thing has an actual Android OS inside. So iPhone has a protective case which has Android in it :)

Saturday, October 4, 2014

Let's make Wireless Gamepad / Controller for Famicom / NES Part 3: Schematics and PCB design

Here goes schematics and pcb for transmitter which will be is installed inside a controller shell.
Battery charging current set to ~200mA. There are 3 leds. Red(Orange) is for charging indication. One green for charging end indication and second green is for debug indications. There are 4 smd connections. +5v input for charging. Battery connection. SBW for programming. And controller pcb wires connections.
PCB is doublesided with 22x27mm size. PCB and parts footprints are designed to be hand soldered.



And schematics and pcb for receiver module which will be installed inside NES / Famicom or soldered to the original 7-pin or Famiclone 9-pin (or 14-pin) controller plug for plug-and-play. As I said this receiver will emulate original controller interface, so it's just ready to go. PCB also has the same smd connections for power in, SBW and controller interface. And green led for debug indications. Also to note, NES / Famicom has 5v controller interface signals but used MCU can handle 3.3v only so I used voltage dividers to limit maximum signal voltage and current.
Receiver has slightly bigger PCB with 22.6x27mm size.


For the next part I will manufacture transmitter and receiver pcbs at home and solder parts on. Also will try to fit it inside a controller shell with battery. And will use receiver pcb with Famiclone console for POC.

Tuesday, August 19, 2014

Let's make Wireless Gamepad / Controller for Famicom / NES Part 2: Hardware


What hardware do I need to get this project done faster? I need 2.4Ghz transceiver module which I can connect microcontroller to. The same module for a gamepad and receiver. I need very small and thin module to fit inside a gamepad case.
I thought to use ever popular module with NRF24L01 transceiver ic. But I don't have small one, one with 8 2.54mm pin connector is huge and will never fit inside a gamepad.

But I do have really small module with NRF24L01 clone ic called BK2421 (made by BEKEN). Module called RF-2400-NANO made by INHAOS Technology Co. This will fit nicely. It has the same configuration registers, but has 2 register banks. Second bank is only to configure BK2421 ic.



OK. Now I need a microcontroller to make it all work. I have 2 spare MSP430G2452 in VQFN package. This is enough to make proof of concept.

Also I need a battery for gamepad, lithium rechargeable battery. I will use MCP73831/2 charging ic from Microchip to charge this battery from USB.

In the next part I'll make schematics for transmitter and receiver modules.

Sunday, August 10, 2014

Let's make Wireless Gamepad / Controller for Famicom / NES Part 1

I'm slowly restoring good old Famicom console.
It was in partly working condition. Some games was able to show title screen but not start, or not start at all with grey screen. This was hard to find fault. But I managed to fix it, it was one of the address lines trace broken in the inner pcb layer. Added one wire and got it working.

Now to the topic.
Who need wires this days right? Less wires is better always. So I decided to design and make a mod for stock Famicom controllers to make them wireless.
Famicom has official wireless controllers but they were using crappy IR and you need to point it to console every time. I want to make RF wireless controllers using that fancy 2.4GHz ISM band.

I'll make a prototype for a newage Famiclone console to test things out (chinese D99 model, single chip clone).
This projects has two sub-projects. First one is for transmitter which will be inside Famicom controller with battery and USB charger. Second one is for receiver, prototype will use Famiclone controller port (Famiclone has removable controllers), you just plug in receiver or plug in wired controller.

Famicom controller has pretty simple schematics. It's a single shift-register parallel input, serial output and 8 pull-up resisters. It can use HEF4021B ic or similar. Famiclone controller uses black blob ic, which is unknown, it's the same shift register but with built-in pull-up resistors.
Stock controller schematics should look like this:

To make a transmitter I need to "read buttons" like a console, pack it into a packet and send it to receiver. To make receiver "plug and play" it should emulate controller. When packed received and when console read buttons it will respond as controller.

In the next part I will select hardware for transmitter and receiver.

Wednesday, July 9, 2014

GBAmp2s at kitsch-bent.com

Great news for US GameBoy (Color) loud sound fans :)
GBAmp2s will be available at kitsch-bent.com soon. Faster shipping for you.

Friday, June 6, 2014

Handheld Famicom / NES Clone Teardown

So there are numerous Famicom / NES clones, some of them are portable handheld versions.
Let's see what's inside one of them. This one has a cartridge slot along with "many" built-in games.

It has li-ion battery, usb charge cable and tv out cable included, so you can actually play it on tv. But it lacks of second controller and does not have a select button. In some games you can not select "continue" because you do not have select button :)

Single pcb design. LCD is not 4:3 but image does not look stretched.


This black blob is the main CPU+PPU chip, unknown.


Edge connector for cartridge on the back. USB battery charging circuit. Main crystal. And there is 16Mbit CMOS flash where built-in roms are stored. This pcb can accept flash in different packages. 3 color wires are soldered by me, it's for speaker and battery connector, old wires were rusty with failed soldering job.


This is to compare cartridge size with GameBoy cartridge, very small.

Inside there is the same 16Mbit CMOS flash chip without any fancy mapper chips. It just replaces a built-in flash when inserted.

Tuesday, May 20, 2014

Friday, May 2, 2014

Let's quickly repair Nintendo 3DS shuts off with popping sound when fully opened, LCD Flat Flex Repair

Ok, so I recently got this heavily used Nintendo 3DS which was not turning on fully. Blue light comes on then it makes popping sound with a little backlight flash and shuts off.
I tore down it into pieces while searching for faults. Found broken touch screen flat flex cable.
Also I found flat flex (ribbon) cable with some traces been broken in the top half of the 3DS and that was the culprit of popping sound and shut off.

This flat flex (ribbon) is connecting top screen backlight, 3D control ? and speakers. Any fail in the backlight circuits of top or bottom screen and 3DS will shut off with popping sound.
So it's easy to fix, just order a replacement cable. No way :)
Checked with multimeter and found there are only 2 traces broken.
I took some hair thin enameled wires. I then scraped off flat flex (ribbon) traces to copper at the connector side and soldered wires there.

Also soldered these wires to connector on lcd side.

And it works :)

I then glued wires to the flat flex cable with tape.
Putting all that flat flex (ribbon) cables back through the hinge was huge pain though. 

Tuesday, March 25, 2014

UNI-T UT61E RS232 serial interface cable to USB diy mod

I'm using my UT61E a lot. One great feature it has is that it can send data to pc for data logging. And it has interface cable included in the box with no additional cost. But the cable is RS232C compatible using DE-9 connector and +/-12V logic levels.
Do you have DE-9 connector on your laptop? I don't :) You obviously can use that RS232 to USD Adapter cables, but DIY guy can make his own cable, right? Add bluetooth too perhaps?
Let's take a closer look at the supplied RS232C cable:

From the first look it has only one working "eye". Which means there is no connection from PC to the meter, easier to hack then.

What's inside:

Definitely only one RX IR sensor diode used, TX circuitry is not populated.
Here is a schematics I reversed from the pcb:



This thing pulls up RX line when IR diode senses light from the meter. UT61E sends inverted serial signal to its IR led.
There is a bit of space inside this sensor box. And I need to fit a circuit inside, which senses IR light and pulls down RX line from 3.3V to Ground. This is classic UART serial interface.
Unsolder everything from the pcb except IR sensor diode.
This is new schematics using 2 n-channel mosfets, any general purporse mosfets will do. I used 2N7000.


R1 needs to be set lower than original because we are using 3.3V now and there is not enough juice to turn Q1 on fast enough with 4.7k.
OK, then I made this piece of art:
This fits perfectly inside original enclosure. New cable needs only 3 wires: +3.3V, GND and RX, I cut the rest. You may be wondering why I call it RX, well this is how DE-9 was wired. RX means PC side RX pin.

At this stage you already can connect UT61E to the microcontroller or Arduino or anything else which understands 3.3V UART. But I started it as USB mod, so we continue.
I have some CP2102 Serial UART TTL USB converters laying around and this is enough for this mod. Just connect that 3 wires and there we go.
Female header used so I can disconnect CP2102 converter and use it anywhere else.

Raw output from the meter:


Correct serial port settings for this meter are: speed 19200, bits 7, stop 1, parity odd.

That's it.
But, there is more! You can even add a Bluetooth feature to this UT61E multimeter. It's easy as soldering 6 wires to some serial bluetooth module with this mod.
UT61E with Bluetooth, sounds great! Interested?