# Batbuddy's Arduino 3 axis skull controller



## Batbuddy (Sep 3, 2014)

I have been working on this for awhile now and I think I am ready to release this as a BETA level project. I actually have been messing with this for several years and it always gets shoved to the back burner but it is finally working (I think). The hardware configuration is kind of hacky but functional and is based off of Mikojay's Jawduino design. I have put the hardware design on my website along with the code. The concept is a 3 axis control with embedded mp3player and jaw movement all on an arduino UNO or Nano and can fit within the skull itself. I was planning on making a shield board for this but haven't had the time for that yet. This project is kind of technical and will require some basic soldering and Arduino knowledge. Anyway, Here you go... http://batbuddy.org/resources/Halloweenstuff/TalkingSkull.php


----------



## David_AVD (Nov 9, 2012)

Thanks for sharing your project. I'll be sure to check the code out when I have some free time.


----------



## scary rick (Dec 6, 2008)

Awesome thanks for sharing.
Rick


----------



## Batbuddy (Sep 3, 2014)

You're welcome! I hope it helps you with your projects. Let me know if there is any help needed understanding my instructions etc.


----------



## Daphne (Oct 18, 2006)

Wow! This is so far over my head its embarrassing. Great job though!


----------



## Batbuddy (Sep 3, 2014)

Thanks Daphne, I appreciate the compliment! I am sure you could figure it out though. It's just learning a new language...


----------



## Brianaala (Nov 4, 2018)

This is so impressive Bat buddy! I have been working off and on with what you had sent me a while back (mre off than on because life got in the way). But I am so excited/ amazed that you have done the mental gymnastics to pull this off! A lot of folks on various forums said this was impossible and were very discouraging. Thank you so much for your perseverance and sharing knowledge!


----------



## Batbuddy (Sep 3, 2014)

Made some major upgrades to the software. Here it is in action.


----------



## martinisaacanywhere (2 mo ago)

2 yrs layer, any changes or updates? I’m about to start brain surgery on some of my own boney friends. Thanks


----------



## Batbuddy (Sep 3, 2014)

Yes It has been upgraded quite a bit. The latest version is on my website in the same location mentioned above. I have been working with anothe rforum member who has been using it and he has it working. I am going to work on a new Micro controller called XAIO which is supposed to be better and faster so I will post here as that version progresses.


----------



## martinisaacanywhere (2 mo ago)

Batbuddy said:


> Yes It has been upgraded quite a bit. The latest version is on my website in the same location mentioned above. I have been working with anothe rforum member who has been using it and he has it working. I am going to work on a new Micro controller called XAIO which is supposed to be better and faster so I will post here as that version progresses.


I started with just the one servo for talking- I’ve got the whole thing wired up, I set the servo min max, but I’m getting just a ton of chatter from the jaw itself. I’m using a microphone module instead of dfplayer, could that be the issue?


----------



## Batbuddy (Sep 3, 2014)

I have had chatter at times myself and I have found that a lot of the chatter is from the power supply type. Her are three fixes that I have used and had good results with. 1.-If you use batteries (true DC) then the chatter is almost non existent. If it is a transformer or power supply it seems to be worse. Even powering it from a USB cord/ my computer has been chattery. Try a battery pack, I use a LiPo for RC cars or planes. Also some servos are worse than others. 2.- In the code there is a spot whre you can change the array number and it can help with the chatter. It basically limits the travel signal of the servo. This is an array and depending on the servo it may respond better to a wider pulse or a more traditional one of 1 to 2 seconds. The "700" number is the Mseconds that are added together to be the servo pulse width. The "341" number is the analog range of an analog pin divideed by 3. See code snippet below:


```
if(analogRead(1) < 341) audioVal += 700; //Playing with these numbers can improve the response of the Jaw servo to make it look more realistic
        if(analogRead(2) < 341) audioVal += 700; //the original numbers for each of these lines from Jawduino were: analogRead(A0) < 341) audio_value += 60;
        if(analogRead(3) < 341) audioVal += 700; // these settings are working pretty good with my MG90 mini servos: 341) audioVal += 700;
        if(audioVal > 0)
```
3.- The MG90s are pretty cheap ones. I used a genuine Futaba as a test and it was much better.


----------



## martinisaacanywhere (2 mo ago)

Awesome- I got it running! Correction, I had it running with audio out from my laptop direct to the KA module to my actual talking skull with values all calibrated and correct. Then I tried to connect to a new setup using a pan/tilt bracket for biaxial movement and one servo for the jaw - I’m getting some funky values during calibration. I snapped a quick picture. I’m wondering if I have a bad potentiometer or maybe a bad momentary switch. See attached.


----------



## martinisaacanywhere (2 mo ago)

When I get a chance later I’m going to go through this all again and check my connections. I remember having a serial problem before that was related to ground connections. Or a bad board. I’m nervous about connecting the Arduino to usb while the peripherals are connected to powers.


----------



## Batbuddy (Sep 3, 2014)

The serial monitor is set for 9600 Baud. I have it different in the code. (kinda dumb on my part.) I am not sure why I set it at 19200 Baud. I just updated the code. You can either change the serial monitor or update the code. Or if you want to redownload the code, I fixed it there. The bottom line is that they need to match. It is found in the "void setup" Section, next line down.
Serial.begin(19200);
I would change it to:
Serial.begin(9600);
I am flattered that you are using my code and happy to help you succeed with this.


----------

