Connecting NES to Teddy Ruxpin

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

User avatar
thocolate
Posts: 14
Joined: Mon Sep 17, 2018 12:42 pm

Connecting NES to Teddy Ruxpin

Post by thocolate » Sat May 23, 2020 7:26 pm

I am not a hardware person, so I need a little bit of help. For those of you who don't know me, I write Dev Cart Magazine and I'm more of a software person.

I'm trying to connect the 1985 version of Teddy Ruxpin to an NES through the second player controller (using the second player controller as an output device).

The plan is to:

- Gut Teddy Ruxpin. Remove the cassette. Leave wires for eye and mouth motors, power wires, and audio wires. Discard the rest.
- Tear down an NES controller. Plug it into the second player slot. Use an H bridge or whatever is available to connect them.

I would like hacked Teddy to be powered by the NES second controller eventually. A ~3.7 cell phone battery could be used temporarily (I've seen people do this online). Teddy will be able to open / close eyes, open / close mouth, and say something. That's enough for now.

I am stuck because I'm not sure if passing 5V to Teddy from the controller will catch him on fire or make his mouth move a mile a minute, etc. Usually, Teddy is powered by C batteries (1.5v each). It looks like passing ~3v might work, but I'm not sure if the voltage is adjusted using the method I'm thinking of (cell phone battery).

There is also the issue of storing audio. Memblers has a cartridge that stores MP3 audio, but I don't think I could pass that data from the cartridge through the second controller and to Teddy's audio speaker. So, Teddy will have to have some type of chip with audio storage. This isn't a huge issue as long as the chip is limited (bare bones). I don't want to move that much computing off of the NES or what is the point of connecting the NES at all?

Why am I doing this? This is actually a proof of concept for a different project. It's also part of an NES / 6502 course I'm working on that integrates robotics as a final project. Teddy Ruxpin has a lot of the parts I plan on using when I move to the real prototype. I also am not sure how I can handle transferring bits to Teddy through the controller fast enough, but Memblers mentioned disabling the NMI. I plan on working with one byte only. I don't think I have that many things for Teddy to do / say, so it should be sufficient.

If Vi, Brad, Memblers, or InifinteNESLives are available to do some of the work, I might try to do a small Kickstarter. The money would be to used to pay someone to do the work in exchange for hardware to connect NES peripherals using the controller as an ouput device. This would help to prevent the destruction of original NES controllers (by making new hardware). The controller as an output device could be used for more than destroying Teddy Ruxpins. Memblers has a printer hooked up to his NES. Other people are connecting modems, etc to the NES using hacked controllers.
Attachments
TeddyNES.jpg

lidnariq
Posts: 9291
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Connecting NES to Teddy Ruxpin

Post by lidnariq » Sat May 23, 2020 8:04 pm

thocolate wrote:
Sat May 23, 2020 7:26 pm

- Gut Teddy Ruxpin. Remove the cassette. Leave wires for eye and mouth motors, power wires, and audio wires. Discard the rest.
- Tear down an NES controller. Plug it into the second player slot. Use an H bridge or whatever is available to connect them.
The NES controllers don't really have a useful number of outputs. There are three digital signals per from the outside world to the NES, one digital signal from the NES to the outside world (shared between both controllers), and a clock signal per port from the NES to the outside world. To meaningfully drive a selection of motors, you'll need some kind of more sophisticated communication. Simple options include a shift register or you could emit asynchronous serial.
I would like hacked Teddy to be powered by the NES second controller eventually.
The NES, like the SNES, is only officially supposed to source 17mA to the controller. There's no way that Teddy's motors are that low power. You should probably accept needing extra batteries.
Usually, Teddy is powered by C batteries (1.5v each).
Well, how many? How do the motor drivers on the PCB next to the cassette player work? Is there a current-limiting resistor?
Motors sometimes have a voltage rating on them. Do the ones in his head?
There is also the issue of storing audio. Memblers has a cartridge that stores MP3 audio, but I don't think I could pass that data from the cartridge through the second controller and to Teddy's audio speaker. So, Teddy will have to have some type of chip with audio storage. This isn't a huge issue as long as the chip is limited (bare bones). I don't want to move that much computing off of the NES or what is the point of connecting the NES at all?
Unfortunately, electronics have gotten to the point where you almost can't even buy a new device that has less computational power than the NES.
I also am not sure how I can handle transferring bits to Teddy through the controller fast enough,
Real-world motion is slow even in comparison to the NES. You don't really need to worry about bandwidth for control signals. On the other hand, for audio...

https://www.antiqueradios.com/forums/vi ... 6#p1966976 has some details of the audio encoding. Not quite enough to go on without having a functional robot to test against.


As a prototype, you may as well just start with three generic PWM servos and a speaker, which is basically equivalent to Teddy without the stuffed animal part.

User avatar
thocolate
Posts: 14
Joined: Mon Sep 17, 2018 12:42 pm

Re: Connecting NES to Teddy Ruxpin

Post by thocolate » Sat May 23, 2020 8:27 pm

Interesting. I'm encouraged by how fast Membler's NES printer prints despite only two outputs for data. https://www.youtube.com/watch?time_cont ... e=emb_logo

When I was looking at the wires for the motors, it seemed like just running power to them was enough to get them to move. If Teddy's speech was limited, I wasn't sure people would notice the lack of synch much. But, yes, this is an issue and I'm not quite sure how much effort should be put into it.

Teddy takes 4 C batteries. The C batteries are 1.5 volts, but I think they power different things with wires leading to different parts. I have to look at that again.

I think Teddy uses servo motors, so 4.8v? I am still trying to figure this out.

Yes, it could be that Teddy Ruxpin is not the ideal 'robot' for the task, but seems odd since the NES and he have similar birthdays. :D

lidnariq
Posts: 9291
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Connecting NES to Teddy Ruxpin

Post by lidnariq » Sat May 23, 2020 8:52 pm

thocolate wrote:
Sat May 23, 2020 8:27 pm
Interesting. I'm encouraged by how fast Membler's NES printer prints despite only two outputs for data.
That's really just the printer. Sending ASCII to an older printer like that is very fast.
thocolate wrote:
Sat May 23, 2020 8:27 pm
When I was looking at the wires for the motors, it seemed like just running power to them was enough to get them to move.
I mean, sure? Motors aren't a digital sort of thing. Below a current threshold they can't overcome their static friction; above a power threshold they burn out. In between, velocity is roughly proportional to voltage, and torque to current. Being part of a servo doesn't change this.
If Teddy's speech was limited, I wasn't sure people would notice the lack of synch much.
If I've read the link I'd sent before correctly, each of the three axes (eyelids, upper jaw/nose, lower jaw) have an analog control encoded on the tape. Still, you're only talking about 10-40Hz of bandwidth, give or take.
I think Teddy uses servo motors, so 4.8v? I am still trying to figure this out.
They're not modern standard 3-wire servos; they're "controllerless" 5-wire servos, or basically a potentiometer hooked up to a DC motor (I suspect) On Teddy's PCB there's probably an H-bridge or a power opamp or something in a feedback loop from the position sensor for each of the three axes.
Yes, it could be that Teddy Ruxpin is not the ideal 'robot' for the task,
I'm not really saying "build a different robot", but more saying "if you can figure out how drive three modern servos and a speaker, that's the same difficulty"

User avatar
Ben Boldt
Posts: 532
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: Connecting NES to Teddy Ruxpin

Post by Ben Boldt » Sun May 24, 2020 9:19 am

The NES is only going to be able to put out some sort of serial data, of your own design in the NES ROM. You could literally "print" the command message through serial, "turn on motor 1 forward direction", "turn off motor 2", etc. And as you can imagine, you could reduce (or "enumerate") each possible command down to 1 single byte, giving 256 possible commands. This is a pretty purely software-oriented thing you can do in the NES ROM. You will have to think about timings and how to toggle a bit properly to create a serial message. An oscilloscope will probably be necessary to see and check your work.

You will need some logic outside of the Nintendo in order to decode that serial data, turn different parts of your H-bridges on and off, and read back the potentiometers. I think the best way to do that for a software person is to use a microcontroller, for example an arduino. You connect digital outputs to your H-Bridges and connect the potentiometers to ADC inputs. Your code ("firmware") inside the microcontroller listens for serial data and reads ADC values of the potentiometers (for example, you get a value 0-255 proportional to the position of the motor). Based on this information, the code figures out when to turn the motors on and off, and what direction.

I recommend getting an NES controller extension cable from eBay instead of cutting off the cord of an NES controller.

lidnariq
Posts: 9291
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Connecting NES to Teddy Ruxpin

Post by lidnariq » Sun May 24, 2020 10:39 am

One silly thought is that maybe if you can reverse-engineer the PPM encoded data on the audiocassette, you might be able to use the NES to recreate this control signal, and just reuse Ruxpin's entire circuitry. You could then plug the NES's audio output to the other channel inside.

User avatar
thocolate
Posts: 14
Joined: Mon Sep 17, 2018 12:42 pm

Re: Connecting NES to Teddy Ruxpin

Post by thocolate » Sun May 24, 2020 11:10 am

Ben Boldt wrote:
Sun May 24, 2020 9:19 am
The NES is only going to be able to put out some sort of serial data, of your own design in the NES ROM. You could literally "print" the command message through serial, "turn on motor 1 forward direction", "turn off motor 2", etc. And as you can imagine, you could reduce (or "enumerate") each possible command down to 1 single byte, giving 256 possible commands. This is a pretty purely software-oriented thing you can do in the NES ROM. You will have to think about timings and how to toggle a bit properly to create a serial message. An oscilloscope will probably be necessary to see and check your work.

You will need some logic outside of the Nintendo in order to decode that serial data, turn different parts of your H-bridges on and off, and read back the potentiometers. I think the best way to do that for a software person is to use a microcontroller, for example an arduino. You connect digital outputs to your H-Bridges and connect the potentiometers to ADC inputs. Your code ("firmware") inside the microcontroller listens for serial data and reads ADC values of the potentiometers (for example, you get a value 0-255 proportional to the position of the motor). Based on this information, the code figures out when to turn the motors on and off, and what direction.

I recommend getting an NES controller extension cable from eBay instead of cutting off the cord of an NES controller.
I actually didn't know that extension cables existed for the NES, so that is a GREAT idea. I do have some controllers where the contacts for 'SELECT' and 'START' have pretty much corroded away entirely and some of the boards are cracked, so I might cannibalize those first, but that is a really good idea. I would like to hold off on the oscilloscope unless there's a good, cheap one available. I've never actually used one before.

User avatar
thocolate
Posts: 14
Joined: Mon Sep 17, 2018 12:42 pm

Re: Connecting NES to Teddy Ruxpin

Post by thocolate » Sun May 24, 2020 11:19 am

lidnariq wrote:
Sun May 24, 2020 10:39 am
One silly thought is that maybe if you can reverse-engineer the PPM encoded data on the audiocassette, you might be able to use the NES to recreate this control signal, and just reuse Ruxpin's entire circuitry. You could then plug the NES's audio output to the other channel inside.
I am going to completely discard the cassette and Teddy's circuit board. So, it will have to be replaced with a raspberry pi or CHIP computer, etc. I will use only:

- the eye motors
- the mouth motors
- the power cables / wires
- and the speaker

I would rather not use an Arduino because I don't think I need that much stuff, but I've considered it. Would try to keep the chip around $10.

lidnariq
Posts: 9291
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Connecting NES to Teddy Ruxpin

Post by lidnariq » Sun May 24, 2020 11:26 am

thocolate wrote:
Sun May 24, 2020 11:19 am
I am going to completely discard the cassette and Teddy's circuit board.
But that's my point. You don't have to. There's a lot of circuitry on the board that you could reuse, and it lets you keep more of the "authentically 1985" vibe going on.
I would rather not use an Arduino because I don't think I need that much stuff, but I've considered it. Would try to keep the chip around $10.
Once upon a time, an arduino was drastically less CPU than a raspi, and the bare atmegas were a lot cheaper and basically equivalent. I know modern arduinos have many-hundred-MHz ARM cores now, tho.

User avatar
Ben Boldt
Posts: 532
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: Connecting NES to Teddy Ruxpin

Post by Ben Boldt » Sun May 24, 2020 12:07 pm

I was thinking something like this Arduino Nano:

https://www.aliexpress.com/item/32341832857.html

Or like this Arduino Uno:

https://www.aliexpress.com/item/32665372585.html

Should work well and be within the $10 range. These should be available on eBay as well for a similar price. Using an Arduino/demo board instead of a bare chip just makes connections convenient and saves you a bit of hardware work. The board also contains a voltage regulator to power the microcontroller. If you do pursue that, we should think about whether you have to level shift the signal coming from the NES controller port. (i.e. might need a diode and resistor or something to keep it safe.)

User avatar
thocolate
Posts: 14
Joined: Mon Sep 17, 2018 12:42 pm

Re: Connecting NES to Teddy Ruxpin

Post by thocolate » Sun May 24, 2020 12:28 pm

lidnariq wrote:
Sun May 24, 2020 11:26 am
thocolate wrote:
Sun May 24, 2020 11:19 am
I am going to completely discard the cassette and Teddy's circuit board.
But that's my point. You don't have to. There's a lot of circuitry on the board that you could reuse, and it lets you keep more of the "authentically 1985" vibe going on.
I would rather not use an Arduino because I don't think I need that much stuff, but I've considered it. Would try to keep the chip around $10.
Once upon a time, an arduino was drastically less CPU than a raspi, and the bare atmegas were a lot cheaper and basically equivalent. I know modern arduinos have many-hundred-MHz ARM cores now, tho.
It might be interesting to keep the original circuit. I'll keep it in the back of my mind. It just seemed easier to dump it because if I'm not going to be making the cassette tapes, using the tape sensor, connecting Grubby, etc ... I don't know. I liked the idea of pitching the cassette drive and board or reselling them to someone else trying to repair a broken Teddy. I'll keep that in the back of my mind, though, especially because it might be cheaper. I might also just have to feed audio files if the original circuitry suffices.

However, when I move to Stage 2, there will be no Teddy Ruxpin and I'll have to start over and get a small computer.

User avatar
thocolate
Posts: 14
Joined: Mon Sep 17, 2018 12:42 pm

Re: Connecting NES to Teddy Ruxpin

Post by thocolate » Sun May 24, 2020 12:36 pm

Ben Boldt wrote:
Sun May 24, 2020 12:07 pm
I was thinking something like this Arduino Nano:

https://www.aliexpress.com/item/32341832857.html

Or like this Arduino Uno:

https://www.aliexpress.com/item/32665372585.html

Should work well and be within the $10 range. These should be available on eBay as well for a similar price. Using an Arduino/demo board instead of a bare chip just makes connections convenient and saves you a bit of hardware work. The board also contains a voltage regulator to power the microcontroller. If you do pursue that, we should think about whether you have to level shift the signal coming from the NES controller port. (i.e. might need a diode and resistor or something to keep it safe.)
Oh ... I actually haven't seen the Adurino Nano before, but yes, I think that would be a good option. Is the Aduino Uno too much, though? It might be helpful to start with Arduino Uno and scale down if I can get things working. There aren't many wires coming in from the NES second controller.

User avatar
Ben Boldt
Posts: 532
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: Connecting NES to Teddy Ruxpin

Post by Ben Boldt » Sun May 24, 2020 1:03 pm

I think the nano is all you need for this. It can actually be a pain to switch to a different microcontroller. Also, the nano looks like it has a 5V microcontroller which will be more compatible to the Nintnedo (connect directly - no level shifting needed).

Also, as far as not having an oscilloscope. If your serial is slow enough, you can connect it to a sound input port on a computer, record it, and then look at the recorded sound wave. You may need a couple resistors to do that.

tepples
Posts: 21943
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Connecting NES to Teddy Ruxpin

Post by tepples » Sun May 24, 2020 4:05 pm

Might the current owner of the Teddy Ruxpin product identity object? I've read that one company to hold the rights successfully sued third-party publishers of compatible tapes.

User avatar
thocolate
Posts: 14
Joined: Mon Sep 17, 2018 12:42 pm

Re: Connecting NES to Teddy Ruxpin

Post by thocolate » Sun May 24, 2020 9:36 pm

tepples wrote:
Sun May 24, 2020 4:05 pm
Might the current owner of the Teddy Ruxpin product identity object? I've read that one company to hold the rights successfully sued third-party publishers of compatible tapes.
Oh, no. We're not going to be doing anything with tapes. I'm not selling anything related to Teddy Ruxpin nor producing an NES cartridge that works with him for other people. It's more of a 'if I can get this to work with an existing animatronic, I can get it to work with this one'. But I'm still working on the prototype my own. The main issue now is -- can I get the NES to send signals to an animatronic. Teddy has all of the stuff I need, so I'm starting with one that is 'broken'. It's not that different from all of the other Teddy hacks.

Post Reply