Вы находитесь на странице: 1из 63

Some Ideas On Using The Listening Car

This article will show how to hook up The Listening Car in various scenarios after it's assembled, take a look at how it works, then discuss some software to make it perform its tricks There is also a component and soldering guide on page !" #ssembl$ is eas$ %elow are the hands of &'($ear(old Tati$ana assembling the first board)

She had virtuall$ no problems at all building the board, the first board she has ever assembled #ssembl$ instructions were updated and clarified as she progressed *er resulting + inch b$ + inch Listening Car board is shown below)

2 There are, of course, limitations to the circuit The Listening Car works onl$ with ,C devices -ower should be limited to a ma.imum of about /!0 watts per channel Some e.amples) 2a.imum Current, #mps ! 4probabl$ too low5 !0 &0 4practical minimum5 /! &/ 4suggested minimum5 /0 6 /7 &0 7 '0 4ma.imum5 6 '' 1olts 3atts /!0 /!0 /78 + /78 + /!0

The first thing we will look at is the wiring and software used in the video The following shows how to hook up the Listening Car to get the displa$ shown in the video, or to use it in a background lighting s$stem without the addition of audio input

' The following single(suppl$ &/ volt device wiring can be used where onl$ one suppl$ is available, such as in a car %lack lines represent ground and red lines represent 9&/ volts ,evice 7 can be used for another light or other device)

7 The following shows what the power connection in the :ouTube video looks like The s$stem in the :ouTube video uses three L;, light strips, red, green and blue on ,evice &, / and ' respectivel$, each with its own suppl$ The same connections could be used in other applications as well)

<ote that onl$ one L;, strip for each color was used in the video It used L;, strips like a =ameco /&'&+!' &/ volt red L;, light strip, a /&'&!78 &/ volt green L;, light strip and a /&'&!!" &/ volt blue L;, light strip :ou could use, sa$, &/ such strips for each color That's more than &00 watts for each color and over '00 watts with all three, and the Listening Car has a lot more power to spare

! 3ire the three %ackground controls to the U<O in the following manner These connections, along with the -32 4-ulse 3idth 2odulation > see below for more detail 5 connections on the ne.t page and the static?sweep switch on page &' are all $ou need if all $ou want is variable background lighting or to sweep the colors from low to high The %ackground controls allow $ou to ad@ust background brightness for each color, or to ad@ust the step siAe for the sweep of each color, depending on switch settings to be discussed shortl$)

;ach of the three potentiometers is !B ohms, such as the =ameco /8&8" The clockwise side of each, on the left side of the above schematic, is connected to ! volts, and the counterclockwise side to ground #s a matter of fact, all counterclockwise terminals of all of the potentiometers discussed in this document are connected to ground It would be easiest to connect them all together then to ground on one of the boards #lso, make sure the grounds of all three boards are connected to each other The wipers of the Ced, Dreen and %lue controls go to #', #7 and #! respectivel$ The ne.t page shows the Listening Car to U<O interface $ou can use whether $ou are using onl$ the background controls or also including the analog sections of the The Listening Tree

+ 3ire the Listening Car board to the U<O according to the following whether $ou are using onl$ the background controls or including the analog sections of the Listening Tree Use the ! volt regulator connection when running the s$stem independent of the programming computer The U<O can get its power from the programming computer's US% port during testing)

" # full s$stem including analog sound input includes the above and combines The Listening Car with The Listening Tree 4see below for more options > such as connecting directl$ to the speaker output of a stereo s$stem without using The Listening Tree5 # !B inter(stage volume control is inserted on the Listening Tree board in the place of C/ in the preamplifier It will serve as the master audio volume control -lease note the location of the clockwise and counterclockwise terminals The wiper is in the middle)

6 <ow connect -reamp Out to Eilter In on the Listening Tree board)

8 The following pages show how to hook up the Listening Car board, the Listening Tree board and the U<O to each other To make it easier, I have broken the wiring up into sections It would probabl$ be a good idea to get some spools of different colors of hook(up wire // gauge solid wire works best Standard breadboard @umpers are a little short, which can make things tight Life is a lot easier with wires that are about one foot long It would also be a good idea to print this document then highlight each step as it is completed Connector pin numbers are included in the drawings since it's sometimes easier to count pins rather than to tr$ to read print covered b$ wire Ced, Dreen and %lue lines are used for the respective lighting sections %lack is used for ground and orange for the ! volt section Of course the circuit doesn't care what color the wires are, but using representative colors should help if there are an$ problems

&0

Ced Channel) Connect a wire from The Low -ass Out of the Listening Tree board to the Low -ass In of the Listening Car board Connect another wire from the Low -ass Out of the Listening Car board to the Low -ass ,etector In on The Listening Tree board Connect another wire from Low -ass ,etector Out on the Listening Tree board to the clockwise side of the !B potentiometer Connect the counterclockwise side of the potentiometer to ground Connect the wiper of the potentiometer to Sample *old & In on the Listening Car board Connect another wire from Sample *old & Out on the Listening Car board to #0 on the U<O board Connect another wire from the -32 F8 output of the U<O to -32 ,evice & In on the Listening Car board

&&

Dreen Channel) Connect a wire from the %andpass Out of the Listening Tree board to the %andpass ,etector In on The Listening Tree board Connect another wire from %andpass ,etector Out on the Listening Tree board to the clockwise side of the !B potentiometer, then the wiper to Sample *old / In on the Listening Car board The counterclockwise side of the pot goes to ground Connect another wire from Sample *old / Out on the Listening Car board to #& on the U<O board Connect another wire from the -32 F&0 output of the U<O to -32 ,evice / In on the Listening Car board

&/

%lue Channel) Connect a wire from The *igh -ass Out of the Listening Tree board to the *igh -ass In of the Listening Car board Connect another wire from the *igh -ass Out of the Listening Car board to the *igh -ass ,etector In on The Listening Tree board Connect another wire from *igh -ass ,etector Out on the Listening Tree board to the clockwise side of the !B potentiometer Connect a wire from the wiper of the pot to Sample *old ' In on the Listening Car board Connect another wire from Sample *old ' Out on the Listening Car board to #/ on the U<O board Connect another wire from the -32 F&& output of the U<O to -32 ,evice ' In on the Listening Car board Connect the counterclockwise side of the potentiometer to ground

