Giter Site home page Giter Site logo

Does it work ? about newbaztag HOT 8 OPEN

NabazNoah avatar NabazNoah commented on July 19, 2024
Does it work ?

from newbaztag.

Comments (8)

trcwm avatar trcwm commented on July 19, 2024

Hoi Gerrit,

At this time the project is very preliminary and I will work on it sporadically.

Thanks for the FCC link, I will check it out!

My aim is not to bring it back to it's old state but rather implement new functionality. It will be easier just to replace the complete firmware. I do believe that there are several variants of the Nabaztag hardware, which will complicate things. If you can take photographs of your Nabaztag's PCB, I can add them to the project for future reference. Any information you have regarding the hardware or plans/features you'd like to see are very welcome!

Regards,
Niels.

from newbaztag.

NabazNoah avatar NabazNoah commented on July 19, 2024

Hi Niels,

On second (and further) view I see the preliminariness (is that even a word ?) of your project. :)

Years ago, when my wife found me my first Nabaztag V1 (at a flea-market), they still had some functionality. You could quite easily connect them to an alternative server on the internet and get them to move their ears, light up their LEDs and make some sound.

Through the years I have collected some more V1s and also some V2s (Nabaztag:tag) and even Karotz (v3). But they have just been collecting dust on top of a cupboard, for some time now.

Recently my interest in electronics and programming has lit up again and I thought it would be nice to get them up and running again...

The old V1 Nabaztags turn out to be very difficult to even connect to from windows 10, almost impossible (so maybe your wifi card isn't even broken). With an old windows XP notebook it was easier and the settings could be changed. But after a lot of searching on the internet I found out that there are virtually no servers that have support for the V1. So I decided to try and give it a new life with some new technology.

During my search for a solution, I found your github idea and -after contemplating many different ways to get them to work- I totally agree with your decision that writing a new firmware is the best and easiest (???) solution. The old WiFi card is too old to be functional these days and the old firmware is too big and difficult to reprogram.

So I have been busy studying the last few weeks on how to program PIC microcontrollers. Pffff.. difficult stuff ! I have some experience in making things and programming them in Arduino, but this is quite a different ballgame ! Now I understand why Arduino is so popular: it's easy ! And now I understand why no one has written a new firmware for the Nabaztag before: it's a nightmare !

I have collected and assembled some documents and photos for you / the project ( see attachments).

My idea is to first write a simple, basic firmware that can light the LEDs and move the ears and then connect some basic interface, Bluetooth or Wifi to the UART port to send commands. That will be enough to begin with, and I think that will be quite a challenge for me.

Hope you can help me when I get stuck, as this is new terrain for me. I will keep you updated on my progress and share what I find out and (attempt to) program.

Thanks again for sharing your ideas and information. It gave me what I needed to get started and keep the faith that it is possible (some day). :)

Regards,

Gerrit.

Attachments:

  • 3 photos of the PCBs in different stages (I found out they made them in blue and green !)
  • Connections list (a list I assembled of how everything is connected to the PIC)
  • Diagram (Block diagram of the connections, from FCC site)
  • Schematics (Schematics, from FCC site)
  • DeviceMemory (the firmware, read from my Nabaztag with ICD3)

