Thursday, September 22, 2011
Package from Amazon
Friday, September 16, 2011
Tiny, tiny screws
Wednesday, July 13, 2011
I just want to say one word to you. Just one word. Are you listening? Plastics
I bought a few small sheets a few weeks back from a hobby store. The stuff is incredibly easy to cut, shape and bond together and of course it is fairly light. This will be the basic material that a lot of the pieces of the outfit will be made of.
I contacted a local plastic supplier to see about buying the material in sheets (4'x8'). By buying it in larger sheets instead of from a hobby store will cut the price by 75%. I'm thinking of buying multiple sheets of different thickness to stock up a bit for different projects.
I hope this weekend to put together a vacuum forming table to help in the creation of the parts. This should really help with the overall construction time of not only this project but future ones as well.
Monday, July 11, 2011
Haven't been idle...
* Attended a meeting of the local microcontroller/robotics group. As expected a bunch of geeks. So I fit right in. Some interesting ideas for future projects but nothing with the Steampunk outfit.
* Visited a store in Tampa called Practical Electronics. A definite step up from Radio Shack and will be a good source for when I need certain parts that I'd prefer not to mail order.
* Thought of a way to cut the number of lines connecting from the back pack to the head piece by quite a bit. Its going to drop from 16 lines down to 7. Basically I am going to use 4 lines to select which servo to talk to. The other 3 will be power, ground and signal.
* Begining to research batteries. I am probably going to go with 14V batteries to supply the hood. I need to measure the amperage the servos require so I can get a better idea of the size of battery I need.
* Purchased a cheap, little robot kit as a little study in some possibilities. It was about $12 and its basically a small insect robot that tracks a local bright light and tries to move to it. I figured the kit would give me some ideas as well as a chance to brush up on my soldering skills.
Sunday, July 3, 2011
Programmed first chip
What this means is that I can now take this chip, attach it to a circuit board, provide some power and I have my servo controller. Too damn cool...
Here is a video of it in action. The blinking LED is the heartbeat and the green light indicates normal operation. The other (unlit) red LED is to show test mode.
Saturday, July 2, 2011
Program for mouth servos is done
I picked up some plastic to start trying to make some of the actual physic part of the outfit. May play with that for a bit.
Friday, July 1, 2011
Almost done with mouth microcontroller
I only need to finish the anger code (which will be easy because I can use the test code) and then set up a few pins to allow me to hook up a few buttons so that I can trigger the test or anger modes while wearing the outfit. I know the videos may not be exciting but it helps me mentally because it makes me prove my progress... :)
Things to watch for in the video...
At the beginning, the card is reset and you see the servo to both extremes rapidly (the servo is in middle of the shot, very small.) It then moves back and forth very slowly. You can see the signal controlling it on the screen. Also, a little hard to make out, there is one LED that stays on that indicates the test mode. The other blinks for the heartbeat. Halfway through the video when the card drops itself to normal mode, a different LED lights to show this. The LEDs will be not a visible part of the outfit but just used for diagnostics when something fails.
Wednesday, June 29, 2011
Code rewrite underway
Making progress with the code rewrite. The code is much cleaner, better organized, easier to maintain, etc... I'm not done with it but made very time and getting faster at coding the chip.
I did manage to get the normal mode of the chip working. That is the mode that will allow the chip to manipulate the mouth piece of the outfit like I want. In addition, I implemented the status lights in the code.
As a reminder from the previous post, I want some status lights so that once I hook this up to the outfit, it gives me the ability to see that the card is functioning as expected. The following video isn't all the exciting but it shows 3 important things.
First, on the oscilloscope you will see the signal that drives the servos. Although I am showing only one signal, in reality there is 12 signals coming out so it could drive 12 servos right now.
The next thing is the blinking led. That light is being blinked by the code and it lets me know that things are still running. In computer terms, that is a heartbeat.
The final item to notice is the other LED remaining lit. That tells me the board is in normal operating mode. I plan on implementing two other modes. One is a test mode that I can use to make sure all the servos are working and at the same speed. The other mode will be an "angry" mode that I can trigger while in costume to simulate the character being angry. Again, there will be an LED for either of those modes to help me diagnose any problems.
Tuesday, June 28, 2011
Now that I have some experience...
Easier than I expected.
Next on the agenda...
Monday, June 27, 2011
Now with video
Woot!
Just as I thought, the oscilloscope worked its magic and I was able to get past the servo problems I've been having. Took only a few minutes to get the timing signal to work properly so that I could get the servo to move. In this shot, the oscilloscope is showing the signal peak length at 1.76ms. For the servo to be positioned, the value is set between 1 and 2ms. Woot! I will publish a later update with some video when I'm able to expand on these results.
Sunday, June 26, 2011
Some changes
Friday, June 24, 2011
Still waiting on the Oscilloscope and some new information
Monday, June 20, 2011
Worked on the chest circuitry some more...
Sunday, June 19, 2011
I feel vindicated (to a small degree)
Saturday, June 18, 2011
Heart beat circuit
Since I can't do much with the micro-controller until the oscilloscope arrives, decided to change my attention to something else. In this case, I am working with the heart beat special effect.
Oscilloscope on the way...
Wednesday, June 15, 2011
Grrr... Don't want to go to sleep
An example of what has been arriving in the mail...
Monday, June 13, 2011
More coding progress and toys arrived.
The second bit is that I rewrote the code for the microcontroller. Still having a lot of fun with it. I am actually very close to the code being at a truly testable stage. I am going to try and hook it up to a real servo soon to see if I get the results I am hoping for.
In the meantime, a new copy of the code. Main thing missing is a true randomization of the values of the servos.
I will continue to post the code as I develop it. I figure might be useful for someone else playing around with this stuff to have examples. Fun for me to show off as well... :) Here is the code up to this point.
;**********************************************************************
;
; Filename: MouthServos.asm
; Date: 6/14/2001
; File Version: v 0.5
;
;
;**********************************************************************
;
; Files required: P16F877.INC
;
;
;
;**********************************************************************
;
; Purpose:
; Program will drive a set number of servo motors. These servos
; will be moved to random locations for a duration of 1 to 3
; seconds. At that end of that period, they will move to a new
; location and the process repeats.
;
; Additional Info:
; Servo pulse: high pulse 1ms to 2ms in length determining servo position
; with a low pulse of approximately 40ms between high pulses.
;
; Completed:
; Servo array implemented (currently 2 elements but can be easily expanded up to expected 12)
; Init of servo array with preset values for new positions. randomizer not implemented yet.
;
; ToDo:
; Randomize new position and duration.
; Generate pulse based upon values.
;
;
;**********************************************************************
list p=16f887 ; list directive to define processor
#include; processor specific variable definitions
; '__CONFIG' directive is used to embed configuration data within .asm file.
; The labels following the directive are located in the respective .inc file.
; See respective data sheet for additional information on configuration word.
__CONFIG _CONFIG1, _LVP_OFF & _FCMEN_ON & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_ON & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT
__CONFIG _CONFIG2, _WRT_OFF & _BOR21V
SERVOCOUNT EQU D'20'
MINTIMER EQU D'1000' ;smallest pulse for one end of servo positioning
MAXTIMER EQU D'2000' ;largest pulse for other end of servo positioning
TOTALTIMER EQU D'40000' ;max 40ms
; declare servo arrary
VARIABLES UDATA
;***************** Servo array start ****************
servo_start res 0
servo1_cycle res 1
servo1_duration res 1 ;server duration (value * 8) / 1000 = milliseconds
otherservos res 39 ;19 more servos
;***************** Servo array end ******************
temp_fsr res 1 ;used to swap out fsr
loop_count res 1 ;used in looping operations
first_time res 1 ;used to indicate first run through main loop
current_bit res 1 ;indicates current bit on current port to use
current_port res 1 ;indicates current port
debug_port res 1 ;used for debugging port problem, remove for final release
;**********************************************************************
RESET_VECTOR CODE 0x0000 ; processor reset vector
nop
goto start ; go to beginning of program
MAIN_PROG CODE
start
bsf first_time,0
bsf STATUS,RP0 ;move to bank 1
clrf TRISA ;set porta to all output
clrf TRISB ;set portb to all output
clrf TRISC ;set portc to all output
movlw b'00000010' ; configure Timer0. Time factor of x8
movwf OPTION_REG ; Maximum Prescaler
bsf STATUS,RP1 ;move to bank 3
clrf ANSEL ;set to digital instead of analog
clrf ANSELH
bcf STATUS,RP0 ;move to bank 0
bcf STATUS,RP1
BEGIN_PULSE
movlw b'00000001'
movwf current_bit ;set current bit to first bit.
movlw PORTA
movwf current_port ;starting port of A
movlw SERVOCOUNT
movwf loop_count ; loop for the number of servos we are using.
movlw servo_start ; start of the servo array
movwf FSR ; move the address into FSR
clrf T1CON
movlw 0x63 ;setup timer1 to lsat 40ms
movwf TMR1H
movlw 0xC0
movwf TMR1L
bsf T1CON,TMR1ON ;start the timer
bcf PIR1,TMR1IF ;clear the interuppt
BEGIN_SERVO_LOOP ;Do this for each servo
btfsc first_time,0 ;if first time, reset the servos
goto BEGIN_RESET_SERVO
decfsz INDF ;decrement the servo count. if not 0, skip to pulsing
goto BEGIN_PULSE_SERVO_HIGH
BEGIN_RESET_SERVO ;Its either first time or end of cycle, reset the servo to new duration and cycle
movlw d'32' ;set a new servo count TODO: Random value
movwf INDF
incf FSR
movlw d'187' ;move to center position of servo high byte TODO: Random value
movwf INDF
decf FSR
END_RESET_SERVO
BEGIN_PULSE_SERVO_HIGH
movf FSR,W
movwf temp_fsr ;save the fsr
movf current_port,W
movwf FSR ;FSR now has the correct port
movf current_bit,W
movwf INDF ;sets the appropriate bit. since only one servo is high at a time, no need to mask bits
movf temp_fsr,w
movwf FSR ;restore the FSR to point at servos
incf FSR ;move to the duration of the servo
movf INDF,W ;get the duration
sublw 0xFF ;max value of timer0
movwf TMR0 ;set the timer.
bcf INTCON,TMR0IF ;clear the flag interupt flag.
WAIT
btfss INTCON,TMR0IF ;is interupt set yet?
goto WAIT
incf FSR
END_PULSE_SERVO_HIGH
BEGIN_PULSE_SERVO_LOW
movf FSR,W
movwf temp_fsr ;save the fsr
movf current_port,W
movwf FSR ;FSR now has the correct port
clrf INDF ;pulse the port low
BEGIN_UPDATE_CHANNEL
;****** move to next channel (bit/port) for next servo
rlf current_bit
btfss STATUS,0 ;is carry bit set?
goto END_UPDATE_CHANNEL
bcf STATUS,0 ;clear the carry bit
incf current_port ;increment to the next port.
movlw b'00000001'
movwf current_bit ;reset to first bit.
END_UPDATE_CHANNEL
movf temp_fsr,W
movwf FSR ;restore the FSR to point at servos
END_PULSE_SERVO_LOW
decfsz loop_count,1 ;any servos left to process?
goto BEGIN_SERVO_LOOP
END_SERVO_LOOP
WAIT2
btfss PIR1,TMR1IF ;is interupt set yet?
goto WAIT2
bcf first_time,0
goto BEGIN_PULSE
END_PULSE
end