&'

Connect onl$ the sweep on?off switch and its &0k resistor, along with ! volts and ground to the U<O if $ou are using the Listening Car board onl$ for background lighting Connect the ground on the IO% Connector of the Listening Car board to one of the grounds on the U<O Connect one of the grounds on the Input?Output connector of the Listening Tree board to one of the grounds on the U<O Connect 98 1olt Cegulator Out on The Listening Car board to the 9 power input of The Listening Tree board Connect (8 1olt Cegulator Out on The Listening Car board to the > power input of The Listening Tree board Connect the Dround between the 9 and > Cegulator outputs on The Listening Car board to the power ground of The Listening Tree board Connect ! 1olt Cegulator Out on The Listening Car board to !1 on the U<O board 4use the US% port to power the U<O while testing if $ou wish5

&7 The sweep switch allows digital pin " to go high when off, enabling GsweepH, which is the automatic changing of colors -in " is pulled low when the switch is turned on, which puts the program in static mode, which simpl$ changes the brightness level of each color with movement of the background controls The analog switch takes pin 6 high when open, which enables analog #nalog is turned off when the switch is turned on The other sides of the switches connect to ground, which can be the counterclockwise side of the master volume control The resistors go to ! volts, which can be the clockwise side of the background potentiometers The two switches provide four modes of operation) Sweep Switch Analog Switch Off Off Off On On Off On On

Mode Sweep with #nalog Sweep with no #nalog Static with #nalog Static with no #nalog

3hen sweep is turned on, each color is made to increase and decrease in intensit$ b$ the U<O software 2inimum intensit$ is preset to 0 and ma.imum to to a variable value depending on other settings for each color The value sent to the output changes the -ulse 3idth 2odulation 4-325 characteristics to change brightnesses 4see below for more on -325 *ow fast a color changes from one brightness level to another depends on the siAe of the step taken between changes The larger the step, the faster the change One color can be increasing at one step rate while the others are decreasing at other rates The %ackground controls modif$ the step siAe used to move between minimum and ma.imum 3ith a control full$ counterclockwise, the step siAe is & 3hen set low, the colors change slowl$ The Colors almost appear to be flashing when a control is full$ clockwise Care should be taken with people who are susceptible to photosensitive epileps$

&! In the static mode, the background controls simpl$ set the brightness of each color This allows a person to set the background to almost an$ color desired The analog switch causes the software to input or ignore analog input from the Listening Tree It is possible to move from a purel$ static color displa$, to one that changes slowl$ or rapidl$ over time, to a purel$ analog driven displa$ to an analog displa$ with a static background to an analog driven displa$ with a changing background # control panel cover is shown on the ne.t page

&+ The following is the bo. panel I built for the lighting s$stem It's not beautiful, but it does the @ob)

The Listening Car and Listening Tree boards and U<O can be mounted in another bo. of some sort, or $ou might want to combine ever$thing in one bo. %e sure to provide adeIuate ventilation, and ma$be even a fan :ou will be able to get a huge range of lighting patterns using the controls

&" The #udio controls for each of the colors are the !B potentiometers in the schematics between the outputs of the Listening Tree detector outputs and the Listening Car Sample *old inputs The 2aster #udio control is the inter( stage control in the Listening Tree preamp as described earlier It provides overall level The software gives a higher priorit$ to the audio than to the background brightness when audio is enabled Software to run the s$stem can be downloaded here *ighlight and cop$ the code $ou downloaded, click ;dit?Select #ll in the #rduino interface, then click ;dit?-aste Click Eile?Save #s, then cop$ and paste LCJThreeSwJ3ith#nalog#nd-arameterControl into the file name blank, or an$ name $ou wish 4this one means Listening Car Three Sweep 5 :ou should see code that starts like this)
?K LCJThreeSwJ3ith#nalog#nd-arameterControl Draduall$ fades on ' lights on then fades them off in seIuence #nd adds analog input #nd control of step siAe for each color via potentiometer inputs K? ?? Some will note that a device channel class could be set up ?? I like to spread things out a little before building a class, ?? but go for it and let me know how it worked if $ou like ?K ,eclare input?output pin variables for the U<O 2ost variables are declared as integers 4GintH5 which is a number that can accept limited positive and negative numbers, but with no fractional parts) 1ariables for -32 pins 8, &0 and && 1ariable for switch input pin to select between sweep and static #nalog ;nable -in 1ariable to declare pin used for analog on?off K? ?? -in " is connected to the Sweep?Static switch, and pin 6 to the #udio on?off switch int Sweep;nableJ-inJ" L "M int #nalog;nableJ-inJ6 L 6M

&6
?? The red pwm signal will be on pin 8, green on &0 and blue on && int CedJ-32J-inJ8 L 8M int DreenJ-32J-inJ&0 L &0M int %lueJ-32J-inJ&& L &&M void setup45 N pin2ode4Sweep;nableJ-inJ", I<-UT5M pin2ode4#nalog;nableJ-inJ6, I<-UT5M pin2ode4CedJ-32J-inJ8, OUT-UT5M pin2ode4DreenJ-32J-inJ&0, OUT-UT5M pin2ode4%lueJ-32J-inJ&&, OUT-UT5M O

?? sets the sweep digital pin as input ?? sets the audio on enable digital pin as input ?? red -32 output ?? green -32 output ?? blue -32 output

??Serial begin48+005M ?? set up serial for test ( un(remark for testing ( remark for production

Click on Tools?Serial 2onitor for testing Once testing is done, rem out Serial begin48+005M like this)
?? Serial begin48+005M

to disable serial monitoring There is another section of code for testing that starts like this)
?? ?K single(line remark for testing ( remove for production SerialCount 9L ,ela$TimeM if4SerialCount PL &0005 N SerialCount L 0M Serial print4 QCedCaw1alue L Q 5M ?? literal string

It has a single(line remark 4??5 that effectivel$ Gturns offH the beginning of a section that is remarked out with a block comment sign 4?K5 Cemove the single(line comment to turn off serial transmission used in testing

&8 There is a similar line at the end of the block)


Serial println4 %lueJ-32J1alue 5M ?? %lueJ-32J1alue value Serial print4 Q,ela$Time L Q 5M ?? literal string Serial print4 ,ela$Time 5M Serial println4 QRnLLLL (? 2ethod LLLLLLLQ 5M ?? literal string with pre?post Rn O ?? single(line remark for testing ( remove for production K?

#gain, remove the single(line remark 4or comment5 sign 4G??H5 after testing # block of code can also be remarked or unremarked a b$ highlighting a section, then clicking ;dit and then Comment ? Uncomment in the #rduino interface 4some call it comment while others of us call it remark5

/0 The code has man$ variables declared Eeel free to modif$ the code to do other than change step siAe :ou could, for e.ample, use what are currentl$ audio controls to change other parameters in the color sweep routine, such as ma.imums and minimums for each color The$ could feed into #0, #& and #/ in the place of the audio signals, to produce a control for track lighting, etc :ou could even add more controls as suggested below :ou could @ust as easil$ use the board to control ,C motors 4for a total of up to a little over & horsepower with all 7 device channels being used5 :ou can download LCJThreeSwJ3ith#nalog#nd-arameterControl then simpl$ drop into the U<O 4and probabl$ call it something else5 3hile it's not absolutel$ necessar$ to know how it works, it's a good idea if $ou want to modif$ it for $our particular application To that end, the code is prett$ heavil$ commented The light bo. in the video is simpl$ a wooden bo. -lease note that the Listening Car has enough power to use L;, strips to turn a whole wall or ceiling into a light bo. if $ou wishS & Det an 6(foot length of & inch b$ 7 inch wooden plank / Cut the wood into Two /7 ! inch pieces and Two /' ! inch pieces 4most home improvement places will cut it for $ou5 ' <ail or screw the pieces together with the short ones inside the long ones That will give $ou a frame of about /7 inches b$ /7 inches, open on the front and back 7 Det a cheap, white, translucent shower curtain from a dollar store Eold it to fit and nail it to the front of the bo. I used two thicknesses held down with thumb tacks

/& ! Det a cardboard bo. that will fit the back of the wooden bo. when the cardboard bo. is not assembled 4left flat5 -ut $our wooden frame on it, mark the cardboard and cut it to siAe + Cover one side of the cardboard with aluminum foil I used a glue stick and staples to hold it down ,o the same with the inside of the wooden frame

//
" ,raw an outline & ! inches inside the parameter of the cardboard on the foil side Beep the L;, strips against the foil inside the outline $ou have drawn This will keep them out of the wa$ of the wooden frame -unch holes in the cardboard and use tie(wraps or pieces of hook(up wire to hold the L;, strips down Turn the strips so that the L;,s point awa$ from the foil 4as best as possible > it can be a daunting task5 The strips can be placed in an$ pattern desired, such as a spiral, a figure 6 or random pattern 4mine ended up looking like a shin$, dead snake5 Optionall$, put crinkled pieces of foil under the L;, strips, shaped to be reflectors I used both the back foil and reflecting foil Shown below is red with part of it backed with foil reflectors <otice the apparent increased intensit$ of the strip sections with the reflectors The picture shows the red strip before it was completel$ backed with reflectors The full length of each of the three L;, strips were treated in the same manner The reflectors can even be made common to more than one color, which will tend to blend them)

CAUTION: PLEASE DO NOT USE HALOGEN UL S SUCH AS THOSE SUGGESTED !O" TESTING IN THE ASSEM L# INST"UCTIONS$ THE"E IS A %E"# GOOD CHANCE #OU &ILL SET THE &HOLE THING ON !I"E' ALONG &ITH #OU" HOUSE$

/' 6 Cut notches in the wooden frame to allow the L;, strip power wires to get through I drilled holes near the edge, then cut them out with a hand saw to make notches the wire could go under 8 <ail or screw the cardboard with the L;, strips facing the shower curtain cover on the front side)

That's how to hook up the Listening Car and Listening Tree so the$ will work like the video 2ore ideas follow

/7 #s noted above, $ou can power The Listening Car board with various voltage supplies Eor e.ample, $ou might want to use a =ameco /&'&!"' /7 volt or a /&'&+!' &/ volt red L;, light strip, a /&'&!78 &/ volt green L;, light strip and a /&'&!!" &/ volt blue L;, light strip, along with a &! volt motor connected to the fourth channel to run a mirror <o problem =ust hook up the power supplies to their respective 1ins, the 9 side of the device to the ,evice terminal and the other side to the ,rain terminal and the ground of each power suppl$ to its respective ground input The red lines represent positive sides of power and devices, and the black lines the negative or ground sides %e careful with polarities and use an in(line fuse if $ou need one)

/!
#nother possibilit$ might be to power a tracked robot with a couple of motors such as =ameco /&+"7'" 4or bigger5, but let's sa$ $ou don't want to bu$ an e.pensive full h(bridge controller, and $ou have some rela$s to change direction such as the =ameco &"!!+! :ou could do something like the following ,evice & and / provide -32 control for the motors, and ,evice ' and 7 provide simple on?off control for the rela$s Let's sa$ 2otor & is connected to the left track of a platform and 2otor / to the right # motor will go forward if a rela$ is off, or backwards if it's on That means $ou get direction plus full -32 speed control)

Cela$ & Off Off On On Off On Off On

Cela$ /

2ovement Eorward Cight Turn Left Turn %ackward

/+

:ou might want to run a search for snubber circuits before using inductive devices such as motors and rela$s %ack(to(back Aener diodes might help also &<7"77 Aeners, which are &! volt units, could be used for &/ volt devices)

3e will now look at the circuit The whole schematic can be viewed here There are four power 2OSE;T circuits used to drive e.ternal devices using -ulse 3idth 2odulation 4-325 -32 is generall$ a continuous train of pulses The brightness of a lamp or speed of a motor, for e.ample, is determined b$ the width of the on pulse On time is called the dut$ c$cle, e.pressed as a percentage of a full c$cle)

-32 is a ver$ efficient mode of operation Consider the on and off states of the ICE&70!-%E 2OSE;Ts used in this circuit Erom the datasheet, $ou will see that the static on resistance is ! ' millohms 4 00!' ohms5 with a gate to source voltage of &0 volts

/" Let's sa$ $ou are driving something with /7 volts that needs &0 amps Current is the same for all components in a series circuit #ccording to Ohm's law, 1 L IC L &0 K 00!' L 0!' volts -ower is - L 1I L &0 K 0!' L !' watts, far below the ''0 watt ma.imum for the ICE&70!-%E, even though the device needs /70 watts The current of the ICE&70!-%E when it is off is /0 microamps at room temperature Sa$ing that the full /7 volts is across the ,rain and Source, the power will be - L 1I L /7 K 0000/0 L 00076 watts -32 looks like the following on a scope, which shows a green L;, strip channel on top and blue on bottom, with different on?off ratios 4pardon the photograph$ > Aero talent there5)

/6 The longer the on pulse, the brighter the lamp or faster the motor The drivers should ne(e) be operated in an$ other than a ,C pulsed mode to keep the power down as noted above The ,evice & driver is shown below)

1in is the suppl$ voltage for the section, which also connects to the device The other side of the device connects to the drain of the 2OSE;T The ICE&70! 2OSE;T is designed to be used in automotive applications It can handle considerable abuse) up to !! volts, a ma.imum of &+8 amps and a ma.imum of ''0 watts The &0B pullup resistor between 1in and the ,rain helps hold down noise The Transient 1oltage Suppressor 4T1S5 clamps input voltage so it will not e.ceed '' volts There are transients in automotive applications, for e.ample, that e.ceed hundreds of volts The T1S helps protect the circuits from them The input capacitor for each device channel 4Incapn5 provides filtering and storage for high current pulsed loads The &60 ohm resistor and &! volt Aener limit the gate drive voltage, and a TI-&/0 darlington is used to suppl$ the needed current This is connected to the 77/0 which is capable of driving the 2OSE;T gate with up to + amps The &<!6&8 Schottk$ supplies s$stem voltage to other parts of the board

/8

;ach driver section works more or less independentl$ :ou could be running one section on ! volts, another on &/ volts and the other two on /7 volts, although one of them will need to be at least about &0 volts to power other parts of the circuit # single suppl$ can also be used for all 7 channels b$ paralleling the power inputs and grounds as noted above ;ach driver section feeds the rest of the board through a &<!6&8 Schottk$ rectifier That is filtered b$ 7 more &000uE?!01 capacitors which supplies a "60! ! volt regulator which can be used, for e.ample, to power an #rduino U<O, and two switching regulators used to provide 9?( 8 volts to e.ternal circuits such as The Listening Tree or on(board circuits which can be constructed on the board's breadboard area 4&77 holes in the area designated b$ %%& through %%+5

'0 There is a !!!(based debounce circuit to clean up switch closure bouncing, a ! 1olt regulator for low power devices such as an U<O, and a single pole &!8/ *A high pass circuit and a single pole 76/ *A low pass circuit The source of power for the regulators is from the &<!6&8 Schottk$ rectifiers in the drive circuits)

'&
The board has a 981 switching regulator circuit, which is powered b$ the ! 1olt regulator to keep down noise, since it might power a microphone, and a (81 switching regulator Together, the$ can power The Listening Tree or other on or off board low( current devices 4circuits inside the dotted lines below are those inside the '70+' regulator ICs5)

'/ There are also areas on the board I call Sample?*old circuit, although the$ don't reall$ Iualif$ for the real thing Ceal Sample?*old circuits have a means to isolate the capacitors from discharge and a means to purposel$ discharge them These are a bit more like peak detectors ;ach of these accepts the positive half of the input signal which cannot be discharged through the input because of a diode It is discharged b$ the resistor It has a hold time of about & second This is hand$ when working with incandescent lamps and some motors, due to their dela$ to reach the brightness or speed called for b$ the input

'' The Listening Car board can be easil$ interfaced with The Listening Tree board, which alread$ has a mike and mike preamplifier The Listening Tree also has a state variable filter which provides better filtering than the simple filters on the Listening Car board, in that it includes high and low pass filters with steeper roll offs, along with a bandpass filter :ou can get close to the audio processing capabilit$ of The Listening Tree however, and get man$ times the power capabilit$ with the Listening Car Eirst, build The Listening Tree mike(preamp section in the breadboard area 4its schematic is on the ne.t page5 Since volume levels in an automotive application are often ver$ high, an inter(stage volume control is added :ou can check for the clipping that comes with too much signal if $ou have a scope The tops and?or bottoms of the waveform get flattened out)

'7
It might even be necessar$ to lower the gain of the circuit b$ increasing the values of the &!B resistors feeding the inverting inputs of the op(amps to higher values If $ou are not clear about what I mean, read TheListeningTree doc in the #dditional Eiles Aip on the The Listening Tree order page The mike(preamp schematic looks like this with the inter(stage volume control)

The resistors can be common T watt units and the //uE a film capacitor The TL0"7 pinout looks like the following Take special note of the power pins, which get power from The Listening Car's 9?( 8 1olt sections, and ground from the ground between the 9?( 8 1olt sections)

<otice that there are two more amps that could be used for more amplification, filtering, etc :ou could also use a TL06/ to save a little room

'!
This is how the preamp could be wired to the rest of the circuit, with an U<O and its Input?Output connectors wired in for good measure :ou will, of course, need to power the board through one or more of the device channels as noted above 3e will discuss the U<O's role shortl$, along with reasons for skipping #&)

Connect power to the preamplifier 4the $ellow -reamp bo. above5 constructed on the breadboard area as shown above, and connect the output of the preamplifier to both the *igh -ass In and Low -ass In on The Listening Car board, indicated b$ the black lines above The low pass is considered the red light channel and the high pass is used for the blue light channel, indicated b$ the corresponding colors of the lines in the drawing Dreen is obtained b$ getting the difference of #0 and #/ then mapping that to the 0 to /!! -32 values That's @umping ahead a little, though 2ore on how it's done with software will be discussed momentaril$

'+ -ower is provided to the -reamplifier from the Listening Car's 9 and > 8 1olt regulators and the ground between them, shown in the diagram as black @umpers Connect a @umper from a Listening Car ground to an U<O ground input Connect the 9! 1olt output of the Listening Car to the !1 input of the U<O, shown as an orange @umper in the diagram Or $ou could get U<O power from $our US% until $ou want to go portable Connect Low -ass Out from the Listening Car to Sample *old & In on the Listening Car, shown as a red @umper on the diagram Connect Sample *old & Out to the U<O #0 4#nalog To ,igital5 input, shown as a red @umper on the diagram Connect *igh -ass Out from the Listening Car to Sample *old / In on the Listening Car, shown as a blue @umper on the diagram Connect Sample *old / Out to the U<O #/ input, shown as a blue @umper on the diagram Connect a red @umper wire from the -32 F8 output of the U<O to -32 ,evice & In on the Listening Car board Connect a green @umper wire from the -32 F&0 output of the U<O to -32 ,evice / In on the Listening Car board Connect a blue @umper wire from the -32 F&& output of the U<O to -32 ,evice ' In on the Listening Car board

'" :ou could even feed the circuit straight from the output of the stereo amplifier in $our car or home <ote, however, that this should probabl$ not be attempted if $our s$stem uses a bridged amplification configuration, where there is a separate power amplifier connected to each terminal of the speaker s$stem, with one pushing while the other is pulling 4&60 degrees out of phase5 Since one side of the speaker is not grounded, $ou might e.perience noise, distortion or even damage to circuits It will work if one side of the speaker is grounded, such as is the case with most home s$stems and some automotive s$stems #ll $ou need to do is combine the left and right and make sure the peak voltage never gets above about + volts Consider a &00 watt amplifier driving an 6 ohm speaker The power eIuation sa$s - L I1 Since Ohm's Law sa$s that the current is I L 1?C, if we put 1?C in the place of I in the power eIuation, we get - L 1/?C 2ultipl$ing both sides b$ C gives us -C L 1/ Taking the sIuare root of both sides gives us 1 L PR 2ultipl$ this b$ the sIuare root of /, or about & 7&7 to get the peak 4actuall$ onl$ true for a pure sine wave, but close enough5 3ith &00 watts into 6 ohms, we get about 70 volts peak %$ summing both sides to simulate the natural summing of the audio b$ the mike, we might occasionall$ get 60 volt peaks So we need a combiner and attenuator in a single circuit 3e also want to lightl$ load the stereo channels so as not to degrade the stereo separation The following should do the trick)

The rest of the circuit remains the same as on the previous diagram, with the wiper of the &B potentiometer going to the inputs of both the high and low pass filters

'6 The ultimate s$stem would be one that combines The Listening Car with The Listening Tree :ou could use the circuit from the video as noted above, or consider some of the ideas below Considering the potentiall$ high volume levels, it would be a ver$ good idea to include the !B inter(stage volume control in the place of C/ in the preamplifier as was done for the circuit used in the video #lso connect the output of the preamp to the filter as noted above above Einall$, connect the three boards together :ou will need to make appropriate changes if $ou use other than the U<O Step b$ step wiring of the three boards begins on the ne.t page It's similar to the connections used for the video <ote that the diagrams are color coded If $ou read TheListeningTree doc
in the #dditional Eiles Aip on the The Listening Tree order page, $ou will note that man$ colors can be realiAed using CD% 4red, green, blue5 methods 3ith the e.ception of power suppl$ and ground circuits, red lines are used for the red light parts of the circuit, green for the green parts and blue for the blue parts %lack is used for ground, orange for the ! volt section and $ellow for the output of the debounce circuit The following pages show how to hook it up I have broken the wiring up into sections, which makes it much easier It would probabl$ be a good idea to get some spools of different colors of hook(up wire The breadboard @umpers are a little short, which can make things tight Life is a lot easier with one foot wires It's a good practice to highlight each step as it is completed Connector pin numbers are included in the drawings since it's sometimes easier to count pins rather than to tr$ to read print covered b$ wire The wiring is similar to the wiring for the video pro@ect, but without the controls Some ideas on adding even more controls than those used in the video s$stem are covered below

'8

Connect a red @umper wire from The Low -ass Out of the Listening Tree board to the Low -ass In of the Listening Car board Connect another red @umper wire from the Low -ass Out of the Listening Car board to the Low -ass ,etector In on The Listening Tree board Connect another red @umper wire from Low -ass ,etector Out on the Listening Tree board to Sample *old & In on the Listening Car board Connect another red @umper wire from Sample *old & Out on the Listening Car board to #0 on the U<O board Connect another red @umper wire from the -32 F8 output of the U<O to -32 ,evice & In on the Listening Car board

70

Connect a green @umper wire from the %andpass Out of the Listening Tree board to the %andpass ,etector In on The Listening Tree board Connect another green @umper wire from %andpass ,etector Out on the Listening Tree board to Sample *old / In on the Listening Car board Connect another green @umper wire from Sample *old / Out on the Listening Car board to #& on the U<O board Connect another green @umper wire from the -32 F&0 output of the U<O to -32 ,evice / In on the Listening Car board

7&

Connect a blue @umper wire from The *igh -ass Out of the Listening Tree board to the *igh -ass In of the Listening Car board Connect another blue @umper wire from the *igh -ass Out of the Listening Car board to the *igh -ass ,etector In on The Listening Tree board Connect another blue @umper wire from *igh -ass ,etector Out on the Listening Tree board to Sample *old ' In on the Listening Car board Connect another blue @umper wire from Sample *old ' Out on the Listening Car board to #/ on the U<O board Connect another blue @umper wire from the -32 F&& output of the U<O to -32 ,evice ' In on the Listening Car board

7/

Some of the provided software uses a push(button switch To use one, connect one side to the switch ,ebounce In on the Listening Car board Connect the other side of the switch to the ground input ne.t to ,ebounce In Connect ,ebounce Out to ,igital / on the U<O Connect the ground on the IO% Connector of the Listening Car board to one of the grounds on the U<O Connect two of the grounds on the Input?Output connector of the Listening Tree board to two of the grounds on the U<O Connect 98 1olt Cegulator Out on The Listening Car board to the 9 power input of The Listening Tree board Connect (8 1olt Cegulator Out on The Listening Car board to the > power input of The Listening Tree board Connect the Dround between the 9 and > Cegulator outputs on The Listening Car board to the power ground of The Listening Tree board Connect ! 1olt Cegulator Out on The Listening Car board to !1 on the U<O board

7' It would be a good idea to test the wiring, whether $ou are using a Listening Tree or not The following will get the analog values available and send them to $our computer It uses two channels with the Listening Car alone, and three if The Listening Tree is included To determine which case e.ists, we will use a variable call IsLT, which answers the Iuestion, GIs there a Listening TreeUH The bool means IsLT is a %ollean that can record a true or false condition It is set to false in the following, meaning there is not a Listening Tree being used Set it to true if one is being used Other variables are ints ,ownoad the test sketch ThreeChannel#nalogTest3ithListeningCar here Compile and run the sketch Turn on the serial monitor b$ clicking on Tools?Serial 2onitor 3atch the serial monitor screen with sound in the room Lowering and raising the volume and pitch of the sound should make some difference in the levels for the three 4or two5 sections Check the wiring if $ou see all 0s or all /!!s on an$ of the mapped sections

77 :ou can also test the board4s5 with an U<O program that simpl$ gets the analog values from the preamplifier, filters and detectors and displa$s the various values on the lights via -32 It will get the analog values, map them to proper -32 values then change the brightness of Ced, Dreen and %lue according to the levels There is one t$pe of line in the code that might not be completel$ self evident It looks like this) Ced#nalog1alue L map4analogCead4Ced#nalog-in5, 0, &0/', 0, /!!5M It involves a function call within a function call *ere is the anatom$)
analog"ead *ean+ get the analog (al-e .)o* the analog po)t0 .)o* the analog po)t0 %al-e will )ange .)o* / to 1/220 4 *ap )e,+cale+ the nati(e (al-e .)o* analog"ead o. / to 1/22 to the P&M / to 233 (al-e0 4 4 4

Ced#nalog1alue L map4analogCead4Ced#nalog-in5, 0, &0/', 0, /!!5M So an analog value is read then scaled from its native 0 to &0/' value to 0 to /!!, then returned to Ced#nalog1alue The same is done for each of the colors if the program uses both the Listening Tree and the Listening Car If, however, $ou're using the Listening Car b$ itself with the U<O, then the bare(bones program gets the red and blue values from #nalog Channel 0 and #nalog Channel / respectivel$, but does not get green from #nalog Channel & Instead, it attempts to simulate the bandpass function b$ subtracting the blue value from the red value, then maps the possible resulting range of (/!! to /!! to the 0 to /!! -32 values

7! ,ownload %are%onesUsingListeningCar here) Once it is confirmed that ever$thing works, $ou can build whatever $ou like One interesting start is a program that runs through some of the colors possible using CD% technolog$ It works a bit unlike some might first think, though <otice that each color in the sketch changes value at a different rate, and that one color can be increasing in brightness at one rate while another decreases brightness at a different rate One part might be a little confusing to some Consider the following from the program below) %lue1alue 9L %lueStepM The 9L means to move the blue value b$ the amount of the blue step If %lueStep were &, %lue1alue would simpl$ move up b$ & If %lueStep were /, %lue1alue would move up b$ / If, however, %lueStep were (/, %lue1alue would move down b$ / ,irection is changed when a value falls below 0 or goes above /!! This is done b$ multipl$ing step b$ (& 4KL (&M5 Cemember from grade school that > times 9 gives (, and > times > gives 9 ,ownload the code here Load it into the U<O and save it as ListeningCarThreeSweep or what ever $ou like

7+ Then $ou can blend ThreeSweep with %are%ones b$ downloading ListeningCarThreeSweep3ith#nalog 3e will ne.t select various modes of operation b$ means of a push(button In the earl$ da$s of the telephone, a person had to periodicall$ pick up the receiver to see if someone was there Then someone invented the ring s$stem and a person could be performing other tasks until interrupted b$ the bell Toda$ we don't have to check the phone to see if someone is there Our normal tasks are interrupted b$ the bell # computer can continuousl$ check to see if a push button switch has been depressed, or we can teach it to answer the call -eriodic checking b$ a computer is called polling The method we will consider here is called an interrupt because it interrupts normal activit$ The part that handles the interrupt is called an Interrupt Service Coutine or ISC The ISC handles as little as possible In the test e.ample that follows, its onl$ function is to set a variable to show that the switch has been pressed

7" The switch is connected to the IO# ,ebounce section of the Listening Car board in the following manner -ushing the button will make pin / on the U<O high for about & second This will trigger interrupt reIuest 4ICV5 0 on the U<O and program control will be passed to the interrupt service routine -ush%uttonISC, where the variable that shows the button has been pushed will be set to true The following can be added to a previous circuit if $ou wish, and the U<O !1 can come from $our US% until $ou want to go portable :ou will need to power the Listening Car through at least one of its channels)

76 The variable that shows the button has been pushed is declared as follows) volatile bool %utton-ushed L falseM It's another %ollean like IsLT The volatile part means, in this conte.t, that the variable can be used in more than one main section of the program, the ISC routine being one section and the rest of the program the other %utton-ushed is initialiAed to false #n int called -ushCount is used to count the number of times the button has been pushed, and is initialiAed to 0 The main part of the program in loop45 checks to see if %utton-ushed is true If so, -ushCount is incremented to record the number of counts Cesults are sent to the serial monitor screen The test code, ListeningCarJISCJTest, can be downloaded here and saved as ListeningCarJISCJTest 2onitor it with the Serial 2onitor) Once proper interrupt handling has been confirmed, a program can be written to switch among various displa$ selections #n e.ample can be downloaded here Save it as 2ultiSelect or whatever $ou like, then compile and upload it to the U<O <ote that the program has something like this) Serial println4QOffQ5M ?? rem out after testing in several places That means to remark out the command) ?? Serial println4QOffQ5M ?? rem out after testing The program uses the same push(button switch arrangement as above The various displa$ functions are called as result of a switch command for the SwitchOnCount variable 3hat routines $ou dream up depends onl$ on $our imagination

78 :ou might want to go be$ond simple selection of fi.ed patterns to almost infinite control over ma.imum and minimum intensities for each color, speed 4step siAe5 and dela$ In other words, an e.pansion of the idea used for the video Let's sa$, for e.ample, that $ou want some changing lights for some track lighting or some lighting on a nice waterfall $ou @ust built The front panel might look something like this 4pardon the art work > I have about the same amount of talent there as I do with photograph$ > prett$ much Aero5 :ou could add the switches used in the bo. used in the video and a push button to change modes and much more > keep reading)

!0 The schematic that follows shortl$ shows one wa$ to get control over the parameters of the displa$ It uses the 70!& analog multiple.er The 70!& allows up to 6 analog inputs to be connected to a single output, one at a time, using digital control It looks like this)

The truth table for the 70!& is as follows when used in the control 4. means don't care5)
<umber 0 & / ' 7 ! + " 6 0 0 0 0 0 0 0 0 & Inhibit 0 0 0 0 & & & & . C 0 0 & & 0 0 & & . % 0 & 0 & 0 & 0 & . # W Connects To :0 :& :/ :' :7 :! :+ :" ,isconnect

3hen Inhibit goes high, the output is disconnected from all 6 inputs and the pin ' output This characteristic allows more than one 70!& to be connected together In the schematic on the following page, &0 of &+ possible inputs are selectivel$ connected to the #' analog to digital converter The inputs are from &0 &0B potentiometers split into three groups that control ma.imum, minimum and step values for each of the red, green and blue colors, plus the dela$ near the bottom of loop45 The schematic on the following page shows how to hook it up <ote that all grounds are connected to D<, on the Listening Car board

!&

!/ # -<//// transistor inverts the Inhibit signal)

3hen pin &/ of the U<O is low, the inhibit on 70!&# is turned off and the output is active The -<//// is also off, allowing its collector to be high which is connected to pin &/ of 70!&% That will turn off the output of 70!&% 3hen pin &/ of the U<O is high, the output of 70!&# is turned off The -<//// is turned on which pulls its collector and pin &/ of 70!&% low That enables 70!&% :ou can connect an additional + inputs to #' using this circuit, for a total of &+ using a single U<O analog input

!' 3e can now draw another truth table This one shows the U<O pins, port register bit number, and bit weight and position for the control counter and what control will connect to #')
Control Counter 1ariable # L pin 7 % L pin " C L pin 6 Inhibit L pin -ort Ceg -%0 -ort Ceg -," -ort Ceg -,7 &/ Counter Counter Counter -ort Ceg -%7 %inar$ %inar$ %inar$ Counter -osition L 0 -osition L & -osition L / %inar$ 3eight L & 3eight L / 3eight L 7 -osition L ' 3eight L 6 0 0 0 0 0 0 0 0 & & 0 0 0 0 & & & & 0 0 0 0 & & 0 0 & & 0 0 0 & 0 & 0 & 0 & 0 & Control To 3hich #' Connects

0 & / ' 7 ! + " 6 8

Ced 2a. Ced 2in Ced Step Dreen 2a. Dreen 2in Dreen Step %lue 2a. %lue 2in %lue Step ,ela$

3e want to select an input control using pins 7, ", 6 and &/, then map the results from the native 0 to &0/' to the desired ranges The pins on the U<O correspond to ports on the controller chip used on its board 3e will be turning on the appropriate port bits to select the desired 70!& channel If $ou are a bit haA$ about bits, take a look at m$ tutorial on the sub@ect here :ou will also be manipulating bits If $ou said GhuhUH to that, take a look at m$ %ollean tutorial here #s noted in the table, we will be concerned with -ort % and -ort , #rduino gives us some hand$ names we can use to access them) ,,C% ( The -ort % ,ata ,irection Cegister ( read?write -OCT% ( The -ort % ,ata Cegister ( read?write ,,C, ( The -ort , ,ata ,irection Cegister ( read?write -OCT, ( The -ort , ,ata Cegister ( read?write

!7 Beeping in mind that the #rduino web site sa$s to take great care when working directl$ with ports, the above table can be used to see how ever$thing can be put in the right place to select a desired control 3e know three important things that will make the @ob eas$) The bit position of a particular port being used, the bit position of the counter bit to be used and the weight of each counter bit There are four bits used The$ have positions and weights as follows)
Counter %it 2ove To ' -%7 / -%0 7 & -," / 0 -,7 &

Counter 3eight 6

The #<, 4X5 operation will isolate a bit So to isolate bit / in the counter, we would #<, the counter with the weight of bit /, which is 7) 4counter X 75 3e then need to shift the bit from where it is in the counter to where it needs to go in the port register 3e use PP to shift the bit to the right to a lower bit position, and YY to shift it to the left to a higher bit position To move the counter bits above from the counter . to the reIuired register bit position do this) I+olate Mo(e 4 4 Counter . bit 0 to -,7 L 4. X &5 YY 7M Counter . bit & to -," L 4. X /5 YY +M Counter . bit / to -%0 L 4. X 75 PP /M Counter . bit ' to -%7 L 4. X 65 YY &M

!! ThreeSweep will be used as a base for a test program that will be called ControlTest It doesn't control the displa$, but @ust lets us know if the numbers are right ,ownload ControlTest here)
Load the program into the U<O after $ou hook up a temporar$ test set up, which can at first be a simple connection from a &0B potentiometer to the U<O #' pin)

:ou should see the following results with the following settings of the potentiometer)
%al-e+ 2a. 2in Step ,ela$ !-ll co-nte)cloc5wi+e &/6 0 (&0 0 Mid,wa6 #bout &8& or &8/ #bout +' or +7 #round 0 #round !0 /!! &/" &0 &00 !-ll cloc5wi+e

<e.t, hook up the 70!&s on a perfboard or the breadboard area on the Listening Car board, connect the potentiometer wiper to the 70!& inputs and look for reasonable values Einall$, wire up all &0 of the potentiometers to their respective inputs and run the test again to look for appropriate changes

!+ <ow the ThreeSweep program can be modified to work with the controls ,ownload ListeningCarThreeSweep3ithControls here The controls, Listening Car board and U<O can be mounted in a bo. of some sort, a power suppl$ or supplies and lights connected and the program loaded into the U<O :ou will be able to get a wide range of lighting patterns using the controls %e sure to use appropriate ventilation #s noted, $ou could connect an additional + inputs to #' using this circuit, for a total of &+ using a single U<O analog input :ou could, for e.ample, add three controls to set the beginning values for red, green and blue The$ are currentl$ set where the color level values are declared at the beginning of the ThreeSweep program, used here as a code basis -roblem is, the$ can onl$ be set when the process starts The$ need to be determined at a place other than where the other control values are determined To make this happen, a push(button could be included to set a bool in an ISC that will cause new start values to be set in a separate routine #nalog input could also be used and controlled with more potentiometers as was done in the s$stem used in the video The inter(stage control is described above It will provide overall level ;ach of the color inputs can be controlled with pots connected between the filter outputs and peak detectors on The Listening Tree such as used for the control bo. for the video 3ith these four and the ones noted above, that makes &" potentiometers and a huge amount of controlS

!"

Solde)ing And Co*ponent Identi.ication G-ide


Eirst, some tips on soldering) Solder a component b$ placing the iron on the pad and component wire to heat them Eeed a little solder in, then pull the iron up the component wire to form a little cone on the pad :ou don't need a lot of solder Beep the iron clean b$ wiping it on a damp rag, and don't put solder on the iron and dab it on the wire and?or pad The iron's onl$ @ob is to heat the pad, wire and solder so as to cause the solder to flow into the connection The result will be a nice cone of solder with no cracks around the wire or pin It's OB to coat a clean tip with a little solder, but wipe it clean again to make it a ver$ thin coat)

3hen installing Integrated Circuits, it is sometimes necessar$ to straighten pins that might be spread for automatic insertion machines To straighten the pins, roll the IC on the table, being careful to first discharge $ourself on a metal ob@ect)

!6
Cesistors resist the flow of an electrical charge The Cesistor values, e.pressed in Ohms, are indicated b$ a color code 4it's a good idea to install them on the board so the color bands read from left to right or top to bottom5 *old the resistor so that the tolerance band is to the right or down The resistors on the board are !Z tolerance, so the$ use a gold tolerance band Cead the colors from left to right 3rite down the numbers for the first two -ut the number of 0s on the right end that is indicated b$ the third number
Color %lack %rown Ced -hrase bad bo$s rob 1alue 0 & / ' 7 ! + " 6 4gold can also be in place ' as a & multiplier so brown, black, gold L & ohm L &0 K &5 gold silver ! 00Z &0 00Z

Orange our :ellow $oung Dreen %lue 1iolet Dra$ 3hite Dold girls but 1iolet gives

willingl$ 8

Consider this e.ample)

The above is $ellow, violet, brown :ellowL7, 1ioletL" and %rownL&, so the first two digits are 7" and we put & Aero on the end to make 7"0 ohms Or this)

This one is gra$, red and black :ou can see the gold tolerance band a little better here, which shows !Z The last color indicates the temperature coefficient Dra$L6, CedL/ and %lackL0, so the first two numbers are 6/ and there are no Aeros on the end > 6/ ohms

!8

There are a couple of other t$pes of resistors used in the circuit One is a potentiometer or variable resistor 3hile a fi.ed resistor such as the above e.amples look like this on a schematic) The potentiometer looks like this)

There is a wiper that moves from the counterclockwise to the clockwise position and back, providing a variable resistor The$ can take man$ ph$sical forms One suggested in the te.t looks like this)

#lso used in the circuit is a resistor arra$)

The pin with the dot in this circuit is common to one side of each of the five resistors The other side of each is connected to one of the other five pins

+0

# capacitor consists of plates of metal separated b$ an insulator It is used to temporaril$ store a charge Capacitors can take man$ shapes *ere are @ust three)

The$ are, from left to right, an electrol$tic, film and ceramic capacitor The electrol$tic is polariAed, meaning it has a positive and negative side It might have both sides marked, the positive side marked, or the negative side marked as above The unit of capacitance is the Earad, but that is ver$ large, so, t$picall$, the microfarad is used See more detailed information here There are alternate numbering s$stems for some capacitors) 0&uE &0' &uE &07 0 0''uE ''' The schematic representation of a capacitor reflects the construction) # diode or rectifier allows a charge to flow in onl$ one direction Its schematic representation reflects this) Onl$ problem is, electricit$ flows from where there are a lot of electrons to where there are few ;lectrons are negativel$ charged, so the charge flows in the opposite direction of the arrow, probabl$ due to the fact that %en Eranklin thought charge flows from positive to negative # special version is the Aener diode It looks like this)