[I](urlnabaztag-pcb-blue-with connectors-01
nabaztag-pcb-blue-without connectors-01
nabaztag-pcb-green-full functionality-01
Nabaztag--schematics-630159.pdf
Nabaztag--diagram-630165.pdf
NabaztagDeviceMemory.zip
Nabaztag V1 - Connections List-01.docx

from newbaztag.

trcwm avatar trcwm commented on July 19, 2024

Hi Gerrit,

That is very useful information!
I have never seen the blue PCBs. Mine looks the same as your green PCB version.
The schematics will make everything so much easier!

I had figured out the ICSP port and I can confirm it also works with a PICKit II.

My initial idea was to program everything in C/C++, but I realise now that it might be beneficial to try and get something like CircuitPython, MicroPython or maybe LUA running on the Nabaztag. That way it would be easier to customize our little rabbits. What do you think?

Regards,
Niels.

from newbaztag.

NabazNoah avatar NabazNoah commented on July 19, 2024

Hi Niels,

Glad to read that the information is so useful to you, too !

We're making progress !

And thanks for the confirmation that it works with a PicKit II, good to know.

About the programming : As you know there are 2 parts to it :

The first part is programming the PIC inside the Nabaztag, which as far as I found out can only be done in Assembler, C or JAL. It does not need to be a large or complicated program (but programming the PIC is more complicated than I initially thought). I would like to be able to move the ears into certain positions, light the LEDs in different colours and maybe use the head-button for something and access all that functionality through the serial port (UART). The UART port is fast enought for that and the easiest way to connect (no soldering needed).

Regarding sound; I am not sure if the hardware is capable of incorporating that in any easy way, with the OKI chip (I don't think it can handle MP3s) And besides that I am not sure if the UART port is fast enough for handling sound. (Needs some more research)

The second part is programming the WiFi card (most probably some ESP-board) .
For that it would indeed be nice if we could get some form of Python or LUA. Great idea !
It needs to connect to the network in some way and pass the commands to the PIC through the UART port (as that is the easiest way to connect them). Maybe there's some prebuilt functionality to be found somewhere, out there...

It might also be easier to connect the speaker (possibly through a small amplifier) to the Wifi board and make the ESP handle the sound (can it handle MP3s ?), but you might know more about that than I do.
Any extra functionality is possibly easier to incorporate into an ESP board than into the PIC as they are easier to program (especially in Python!) and more up to date with present demands.

One more restriction to take into consideration is that the Wifi board has to work on 3.3 V, as that is the only voltage that is (easily) accessible on the PCB (from UART port or Programmer port). Other voltages are used on the PCB (8V input, 7V -for ear-motors- and 5.4V -for motor driver and amplifier-) but they are not accessible from any pins or other ports.

This would leave us with only basic functionality to program into the PIC.
Can you think of any more ways we could use some of the remaining functions of the PCB (3-way-switch/ Atmel flash chip/ extra PIC functionality/ sound and amplifier) ?

It would be possible to access the second SPI port (the PIC18LF6627 has a second SPI port where the original PIC18LF6525 didn't) by soldering some wires onto the PCMCIA port, but I cannot (yet) think of ways to make that extra effort pay off ... and it would also make it much more difficult for other people to get their rabbits back to life.

These were my thoughts for now,

Regards,
Gerrit

from newbaztag.

trcwm avatar trcwm commented on July 19, 2024

Hi Gerrit,

I have made some progress in the programming. The following is working in a basic form:

  • UART.
  • LEDs.
  • Motors (except for position readback).
  • OKI chip initialization.

The OKI chip cannot do MP3 and it's ADPCM format is rather weird. From the original firmware I have the impression that the PIC does not use interrupts to control the OKI or FLASH and that everything is done using polling.

The OKI chip can play MIDI using it's built-in sample set. Using the ESP to do audio is probably easier indeed. The production PCB has lots of vias or resistors where we can solder wires onto. It's very likely that we can use the internal amplifier for the audio that way.

Too bad that the PIC has <4KB of RAM. Maybe we should use the ESP for sound + scripting engine and use the PIC as a dumb controller just to do the LEDs and motors. The PIC code for that is practically done already! :)

Do you have a recommendation for an ESP board/module?

/Niels.

from newbaztag.

NabazNoah avatar NabazNoah commented on July 19, 2024

Hi Niels,
WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!! WOW !!!
You are a genius !
It's incredible, you already programmed basic functionality.
I was still struggling with initialisation and assembler on PIC micro-controllers and you already programmed most of what we need.
And in C, much more readable than assembler, and understandable, even for me :) !
I LOVE IT !
Already tried it on my Nabaztag and it works !
I have been flabbergasted all day. And too excited to think about programming...
You did it ! YOU DID IT !
Still cannot believe it...
THANK YOU !!!
Regards,
Gerrit

from newbaztag.

trcwm avatar trcwm commented on July 19, 2024

Hi Gerrit,

Glad you like it :)

Yeah, PIC assembler is just awful!

There is still some work to do on the position sensing of the motors. I'm not quite sure how they did that in the original Nabaztag.

I might not bother with the flash chip unless you want to use it. For me it makes more sense to do everything on the ESP board now. Let me know what you think about this.

/Niels.

from newbaztag.

NabazNoah avatar NabazNoah commented on July 19, 2024

Hi Niels,

What a great idea to think of the possibility to use the internal amplifier on the PCB by soldering on some wires, I did not think of that ! In the same way, we can also create a 5.4 V output, by soldering on some wires, which widens the scope of boards we can connect !

The OKI chip and it's weird ADPCM format has been a problem from the early days for many developers who tried using the Nabaztag for playing sound ... I dug up some info on it and attached the results (for your information). I still think it will be easier to use an ESP board for sound though ...

I tried to test the motor encoders for the ears and got nothing but some strange readings. But looking in the datasheet, pin RA4 is not just Digital I/O, but also Timer0 external clock input. And pin RC0 is the external clock input for Timer1/Timer3 ! So I guess Timer0 and Timer1 are used as counters for the encoders. Their logic is not apparent to me yet, but I will look into it again.
I will attach the output the original firmware gave upon holding the button for more than 10 (or 15) seconds on startup. When you pushed the button after that, one ear would move and the serial port would give these readings. Pressing the button again would start the other ear (plus serial output) and the next button-push would slowly blink (dim and brighten) the LEDs.

So far, for now,so long,
Gerrit

Nabaztag-ADPCM-format-links.docx
Nabaztag-SerialReadOut--EARS-positions-original-NabaztagFW.docx
wav2adp.zip

from newbaztag.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.