It has the characteristic that it will conduct in the opposite direction at a specified breakdown voltage It's hand$ as a regulator

+& #nother special diode is the L;,, the Light ;mitting ,iode It looks like a diode with little arrows coming out of it schematicall$, and a little like a light bulb in real life The long wire is the positive side)

# Schottk$ diode is generall$ faster acting than the common kind, and sometimes has a lower voltage drop)

The main power device in The Listening Car is the 2OSE;T It looks like on the left in the schematic and on the right in real life)

There are several kinds available, but this one is called an enhancement mode <(Channel device It has the characteristic that its drain to source resistance will drop if the gate is more positive than the source The drain to source resistance for the 2OSE;T used this pro@ect, for e.ample, can go from virtuall$ open circuit to 00!' ohms That makes it a ver$ good switching device # switch either completes or breaks a circuit Its schematic s$mbol reflects that fact # push(button switch is mentioned in the te.t)

+/ #n inductor is basicall$ a coil of wire which is sometimes wrapped around some ferrous metal #s most learned in grade school, when a current is run through a coil, a magnet is produced # little later we learned that current is induced in a coil when the coil moves through a magnetic field 3hen the current is removed from the coil, the magnetic field collapses, producing the same effect as a coil moving through a magnetic field > a current is produced in the coil Turn on an inductor and a magnet is produced Cemove the current, and electricit$ is produced because the magnetic field is collapsing The inductor is reacting to the application or removal of current It is a reactive, not passive component The inductors used in the switching regulators for 9?( 8 volts look like this)

+' #nother application of an electromagnet is suggested in the te.t The electromagnet can be used to attract other pieces of metal Such an arrangement can simulate a switch and isolate the input coil and drive voltage from the switch contacts It is called a rela$, and gets its name from the fact that such devices were used man$ $ears ago to rela$ 2orse code pulses down a telegraph line, re(powering them in the process)

;ach metal piece attracted b$ the electromagnet is called a pole, and the contacts made or broken b$ the movement of the poles are called throw positions 4the same is true of switches5 The schematic representation of a double pole, double throw 4,-,T5 rela$ like the ones discussed in the te.t is shown below)

The <ormall$ Closed 4<C5 contacts are connected to the pole when the coil is not activated This is indicated b$ the arrow touching the pole The <ormall$ Open 4<O5 contacts connect to their poles onl$ when the coil is activated

Вам также может понравиться