Sounds with electronics

So here goes, I am trying to figure out how to make basic sound generating machines. Preferably generating a sound that can be modified with a potentiometer or something of the sort. The principle is simple, these will be for messing around, possibly, if the result is good, using in some random recordings of mine, so most of the machines will have a jack out plug. Anyhow I was wondering, what, in a circuit, actually makes sound, what is the base of all sound generating electronic devices (synth, analog stuff, beepers) what actually creates the wave, the current that is sent to the speakers? Have I just answered my own question by saying current? Is it just the electrical current, and putting random resistors, capacitators, potentiometers and stuff changes the sound that is generated? Any help is more than welcome! and if anything good comes of it, I'll post some sound clips!

Topic by gavox   |  last reply

Electronic Toolkit

I do some work with the FIRST Robotics kids and it is amazing to see what they are doing.  Big problem though seems to be a general lack of electrical test equipment.  They don't really have the money to buy oscilloscopes, function generators, CAN and I2C analyzers.   So I got one of the M3 Discovery boards from STmicro and it is really cool.  It has four 5MS A/Ds on it plus a whole host of other features(CAN, I2C, Serial etc.). So it got me thinking. Why couldn't we turn one of these chips into an "All-In-One" electrical toolkit and keep it cheap($50-$60, BOM ~$20).  It would be fairly easy to turnkey. I threw together some simple specs, what do people think. 1) Will supply general use drivers so a user can use the app or write their own. 2) Oscilloscope   a. Two Channel     i. 2MHZ of Analog Bandwidth per channel     ii. 10MS/s per channel     iii. Trigger on rising edge, falling edge, on-command, run-stop actions     iv. Datalogging for extended time periods at up to 10hz per channel (data stored directly to console),  maybe higher rate will  just have to see 3) Serial – 2 Ports   a. Multi selectable protocol w/slew control     i. RS232, RS422, RS485 4) CANBus – 1 port 5) I2C – 1 port 6) SPI  - 1 port 7) 8 Discrete User Selectable 8) Function Generator   a. Two Channel      i. 1MS/s small signal change      ii. 250kS/s full range change      iii. 0-3.3VDC buffered output  9) PWM - 4 Channels

Topic by ase4542   |  last reply

Analog Fading LED

Hello - I am brand new to electronics but am trying to learn about BEAM and other art + science circuits. I am looking to make a small analog circuit to fade in and out a LED. I have looked online but have found a bunch of ones using a 555 timer or a PWM and other chips. I saw a reference to doing this slow fade in and out technique using only capacitors and resistors but have been unable to find a diagram. Can someone help me out. FWIW - I am looking to charge this using solar and am only looking to drive one LED. Ideally a days charge would last a few hours of fade in and out cycling with the cycle time being slow - somewhat like the Mac "Sleeping" LED. Thank you in advance.

Topic by toddbg   |  last reply

How do you use an analog to digital converter?

I am fairly new to electronics and want to know how to use an analog to digital converter with an avr microcontroller preferably in c. I do not mean the built in one.

Question by sotsirh194   |  last reply

analogue destructive interference device?

I was hoping to learn how to make a machine that would allow me to put it down, push a  button and no longer hear beyond it.  it would be ideal for doing interviews at conventions.  I was also hoping to  have it made so theres no computers involved, just older electronics, so it would, in theory use less power.

Question by ketrovin   |  last reply

Digital or analog clock with logic gates

Hi everyone I want to help you. Our teacher wants us to do digital or analog clock only through logic gates and we have no idea please need help thank you

Question by Mehmet Ömer Ceylan 

Voltage: In search of a better analogy than water

I need to come up with a good analogy to describe the concept of Voltage. Water seems to be the most common analogy, but it seems to fail in some way. Here is a good water analogy that I found, but it still leaves questions that I cannot answer.The Lake Analogy: No force is pushing or pulling on the water inside a lake, so nothing moves. If it were possible to lift up on one side of the lake and tip it at an angle, gravity would pull on the water and it would flow. We have created a gravitational potential difference. The side that we lifted up on now has a higher potential than the lower side. Gravity will always cause water to flow from the point of highest potential to the point of lowest potential. The higher the difference between these two potentials, the more electrons will flow; the greater the current will be.Electricity is the same. When we attach a battery to a copper wire, the battery’s internal chemical reaction has created an electrical difference in potential. The negative terminal of a AA battery, has a higher potential than the positive terminal, so electrons will flow through the wire from the negative terminal to the positive. In this case, each coulomb of electrons will have the potential to do 1.5 joules of work as it passes through the wire. QUESTIONS: Does Voltage Push or Pull Electrons? The negative terminal of a AA battery repels electrons. This pushing force is what moves the electrons. However, we also know that electrons are attracted to a positive charge. So, are the electron being "pulled" by the positively charged battery terminal while being simultaneously pushed away by the negative terminal... or... does the negative terminal push the electrons away to a certain point, when the positive terminal begins to pull on them?With water, the only force is gravity, which is a pulling force. But with flowing electrons, it seems like the water analogy would require a pump there is only a pull, and no push. I guess... if you use a water pipe instead of a lake, and you use a water pump as an analogy for the battery, the end where the water is pushed out of the pump would be the negative terminal, and on the other end, water is being sucked into the pump, so that would be the positive terminal. But could you say that the sucking action of the pump is pulling the water towards that end, or the pushing action of the negative end is pushing the water towards the positive end? or Both? If so to what degree, and when? Meaning... as a water molecule is pushed out of the pump, is the sucking end already acting on and affecting the molecule, or does the sucking action only exert force on the water molecule at a certain point? It's all a real brain bender to me. Does anyone else know of a rock solid voltage analogy, or how I can improve this one?

Question by Dolmetscher007 

Theremax -Theremin from PAiA electronics

PAiA electronicsthis is a great source of electronic music equipment kits. Scott is great and easy to work with. I have built a Theremax for my wife and plan on building the Fatman Analog Synth soon (i hope)

Topic by knarfoo 

I have a burned diode with no markings any direction?

This analog multi-meter has a bad diode I cannot identify. Can anybody help?

Question by bigcape   |  last reply

How to make a tv screen's electron beam constant, not pulsed?

I got an old black and white mini radio tv. I hacked the yoke to turn it into a vector display. The problem is that the beam electron beam is pulsed, rather than constant,  causing dotted lines. How do I make the beam constant? Should I bypass the internal RF input circuitry and replace the normal input with something else? Is there an easier solution?

Question by magnum-colossus   |  last reply

Bob Pease is dead

Bob Pease, the Analog design engineer who, while working for National Semiconductors,  developed devices like the LM317 regulator amongst many others, died yesterday in a car crash in Silicon Valley. Bob was a legendary figure to any engineer working in the analog domain. He died leaving the memorial service for another legend, Jim WIlliams of Linear technology, who died of a massive stroke last week. Bob was one of the nicest guys in the business, and mentored dozens of engineers in his long career.

Topic by steveastrouk   |  last reply

Can a GameCube Portable be Built with an Audiovox D1812 DVD Player? Answered

I've been kicking around the idea for a gamecube portable for about a year now and I've finally got funding to tackle it. I read on a forum that this Audiovox would work for a gamecube portable display. Is this true? The gamecube has an analog out which I believe I could plug into the composite for the DVD player yeah? Any advice is appreciated! Also, if anyone has a screen that is sure to work I would love to hear what it is!

Question by TriforceJunkie   |  last reply

Need schematic: 60-LED analog seconds-only clock

I built a "barn-door" tracker to take photos of planets and stars so that they are tracked (i.e they appear as dots, not trails). See if you want more info about  trackers of this type. My tracker can be seen in the first two photos here: These devices depend upon the user manually turning a knob at exactly one rpm for as many as fifteen minutes. This is (very) tedious, but gets good results. The biggest difficulty is in keeping the proper rate of knob-turning. I use a stopwatch timer and have a pointer on the knob so I can manually match each second as it goes by. This has to be done in the *dark*, though, for obvious reasons! So there's an additional problem of lighting the dial and stopwatch. My idea would be to affix a steady red LED to the end of the knob pointer and to use an analog clock consisting of 60 red LEDs arranged in a circle around the knob. Only one LED would be lit at a time, starting at 12 o'clock position, and advancing one LED at a time, clockwise, and keeping each LED lit for one second. This arrangement would let me simply match the knob's steady LED with the currently-lit one and thus makes manual matching of the "second hand" visually easy. I expect a 555 timer circuit (powered by battery, not A/C, for portability) could handle this task, but I don't know enough about electronics to know for sure. I'd like to keep the cost lower than it would be if an Arduino-based circuit were used. I've also never made a custom printed circuit board, but I'm game to try after building a successful breadboard. I just need a schematic!  Thanks, all.

Topic by tjerome   |  last reply

What are some recent topics to make an innovative electronics project?

I'm not sure whether i can ask such type of queestions here or not , I am interested in analog electronics,microelectronics,semiconductors .What can be some innovation i can contribut to elctronics. Any help would be recommended.

Topic by jatinbatra   |  last reply

Need help with DMX512 to Analog 0-10VDC Decoder

I am looking to *update* some old strobe lights that my theater uses to be able to control them through our DMX control board.  They have 2 analog 0-10V inputs to control the flash rate and the intensity.  I am looking for the simplest solution as we do not have a lot of money to throw at this project.  I have some experience in electronics as well as working with arduino, but not enough to tackle this job by myself.   Any thoughts on this would be appreciated!  Attaching the control spec sheet. Tom

Topic by AJackOfAllTrades   |  last reply

Sensor Help with Arduino

Hi all! I need help with trying to figure out datasheets. I was digging through my electronics when I found and LM35 sensor. So I looked up the datasheet but I couldn't find out how to convert the analog output to a temperature. I found an i'ble on how to do it but I want to know how to find that information in the datasheet so that next time I get something I'll be able to do it myself. I looked at all the curves and none of them seemed to be temperature vs. voltage. I also looked through the whole first part and couldn't find the multiplier. Also does that multiplier change with the amount of voltage you supply the LM35 with? Say I use 5 volts. Will it give a different reading over 4.5 volts? There's so much technical and complicated data that I don't know what to look for. Here is the link to the datasheet Thanks!

Topic by HavocRC   |  last reply


I am going to start building projects from here (instructables).So i need a toolkit but i am unsure what i need.But I think this will do: A voltmeter or multimeter - Digital or analog i am confused A soldering iron - i already have this A screwdriver set A Drilling machine - I think Bosch would be nice but which one impact or regular and wired or wireless. And am i missing anything above......and hey whats a hot glue gun.Bosch has that but do i really need it? I am not going for big projects so i don't need a router or sander. Does any1 know what are the types of blank circuit boards i mean the circuit boards which do not have any components soldered on. I got a PCB yesterday which had all the holes each row connected to each other by copper strip....that makes things very hard.....And how do i get a third hand in INDIA.... I liked rstraugh's Third hand But the thing are not available in India easily.So can anyone suggest me an easy one.

Question by pratyushpmhptr   |  last reply

Which optical sensor will be best for rotary encoders?

I am trying to make an Optical Rotary Encoder please can anyone suggest that which optical sensor will be best for good resolution and accuracy...I have made one using Photo diode as receptor but the proble i am facing is that switching is not fast enough which results in a lot of what can be done to make photo diode switch fast or should I use some other sensor(phototransistor or Photoresistor) and please do tell the reason...thank you..

Question by malhotra18   |  last reply

Ways to accept bluetooth, USB, Airplay audio inputs to an Amplifier

Hi Please don't shoot me for asking this. I am getting confused. I am building an amp using TA2020, with guidance from datasheet. The input pins accept analog sources. I would like to know how to add Bluetooth, USB, Airplay input support to the amp, since their output is digital (if i am correct). Simply by adding different modules, would it suffice? Now also, where does I2S, DSP fit in. Thanks

Topic by arjunmenon   |  last reply

Analog and Digital Inputs for Teensy 3.2 MIDI Programming within Arduino

Been having some trouble with programming my custom potentiometers for my midi controller. I have 12 buttons and 6 knobs. I have it wired correctly and have the sanwa arcade buttons working fine. I'm just having a huge problem adding analog code to my digital code. I'm not sure where to go from here, I have tried over 20 different types of analog code and I'm not sure what I'm doing wrong. Just need a basic potentiometer for reading MIDI. I have the first 1-12 digital inputs on my teensy soldered in for my arcade buttons. For the analog potentiometers I have them soldered on inputs 18-23 or (A4 thru A9) on the Teensy 3.2. I am using Arduino software along with the Teensy loader. Any help would be greatly appreciated, thank you. Here is the code I have thus far. I only have the 19 and 23 analog inputs written in this one at the very end, because I removed the others.  ******** /* Buttons to USB MIDI Example    You must select MIDI from the "Tools > USB Type" menu    To view the raw MIDI data on Linux: aseqdump -p "Teensy MIDI"    This example code is in the public domain. */ #include // the MIDI channel number to send messages const int channel = 1; // Create Bounce objects for each button.  The Bounce object // automatically deals with contact chatter or "bounce", and // it makes detecting changes very simple. Bounce button1 = Bounce(1, 5);  // 5 = 5 ms debounce time Bounce button2 = Bounce(2, 5);  // which is appropriate for good Bounce button3 = Bounce(3, 5);  // quality mechanical pushbuttons Bounce button4 = Bounce(4, 5); Bounce button5 = Bounce(5, 5);  // if a button is too "sensitive" Bounce button6 = Bounce(6, 5);  // to rapid touch, you can Bounce button7 = Bounce(7, 5);  // increase this time. Bounce button8 = Bounce(8, 5); Bounce button9 = Bounce(9, 5); Bounce button10 = Bounce(10, 5); Bounce button11 = Bounce(11, 5); Bounce button12 = Bounce(12, 5); void setup() {   // Configure the pins for input mode with pullup resistors.   // The pushbuttons connect from each pin to ground.  When   // the button is pressed, the pin reads LOW because the button   // shorts it to ground.  When released, the pin reads HIGH   // because the pullup resistor connects to +5 volts inside   // the chip.  LOW for "on", and HIGH for "off" may seem   // backwards, but using the on-chip pullup resistors is very   // convenient.  The scheme is called "active low", and it's   // very commonly used in electronics... so much that the chip   // has built-in pullup resistors!   pinMode(1, INPUT_PULLUP);   pinMode(2, INPUT_PULLUP);   pinMode(3, INPUT_PULLUP);   pinMode(4, INPUT_PULLUP);   pinMode(5, INPUT_PULLUP);   pinMode(6, INPUT_PULLUP);  // Teensy++ 2.0 LED, may need 1k resistor pullup   pinMode(7, INPUT_PULLUP);   pinMode(8, INPUT_PULLUP);   pinMode(9, INPUT_PULLUP);   pinMode(10, INPUT_PULLUP);   pinMode(11, INPUT_PULLUP);   pinMode(12, INPUT_PULLUP);// Teensy 2.0 LED, may need 1k resistor pullup } void loop() {   // Update all the buttons.  There should not be any long   // delays in loop(), so this runs repetitively at a rate   // faster than the buttons could be pressed and released.   button1.update();   button2.update();   button3.update();   button4.update();   button5.update();   button6.update();   button7.update();   button8.update();   button9.update();   button10.update();   button11.update();   button12.update();   // Check each button for "falling" edge.   // Send a MIDI Note On message when each button presses   // Update the Joystick buttons only upon changes.   // falling = high (not pressed - voltage from pullup resistor)   //           to low (pressed - button connects pin to ground)   if (button1.fallingEdge()) {     usbMIDI.sendNoteOn(61, 99, channel);  // 61 = C#4   }   if (button2.fallingEdge()) {     usbMIDI.sendNoteOn(62, 99, channel);  // 62 = D4   }   if (button3.fallingEdge()) {     usbMIDI.sendNoteOn(63, 99, channel);  // 63 = D#4   }   if (button4.fallingEdge()) {     usbMIDI.sendNoteOn(64, 99, channel);  // 64 = E4   }   if (button5.fallingEdge()) {     usbMIDI.sendNoteOn(65, 99, channel);  // 65 = F4   }   if (button6.fallingEdge()) {     usbMIDI.sendNoteOn(66, 99, channel);  // 66 = F#4   }   if (button7.fallingEdge()) {     usbMIDI.sendNoteOn(67, 99, channel);  // 67 = G4   }   if (button8.fallingEdge()) {     usbMIDI.sendNoteOn(68, 99, channel);  // 68 = G#4   }   if (button9.fallingEdge()) {     usbMIDI.sendNoteOn(69, 99, channel);  // 69 = A5   }   if (button10.fallingEdge()) {     usbMIDI.sendNoteOn(70, 99, channel);  // 70 = A#5   }   if (button11.fallingEdge()) {     usbMIDI.sendNoteOn(71, 99, channel);  // 71 = B5   }   if (button12.fallingEdge()) {     usbMIDI.sendNoteOn(72, 99, channel);  // 72 = C4   // Check each button for "rising" edge   // Send a MIDI Note Off message when each button releases   // For many types of projects, you only care when the button   // is pressed and the release isn't needed.   // rising = low (pressed - button connects pin to ground)   //          to high (not pressed - voltage from pullup resistor)    }   if (button1.risingEdge()) {     usbMIDI.sendNoteOff(61, 0, channel);  // 61 = C#4   }   if (button2.risingEdge()) {     usbMIDI.sendNoteOff(62, 0, channel);  // 62 = D4   }   if (button3.risingEdge()) {     usbMIDI.sendNoteOff(63, 0, channel);  // 63 = D#4   }   if (button4.risingEdge()) {     usbMIDI.sendNoteOff(64, 0, channel);  // 64 = E4   }   if (button5.risingEdge()) {     usbMIDI.sendNoteOff(65, 0, channel);  // 65 = F4   }   if (button6.risingEdge()) {     usbMIDI.sendNoteOff(66, 0, channel);  // 66 = F#4   }   if (button7.risingEdge()) {     usbMIDI.sendNoteOff(67, 0, channel);  // 67 = G4   }   if (button8.risingEdge()) {     usbMIDI.sendNoteOff(68, 0, channel);  // 68 = G#4   }   if (button9.risingEdge()) {     usbMIDI.sendNoteOff(69, 0, channel);  // 69 = A5   }   if (button10.risingEdge()) {     usbMIDI.sendNoteOff(70, 0, channel);  // 70 = A#5   }   if (button11.risingEdge()) {     usbMIDI.sendNoteOff(71, 0, channel);  // 71 = B5   }   if (button12.risingEdge()) {     usbMIDI.sendNoteOff(72, 0, channel);  // 72 = C4   // MIDI Controllers should discard incoming MIDI messages.   //   while ( {     // ignore incoming messages   } } // read the input on analog pin 19:   int sensorValue = analogRead(A5);   // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):   float voltage = sensorValue * (5.0 / 1023.0);   // print out the value you read:   Serial.println(voltage); } // read the input on analog pin 23:   int sensorValue = analogRead(A9);   // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):   float voltage = sensorValue * (5.0 / 1023.0);   // print out the value you read:

Topic by abissmusic   |  last reply

Circuit board heat Trouble. Answered

Full disclaimer, I am still learning and at my current skill level I am essentially following a picture book showing how to hammer a nail then emulating it, Hope that analogy paints the picture correctly. Now for the problem! I have embarked on a journey of growth and learning, in said adventure I took a personal challenge of building something and hopefully learning in the process. Needless to say I did learn, some lessons more painfully than others (soldering Irons are HOT *Sigh*) but I am at an impasse. You should see attached (hopefully) one schematic and two photos. The schematic correlates to the board of course. The next two are of the silkscreen on the board (empty) and the board upon "completion". If you notice in the empty board photo I have drawn your attention to a specific area, the area in question. In this area there seems, during testing, a decent amount of heat build up. Now this may be normal, I do not know. The device calls for the use of three Protected 18650 Lithium Batteries (3.7V I believe). I attempted to do a continuity test with what I thought was under voltage, in hindsight, I'm not sure whether the power cells are in series or parallel so perhaps I was not under? anywho that is when I noticed the heat in that area. I hope I have illustrated my predicament enough for a solid enough understanding, If not I apologize. Please ask any information you require. 

Question by Dauntless   |  last reply

Remote shutter - Transistor madness (or some other sort)

Hi all, I'm trying to build remote shutter for my camera. Intervalometer to be exact. That doesn't really matter. I have this page describing how to make a simple remote shutter. The schema is simple - trivial. However, instead of 2 physical switches, I'd like to control it using audio signal from my smart phone. I'm a programmer and I can make an app that will output signal of any volume and frequency. I'd like to control these two switches using this signal. Those switches provide 4 positions, however only 3 are needed - nothing, focus, shutter. Can anyone adjust that schema, add (probably) transistors or some other parts if needed to make this happen? Remote shutters for other cameras (Canon, Nikon, Pentax, ...) work in similar way, so similar schemas can be derived to serve whole range of digital SLRs. Motivation: I don't want to buy costly and redundant intervalometer, I can create nice app for Android which can work together with just small DIY piece of analog circuit to create wonderful timelapse videos.

Topic by skrat 

Troubling Flyback Transformer Pins

Hello,       I'd like to request someone to share their knowledge about their "flyback" knowledge or experiences with me since I'm having trouble finding the primary coil pins with my flyback transformer. I'm constructing my own HV power supply and I decided to go through this tutorial.       I've read much on the web and found the 0v output pin of my flyback. The problem is .. I couldn't find the primary and secondary since I'm using an analog multimeter and the tutorials on the web are all digital..       When I test the pins with my multimeter set to ohm range of x1, I do not get a pair of 1 ohm pins but instead I got the result of "Continuity" when I test on following pins, they seems to be connected but none of the pins show to 1 ohm.. and thus I've adjust the Ohm Adjustment. The results are Continuity 1 : 1,2,6,8 Continuity 2 : 3,4,7,10 No Continuity: 5,9 Pin no 5 is 0v output..  I've attached the pin number diagram at photos... my drawing and actual pins.. Have you got any idea to find out the primary coil? I've also attach my driver from CFL.. Thanks

Topic by    |  last reply

Wiring LEDs to Corresponding Switches?

I am looking to wire a lot of 12v LEDs to a lot of LED switches. Each light up switch would light up a single corresponding LED and all would be powered by the same power source preferably. Can anyone help me map out a circuit set up for this? I am making a prop for a film and need the help of an expert!

Question by connorbrock   |  last reply

Help needed with custom variable resistor value/range?

I would like 0.4ohm to4ohm variable resistor to replace car IAT sensor, i looked online for pot and resistor combination couldn`t figure it out then i went up a level and was searching variable wemos resistor (it would be nice to see on a small display the original sensor value and the fake one that wemos outputs, just an idea) but no luck either, is there anyone who can point me in the right direction either analog or digital way?thnx alot

Question by turbiny 

Hacking An Alarm Clock

My sister (yes, the one for whom I made earrings) wants me to modify an alarm clock to run a small electronic device when it goes off. Preliminary research has given me two methods:1) A digital clock with a 555 timer circuitIn this setup, a 555 timer circuit is used to translate the signal to an alarm speaker/piezo disk into a relay. When the clock goes off, the relay clicks, and any electrical device that is run through the relay has power.2) An analog clock with a transistor amplifierIn this version, the analog clock seems to just have a straight DC output to the alarm. The transistor is used to amplify the DC to drive the motor of a fire bell.Which of these would be easier to implement? The device I am supposed to use runs off of 3VDC, so I was just going to run the power line through the relay or through the transformer.

Topic by CameronSS   |  last reply

high voltage power supply inputs with a relay??

Hi, I Have a high voltage power supply (5kv) its basically  a flyback driver with a flyback transformer. there's no documents on it. here's my problem. It take 24v DC  and it goes through some sort of weird relay ( and the 8th pin is connected to ground 9th pin seems to be the output. I just cant get it to work. I'm really horrible with analog electronics. Any help would be greatly appreciated.

Question by mman1506   |  last reply

How do I make a circuit that acts like a set of radio buttons, i.e only one LED can be selected at a time.

I'm trying to make a timing light for use in toastmasters and would like to know of any IC's that can help me out. I've already come up with 2 possible solutions, but both seem more complicated than necessary. All I want is to have 3 LEDs with 3 associated push buttons. Any time an LED is selected via a button, any LED that was already on turns off, so that only one LED is on at a time. A rotary switch would be perfect for selecting one LED at a time, however I am looking for a low profile solution, and also something that can be used with one hand while attached to a small light weight device. It seems like there should be an IC for this, but I don't have much experience with them and don't know what this functionality is called. Any advice is appreciated. Edit: I'll also mention that I'm looking for a solution under $50 and that uses parts that I can source locally (both possible solutions mentioned above meet these requirements so I'm not very flexible on this).

Question by NoFiller   |  last reply

3-channel RGB LED Color Organ

Pretty much I want to make a 3-channel color organ and hook it up to a single RGB LED. I'm really not used to analog electronics, but I'm pretty sure this could be achieved with a single quad op amp IC. Seeing as I would much rather trust your guys' expertise over my lack of said knowledge, I thought I'd ask the experts. I did get a schematic in Multisim, but I'm really not sure about the functionality.

Topic by agent   |  last reply

Building a sound visualizer, modulating video with audio?

Hello! I want to build an (analog) sound visualizer. I've already read about building a simple oscilloscope ( but I want to make something more complex, if this is possible. I want to build a sound visualizer that makes psychedelic stuff from audio. Like the sound's frequency modulates the video's frequency, and the sound's volume (amplitude) controls the video's volume (like how much light is created). How could I build something like this? Just playing sound through a video screen won't work because there is a huge difference in wavelenght.  Do I need to build a vocoder (video=carrier, sound=modulator), like with an audio vocoder? I know alot of stuff about audio and audio electronics, however I don't know much about video and video electronics. All help is appreciated!

Question by buidlingstupidstuff   |  last reply

Converting 12v DC to 5v DC

Greetings, I’m very new in electronics. I would like to connect my analog camera that uses 5v dc to my car battery. So I need your help to make a voltage converter. From what I have understand searching the web, I will be possible and very easy actually. All I would need is an opamp and some resistors?!!! Right? So any diagram or anything that you can help me with will be more than appreciated. Thank you for your time reading this. Best Regards P.S. I hope I’m in the right place writing this topic  

Topic by toqilula   |  last reply

AC Voltage Attenuation?

Hello, All- I am making my second version of the "Tube Lamp." Others have managed to wire in these neat-looking old analog meters on theirs, and I thought that would be something I'd like to try. I bought a couple 1-10VAC meters from The problem is (besides the fact that I am an electronics idiot) that obviously if I try to wire in this particular meter to normal 110 AC, the meter will blow up. Is there a way to attenuate the voltage coming out of the dimmer to "play nice" with the 1-10 VAC meter? I suppose I would need to divide the voltage by a factor of 10. How would I step down the voltage to the meter only, while supplying the bulbs with the proper voltage? Any help would be appreciated!

Topic by 40percentrobot   |  last reply

Really basic Resistance / Amperage question:

Before I begin: yes, I should know this already, but I'm really sleep deprived right now, and therefore slightly muzzy on my electronics knowledge... My circuit has two loops running in parallel off one, limited, 18v power supply: [*] Loop 1 requires the majority of the supply's power to run [*] Loop 2 is simply a 7805 voltage regulator supplying 5v to an analog input on an Arduino, so needs almost no current running through it. [*] when Loop 1 and Loop 2 are both active, Loop 1 does not get enough power. if I place a resistor in Loop 2, in series with the 7805, will it increase the amperage to Loop 1? I think the answer is yes, but, once again, I'm MASSIVELY sleep deprived. any help is appreciated.

Topic by gschoppe   |  last reply

Lego Printer == Awesome

The last Lego forum thread I started went down a storm so when I saw this Lego printer online at BoingBoing today I HAD to post it too. YouTube user Horseattack posted this video a few days ago of a printer that he made using Lego to move a felt tip pen across the page. He doesn't give much detail about how it was made or any instructions on how to do it, but the video is pure awesome. Here's what he had to say about it in the video description: "Lego felt tip 110" printer connected to an Apple Mac. This is not a kit you can buy and does not use mindstorms. I designed/built/coded it all from scratch including analog motor electronics, sensors and printer driver, the USB interface uses a "wiring" board.

Topic by Jayefuu   |  last reply

Big project, little parts..Need serious electrical tech help.

Well, long story short in my dumpster diving salvaging e-waste ... 2 Lorex CCTVs. One cord cut, the other intact. I disassembled the cut cord. Lr38603A PCB. Wires Identified GND 12v+ Audio Video  Analog, so USB is out of question. Acer Aspire 5100 laptop. The mommy is toasted (cause mobo sounds so geefy.) so disassembled and salvaged usable parts.I think I tossed the condenser into my "melt parts off circuit board" bin... so I need a condenser and PCB controller which leads me to something I found in my parts bin... CRT monitor, stripped and kept the  VGA PCB, unfortunately it does not have an S-Video and I think it's irrelevant here but I'm quite new to this hack n mod stuff... So, here's what I'm trying to do: Use the LCD from the laptop as a display for the analog camera, I also have several lens and such from damaged optics (hunting scopes, monocular etc) so with the lens I'll put them in a tube and craft a digital microscope. I know you can buy a cheapie USB one, but I want the pride of making something, to be able to understand the tech, and also re-use discarded electronics. I have a pretty good idea of what to do, but I've never worked on anything that involves a serious power source from an outlet and do not want to fry myself, and would like some guidelines/what to research. Google is not being helpful and nearly all the camera hacks I've came across are for USB based cameras. I have access to a solder station, voltometer and a slew of other parts from various electronics, mostly VCR's I'd like to keep the spending to a minimum, but not at the expense of safety. Can anyone help? Thanks :D

Topic by bvarious   |  last reply

Getting leds to light up in sync with wind?

Hi all, I would need your help with a project I have in mind...  I've been at it in my mind for a while, but I'm getting nowhere fast, as I'm rather a newbie in electronics!!  I did enlist a friend to help with that, though! ;) I would like to find a way to have the wind trigger the lighting/fading of a led, the same way one could do with a variable photo resistor (variable-resistor-wind-sensor-like, or could it be more slight-motion-based?). It needs to be compact and inexpensive, as I would need to make a whole lot of those. Ideally, it would be an analog sensor, but I am open to other ideas. No Arduino, though, please...  I'm not there yet.  Either one sensor for each led,  or one sensor for a few leds at a time. It could be powered by an external battery. Any ideas? Thanks!

Topic by lodoiska   |  last reply

How could I make a clock where the hour hand moves only once per hour, in one swift motion? Answered

I am a novice techie, very novice, but i have began to design a clock where the hour hand and minute hand need to move is one swift motion.  For example the minute hand moves just once every 60 seconds, and the hour hand moves just once at the top of the hour.  Im not sure if it would be called nonsweep or what.  I've seen those swiss clocks where I believe the minute hand does this, but I need the hour hand to do it too.  Im just so lost on this.  Dont know weather to go electronic or analog or what.  I need some real techie help here.  I would like to keep this as simple as possible...mostly for my own sake.  Im planning on making some clocks for christmas presents so hopefully you guys can help me solve this problem.  Thanks in advance guys!

Question by holychachi   |  last reply

Is it worth dropping $400 on a really nice oscilloscope (Rigol DS1054Z)?

I will describe my situation: I am a hobbiest that likes to make cool projects, and plan to get into maybe RF analog stuff, (maybe start out with making a few FM bugs, reverse engineer a simple video transmitter kit, and a few other things.) as well get into arduino some more, AC analysis (learn about Xformers, power factor, maybe some math, etc.) and I so currently have an old 2ch. 30MHz analog oscilloscope that is a PITA to make real measurements with. Not only is it huge and takes up a lots of space, but also I'm not even sure it is in cal!) I will be transferring into UVA (or maybe VT) for EE, and gone this summer for a NASA internship at langley. (maybe I will be able to take it with me w/ a toolbox of some electronics stuff!) The scope I am looking at (what appears to be what many subscribers seem to use, and/or claim is pretty good) is the Rigol DS1054Z. I only know how to use my $30 30MHz BKprecision scope I got on craigslist from the son of a father who was a TV repairman, and have NO experience with the use of the fancy-shmancy digital scope! What little I know is from watching EEVblog review of other scopes in the past. (I do know that they can be useful for 'capturing' waveforms, and can be set up to trigger on a pulse, maybe a certain digital codes, and that could come in handy for reverse engineering crap.) What sells it to me, being a complete newbie to electronics and digital scopes is that it has a nice big screen, the specs seem good (other certainly think, I have no intuition of what any of those things mean except the bandwidth, and maybe the sampling rate, 1GSa/s), 4 channels, intensity graded display, and it has loads of functions and stuff for me to grow into, and hacking it to make it think it is a DS1104Z is tempting, but I probably will not do that right away. Maybe once I feel what it offered is limiting. The deal breakers is the $400 price, a bit steep for me (cheap for something this good, apparently but still.), the fear that by the time I really start using it, it will be obsolete and the same money can buy some quantum super duper ASIC tech whiz bang 3GHz 100Gsa/s 1GB segmented memory spectacular scope! I am not really sure if it has a source, or signal generator either. Some sources claim that higher end ones do, or certain models anyway, and it seems like the official site say's no. That brings me to my next point. Should I also get a decent function generator? 

Question by -max-   |  last reply

Is it worth dropping $400 on a shiny new Rigol DS1054Z scope?

I will describe my situation: I am a hobbiest that likes to make cool projects, and plan to get into maybe RF analog stuff, (maybe start out with making a few FM bugs, reverse engineer a simple video transmitter kit, and a few other things.) as well get into arduino some more, AC analysis (learn about Xformers, power factor, maybe some math, etc.) and I so currently have an old 2ch. 30MHz analog oscilloscope that is a PITA to make real measurements with. Not only is it huge and takes up a lots of space, but also I'm not even sure it is in cal!) I will be transferring into UVA (or maybe VT) for EE, and gone this summer for a NASA internship at langley. (maybe I will be able to take it with me w/ a toolbox of some electronics stuff!)   The scope I am looking at (what appears to be what many subscribers seem to use, and/or claim is pretty good) is the Rigol DS1054Z. I only know how to use my $30 30MHz BKprecision scope I got on craigslist from the son of a father who was a TV repairman, and have NO experience with the use of the fancy-shmancy digital scope! What little I know is from watching EEVblog review of other scopes in the past. (I do know that they can be useful for 'capturing' waveforms, and can be set up to trigger on a pulse, maybe a certain digital codes, and that could come in handy for reverse engineering crap.)     What sells it to me, being a complete newbie to electronics and digital scopes is that it has a nice big screen, the specs seem good (other certainly think, I have no intuition of what any of those things mean except the bandwidth, and maybe the sampling rate, 1GSa/s), 4 channels, intensity graded display, and it has loads of functions and stuff for me to grow into, and hacking it to make it think it is a DS1104Z is tempting, but I probably will not do that right away. Maybe once I feel what it offered is limiting.   The deal breakers is the $400 price, a bit steep for me (cheap for something this good, apparently but still.), the fear that by the time I really start using it, it will be obsolete and the same money can buy some quantum super duper ASIC tech whiz bang 3GHz 100Gsa/s 1GB segmented memory spectacular scope!   I am not really sure if it has a source, or signal generator either. Some sources claim that higher end ones do, or certain models anyway, and it seems like the official site say's no. That brings me to my next point. Should I also get a decent function generator?   

Question by -max-   |  last reply

(Arduino) automated macro-photography rail

Hi everyone, I would like to build an Arduino automated macro-photography rail (let's call it AAMR). I'm a decent software engineer and I want to learn electronics, so I'm looking for someone telling me I'm going in the right direction... The idea sounds simple, I want to : 1/ place the subject on the AAMR 2/ input the # of pictures needed to perform a "focus stacking" ( 3/ push the start button and make the AAMR loop n times through the following steps : - trigger the camera to take a picture of the subject - move the subject 1 millimetre toward the camera After a couple weeks reading and day-dreaming, here are my thoughts. I need : - to read more :) - a steeper motor and its driver (I own bipolar steppers and L298 / L293 IC) - to trigger the camera (Canon EOS 70d : remote cable is quite easy to make) - a potentiometer and 2* 7segment displays (input and display the # of pictures) - a start button - a reset button to make the rail come back at position Zero - two "end of course" buttons (not sure about the English terminology), just in case the motor wants to jump over the board - power (5v for the arduino and the logic, 12v for the motors) I. Arduino ---------- First things first, I plan to use an Arduino Uno during prototyping and replace it by a home made board in the final product. Uno has 14 Digital I/O Pins and 6 Analog Input Pins : - stepper => 6 Digital pins (3 ?? if using - 7segment led => 3 Digital pins if using shift registers ( - start button => 1 Digital pin - reset button => 1 Digital pin - "end of course" buttons => 2 Digital pins - camera trigger => 1 Digital pin (to drive an opto isolator / solid state relay) - potentiometer => 1 Analog pin 14 Digital pins ! Uno should do the job, am I right ? (I know I could use Analog pins as Digital ones, but it seems I don't need it...) II. PSU ------- Next interrogation is about power supply : I don't want a battery powered device and my options are scarce : - ATX PSU supplies both 5 and 12v, but Arduino seems to like >5v, so ATX doesn't seem a good choice - home made PSU from an existing wall wart -> voltage divider to get ~7v and ~14v -> 7805/7812 voltage regulator (may need heatsinks and/or little fan) If I do the math : - Arduino : 50ma - Stepper motor : 700mA max - L298 : 70mA (quiescent current) - 2* 7Segment LED (multiplexed) : 2 * 80mA (estimated) - Shift registers IC (SN74HC595N) : 1ma (optional : Hex inverter 74LS04 : ?? mA) Total : around 980mA... Am I doing right ? I have tons of questions left (Hex inverter, filter capacitors, motor noise reduction, solid state relays...), but it's a good start :) Sorry for the long post, and thanks in advance for your answers ! D

Topic by djezzz   |  last reply

Trakpower TK-950 soldering station worth it?

Hey guys! I bought a Chinese knock off 60W variable temp soldering iron for $15CAD and used it intensively for more than a year now and the end of the part holding the tip just started to rust away and doesn't hold the tip in place anymore. Needless to say, I have enough of this and want to get a decent soldering iron, I was planning to get the Hakko FX888D as you can't get the analog knob model anymore but it's only available online from the US and comes up to $180-200CAD with the shipping which is way too expensive. I can get the TrackPower TK-950 (TeamCheckpoint TC-950 is basically the same one but the older version) for $130CAD with a 5 years warranty at my local store, it seem like a clone of the Hakko 936 but what kind of quality is it? Perhaps like the Yihua? If you guys know anything about it or any other recommendations on soldering stations I can get for around the same price with better quality in Canada, it'd be great! I do a lot of soldering through hole only for now and I also do a lot of desoldering, this is how I get most of my electronic components so I need a soldering station that will last me for a while and that doesn't smell like a Chinese knock off out of the box. Thanks for your time. :) -Electrospark

Topic by Electrospark   |  last reply

How to make a mains power AC voltage meter for input as an MCU sensor?

Hi, I live off grid and need to keep an eye on various properties from various power sources. This includes, VDC 12-24 from the solar panels, VAC 220 from the fallback generator. VAC 220 from the inverter into the house. I can find off the shelf sensors for the AMPS which can feed into various MCUs I can find circuits to build sensors for AMPS, not a problem. What I cannot find is either off the shelf VOLTS level indicator sensors or circuits that do not involve plugging in walt-warts to bring the voltage down. Space is a premium so ideally I wanted to plug a live and neutral wire into one end of a pcb and have hopefully an analog 0-5 VDC representation coming out of the other. I have in my box some small 6, 9 and 12 unregulated mains VAC transformers. I find it strange that I can buy from China a small LCD with Volts, Amps, Watts and Hertz for about 8€ but not a barebones system which is what I need. So if anyone knows how to either hack one of these Chinese meters to give MCU usable input data or can help me build a meter, I would be very grateful. My son-in-law is an electrician but electronics is alien to him. So he can oversee the safety on big stuff. Thanks and kind regards, jB

Question by britesc   |  last reply

Potentiometer not working after connected to wires

Hi, I'm fairly new to electronics and I'm trying to learn it with my Arduino. Recently I have been working on a project that involves 4 potentiometer(pot). I'm using one 1k pot and 3 10k pot. The pot is used to send signals to the analog inputs of the arduino. To test the pots I used a simple serial.println program that sends the value of the pot from 0 - 1023. When I connect the pot through its 3 pins directly to the breadboard, all of them work perfectly fine and gives me a stable value as I turn the pot. However, when I soldered three wires to them each, 2 of them work and 2 of them didnt. The 1k and one of the 10k pot didnt work. When I connected it through its wires, the values it gave kept jumping even when I'm not turning the knob and sometimes it will just stay one value when I'm turning it or not. Why is this happening? Did I overheat the pot when soldering? I took some new pots and tested them again through the pins directly and it worked perfectly fine. But when I soldered the wires to it, this time the 10k worked fine and the 1k didnt work. It gave the same problem as the ones before. Please help me with this problem. I have attached the pictures of the pots that didn't work. Please help me check if my soldering is anything wrong. I have checked online couldn't fine anyone experiencing the same problem. TQ! 

Topic by KhayhenS   |  last reply

Casio pocket Tv: Tv-1900B info/suggestions on uses?

I just received a casio pocket television model: Tv -1900b, produced somewhere in the late 80-mid 90's(cannot find year) as a gift from my sister, purchased for 2.99 from goodwill, she bought it because I like vintage electronics, and thought it was useable as she was not aware of the difference between dtv and analog, and took the label heading that it received working channels for true, from my research it appears to be functioning but is receiving no signal due to the dtv transition. this is my problem, I am trying to figure out ways around not having an available analog broadcast to pick up, and can not find much info for this tv model online, not even part labels manuals or specs, Im wondering what my options for use or connecting it to another device are.. There is what appears to be an extra headphone sized jack/connector at the top next to the speaker, and a headphone plug does fit into it... but the label for it is long gone, so I do not know if it is an external antenna connection, external composite video in port, external video out port, or a service port of some kind, as it is right next to the rod antenna  screw connection, what exactly is it, and can it be used for an external video/sound input connection?, I see that  on other models before and after this one it can be used as a video/audio input, when utilized with a rca to headphone adapter cord but that does not tell me for sure if mine has that ability. What are my options with this?, I have some technologic know-how, but could not build my own signal transmitter, oscilloscope, built in jack, etc from scratch. is this model capable of easy external connections?, is the extra hole for an antenna input, video input or both?, can a box, dvd or vcr be connected, also is wrapping wire around the antenna and then connecting to the coaxial output on an external device feasible? Iv seen it work on other pocket tv's on the internet but dont know about the true signal quality/effeniency I would be able to make most physical external connection adapters myself, or, are adapters other then the headphone to rca adapters sold to remedy the problem of having a rod antenna and little to no external hook-ups? p.s I am not opposed to having it constantly wired/tethered to a much larger device, as it would be used for a novelty or in a small area where a larger unit would be to big or unweildy, like next to a bed, spot at the table, etc, also I would probably not use it for cctv or similar as I have little to no use for such things the picture included is not of my actual item, but the same model and version, for reference purposes I appreciate any help, as it appears to be functioning it would be a shame to not find a use for .

Topic by spiky84   |  last reply

Why to use RF directional couplers in some measurements and control processes ?

I am an electronic engineer in the field of RF directional couplers, but I am puzzled about this question, why to use RF directional couplers in some measurements and control processes ? Today I come to this forum to turn to you to discuss my understandings are appropriate. Here are my personal understandings: RF radio frequency is referred to as RF current, it is a high frequency AC change electromagnetic wave short. Less than 1000 times per second changes in alternating current called low frequency current, more than 10000 times called high frequency current, and radio frequency is such a high frequency current. RF technology in the field of wireless communications with a wide range of irreplaceable role. In the electronics theory, the current flows through the conductor, the conductor will form a magnetic field around; alternating current through the conductor, the conductor will form an alternating electromagnetic field, known as electromagnetic waves. When the electromagnetic wave frequency is lower than 100khz, the electromagnetic wave will be absorbed by the surface, can not form an effective transmission, but the electromagnetic wave frequency is higher than 100khz, the electromagnetic wave can be spread in the air, and the outer edge of the ionospheric reflection, the formation of long-distance transmission capacity (Analog or digital) with high-frequency current modulation (amplitude modulation or FM), the formation of radio frequency signals, through the antenna to launch into the air, the radio frequency of the high-frequency electromagnetic waves.  Long-range radio frequency signal received after the anti-modulation, reduced to the electrical information source, this process is called wireless transmission. Wireless transmission developed for nearly two hundred years, forming a large number of users and product groups, but because of climate change and the impact of surface obstacles, can not transmit the perfect information. Modern human invention of the cheap high-frequency transmission cable (radio frequency line), in order to pursue the perfect quality of information transmission, taking into account the original wireless devices, wireless cable transmission began to pop. Resulting in the concept of radio frequency transmission. If your information source through the secondary modulation, with the cable to the opposite end, the opposite side with anti-modulation of the information source after the re-application, no matter how low frequency, but also radio frequency transmission, if there is no modulation anti-modulation process, The information source is transmitted directly to the opposite end of the cable, no matter how high the frequency, are the general cable transmission. SI --- Signal Integrity Signal Integrity PI --- Power Integrity Power Integrity emc --- electromagnetic compatibility Electromagnetic Compatibility rf - radio frequency RF emc = emi + ems EMI = Conduction + Radiation Emission SI: The Fourier transform shows that the higher the signal rises, the higher the amplitude of the higher harmonics. The MAXWELL equations see that these alternating harmonics produce alternating current at the adjacent line. And even through the space parasitic capacitance directly to another conductor, so these high harmonics is caused by radiation interference (emission) of the main factors; (that the simple point is that the signal rise faster, the more complete the signal, the better the signal quality, But for emi bad) . PI: PCB exists on the number \ \ analog area, high frequency \ 'low frequency region and other different areas and planes, if the partition is not easy to interfere with each other, that is, conduction conduction (conduction). Ps: Excuse me if I was wrong in words or expressions as I am a green hand in the field of RF directional couplers. I need continual learnings. What is your idea ? Do you agree with my ideas ? Any of your ideas would be highly appreciated. May someone would like to help ? thanks in advance.

Topic by maryzhu   |  last reply

follow-up capacitor Q's ? Answered

I am amazed at all the great responses I got with my last question, thank you all! :D Though now I have a few more: 7) Should I try to learn how to work with complex impedance (capacitors, resistors, and inductors in all sorts of weird configurations) Also, can I treat reactance in general as a resistance when looking at capacitors in series or parallel with resistive loads and stuff? For example, can I simply add up Xc, Xi, and R for a total impedance? Or do I have to worry about phase shifts and stuff?  8) Is it OK to say that "Q" or charge is a more theoretical physics concept and is not too important with practical electronics? (C, V, and I being more of the focus and "ignoring" Q is OK?) 9) I have added a few of the "slides" and sneak-peaks to my upcoming video. If anything is wrong don't hesitate to nitpick and point it out! 10) capacitor fall under 2 major categories, polarized and nonpolarized. 10a) [under the 'polarized' branch] Electrolytic and tantalum capacitors are used for bulk filtering, but are evil and do not tolerate overloads particularly well. Especially tantalums. They tend to be available in huge capacitances, but can be "leaky" and have high ESR and series inductance. 10b) [under nonpolarized branch] Ceramic capacitors are the most common type of capacitors, and come in a few types. Generally used for local decoupling. They are pretty robust and tolerate overloads. Film capacitors find more use in high voltage applications, have lower leakage, better high frequency performance, and certain types have self-healing properties allowing them to tolerate overloads and surges the best. Mica capacitors are generally the most stable, with the lowest leakages, so they find uses for more critical analog applications.

Question by -max-   |  last reply

How to properly setup an undefined numbers of piezos for drumming ?

Hello everybody ! I'm currently into a really cool project which gives me quite hard times. To begin, I'm a big noob in electronics, but I'm decent in programming. So i'm able to understand, learn or correct myself easily when it's about code, but I'm really in the dark for everything concerning electronics despite the fact that I read so much about it recently... My projet ------------ My goal is to make my own MIDI drum kit. Not a new idea, but the difference is that I want to use lot of pads. I bought some WII, XBOX and PS drum kits that I disassembled to get just de pads. Then I bought an Arduino Uno, not a mega because I'm a beginner and I can totally start with a small amount of pads, also I wanted the perfect solution in terms of compatibility etc. STEP ONE : 1 pad -------------------- So, I first made a prototype with 1 pad, which was very easy to do, since there is billion of officials and unofficials tutorials about how to connect a piezo to the Arduino. So basically, on my breadboard its like that (except im on A0 not A2) : So I connected my pad to the Arduino with a 1 Mohm resistor in parallel and I made a program which function very very well. You can read it the : The only challenge here was to set proper threshold and delay so the signal is clean when I hit the pad with a drumstick, to integrate the MIDI library and finally to find a software that makes the informations i send available in any of my favourites music softwares (Ableton Live, Maschine, ...), this software is Hairless Serial to MIDI, btw. STEP TWO : X pads --------------------------- It's when I'm getting troubles. At first I believed that all I needed to do was to reproduce the same schematic but "duplicate it" x times. So I tried with 4 pads. I used the same strategy on my breadboard : each pad is connected in parallel with a 1 M ohm resistor, but all are connected to ground. You can see it there : The code, take the old one, but just loop on the 4 pins : So here are the 2 issues : - The pad on the left is OK, like with my 1st program, the second one is still ok, the third one I have to hit a bit hard, the fourth one I have to hit VERY hard. - When I hit a pad, it seems it send electricity in others pins, I say that because when i connect the Arduino to a music software, hiting a pad = having multiples notes at the same time. For the hitting force issue, I'vre tried to play with resistances, puting higher or lower values and I got totally lost with that : nothing seemed to be better. About that "leaking" issue, I thought it could be useful to put some diodes, as i heard diodes are usefull when you want to make the current going in one way only, but when i watch some others schematics, i see no diodes and only 1 Mohms resistors everywhere, so I really don't know what is wrong and what to do. Here is the MIDI xylophone someone made and posted on instructables : I have no idea why this is working and why there is ground directly linked to these analog pins, and many other things i cannot understand. Any help would be really appreciated ! :)

Question by AnthonyJ7   |  last reply

Attempting to create tiny, wearable, covert, simple button click counter for behavioral mod

Hi all, I've been searching both this forum and the internet in general and strangely have not come across what I'm looking to do even though to me it seems very simple. Here are the specifications/requirements of the device that I am trying to create: -extremely tiny form factor (ideally a ring sized device but I'll settle for a thin bracelet) -unobtrusive/inconspicuous (I guess a thin bracelet that could hide under a sleeve might be best) -battery powered/untethered (This is essential. The device would be useless if depended on a connection to a computer or wall socket) -battery life must last a full day -data logged is just a simple time/day stamp that would indicate when a button was clicked by the wearer      (wearer would manually click the button during the day when certain thoughts came up for him/her)       This requirement indicates that the micro controller chosen would need a clock built in and        some kind of storage - be able to upload the data to a computer I did my preliminary research considering these requirements and I came up with the following electronic components that might work: - teensy 3 (has real time clock and 2K EEPROM which should be plenty of memory for storing date stamps) - ulog (1MB of usable space across 3 analog channels, couldn't find anything about a built in clock) - Pro Micro - 3.3V/8MHz (not sure about built in real clock  but storage is 32K flash space) - OpenLog (wasn't clear about how much built in storage and didn't see any build in real time clock) These are the best I could find. If anyone has better suggestions please let me know? My idea is to connect a Mini Push Button Switch to one of the digital inputs on one these micro controllers/data loggers and write a simple sketch that records the time the button was pushed in a MMDDYYhhmm format (10 bytes per click). To power any of these micro controllers/data loggers I was planning to use a Coin Cell Battery - 12mm. I was going to sew the micro controllers/data loggers on one side of a thin piece of material that would serve as a bracelet and sew the battery on the other side. Although I'm not sure how to fix the battery to the cloth and how to connect it to the micro controllers/data loggers. I'm guessing I could find some kind of battery holder for the 12mm cell battery? Other Questions about my assumptions: Will I have enough storage left over on the flash space or EEPROM to store the data click after the sketch code has been loaded in? Will a watch battery provide enough energy to run this device all day? Is the Coin Cell Battery - 12mm the correct external power source for this project? I encourage any feed back, criticism, comments, help of any kind to move me along with this preparation so that I can move forward and purchase the parts I need. Thanks! Michael

Topic by mhussar   |  last reply

Can Someone Modify an Arduino Sketch For Me? Answered

I recently got into Arduino, and my first long term project is an autonomous roaming robot. Now, I've been in electronics for a while, so the actual building of the thing was not a problem....but the programming is. I've found a couple examples of codes online, but they all use Sharp IR sensors, whereas I have a Ping))) Ultrasonic sensor. I was wondering if there were any Arduino experts out there that could modify a sketch that I found to only use the Ping))) instead of the IR sensor(s). This sketch actually uses both, and would be perfect if the Ping))) was used in place of the IR sensors, rather than with them. If anybody could modify the sketch below to do as I said, your help would be greatly appreciated. Thanks. Code: int micVal; int cdsVal; int irLval;  // Left IR int irCval;  // Center IR int irRval;  // Right IR int i;   // Generic Counter int x;  // Generic Counter int PLval;  // Pulse Width for Left Servo int PRval;  // Pulse Width for Right Servo int cntr;  // Generic Counter Used for Determining amt. of Object Detections int counter; // Generic Counter int clrpth;  // amt. of Milliseconds Of Unobstructed Path int objdet;  // Time an Object was Detected int task;  // Routine to Follow for Clearest Path int pwm;  // Pulse Width for Pan Servo boolean add;  // Whether to Increment or Decrement PW Value for Pan Servo int distance;  // Distance to Object Detected via Ultrasonic Ranger int oldDistance;  // Previous Distance Value Read from Ultrasonic Ranger float scale = 1.9866666666666666666666666666667;  // *Not Currently Used* int LeftPin = 6;  // Left Servo int RightPin = 9;  // Right Servo int PiezoPin = 11;  // Piezo int PingServoPin = 5;  // Pan Servo int irLPin = 0;            // Analog 0; Left IR int irCPin = 1;            // Analog 1; Center IR int irRPin = 2;            // Analog 2; Right IR int ultraSoundSignal = 7; // Ultrasound signal pin int val = 0;              // Used for Ultrasonic Ranger int ultrasoundValue = 0;  // Raw Distance Val int oldUltrasoundValue;  // *Not used* int pulseCount;        // Generic Counter int timecount = 0; // Echo counter int ledPin = 13; // LED connected to digital pin 13 #define BAUD 9600 #define CmConstant 1/29.034 void setup() {   Serial.begin(9600);   pinMode(PiezoPin, OUTPUT);   pinMode(ledPin, OUTPUT);   pinMode(LeftPin, OUTPUT);   pinMode(RightPin, OUTPUT);   pinMode(PingServoPin, OUTPUT);   pinMode(irLPin, INPUT);   pinMode(irCPin, INPUT);   pinMode(irRPin, INPUT);   for(i = 0; i < 500; i++) {     digitalWrite(PiezoPin, HIGH);     delayMicroseconds(1000);     digitalWrite(PiezoPin, LOW);     delayMicroseconds(1000);   }   for(i = 0; i < 20; i++) {   digitalWrite(PingServoPin, HIGH);   delayMicroseconds(655 * 2);   digitalWrite(PingServoPin, LOW);   delay(20);   }   ultrasoundValue = 600;   i = 0; } void loop() {   //Scan();   Look();   Go(); } void Look() {   irLval = analogRead(irLPin);   irCval = analogRead(irCPin);   irRval = analogRead(irRPin);   //if(counter > 10) {     //counter = 0;     //readPing();   //}   if(irLval > 200) {     PLval = 820;     PRval = 850;     x = 5;     cntr = cntr + 1;     clrpth = 0;     objdet = millis();   }   else if(irCval > 200) {     PLval = 820;     PRval = 850;     x = 10;     cntr = cntr + 1;     clrpth = 0;     objdet = millis();   }   else if(irRval > 200) {     PLval = 620;     PRval = 650;     x = 5;     cntr = cntr + 1;     clrpth = 0;     objdet = millis();   }   else {     x = 1;     PLval = 620;     PRval = 850;     counter = counter + 1;     clrpth = (millis() - objdet);     if(add == true) {       pwm = pwm + 50;     }     else if(add == false) {       pwm = pwm - 50;     }     if(pwm < 400) {       pwm = 400;       add = true;     }     if(pwm > 950) {       pwm = 950;       add = false;     }     digitalWrite(PingServoPin, HIGH);     delayMicroseconds(pwm * 2);     digitalWrite(PingServoPin, LOW);     delay(20);     readPing();     if(ultrasoundValue < 500) {       cntr = cntr + 1;       switch(pwm) {         case 400:           x = 7;           PLval = 650;           PRval = 650;           Go();           break;         case 500:           x = 10;           PLval = 650;           PRval = 650;           Go();           break;         case 600:           x = 14;           PLval = 850;           PRval = 850;           Go();           break;         case 700:           x = 10;           PLval = 850;           PRval = 850;           Go();           break;         case 950:           x = 7;           PLval = 850;           PRval = 850;           Go();           break;       }     }   }   //Serial.print("clrpth: ");   //Serial.println(clrpth);   //Serial.print("objdet: ");   //Serial.println(objdet);   //Serial.print("cntr: ");   //Serial.println(cntr);   if(cntr > 25 && clrpth < 2000) {     clrpth = 0;     cntr = 0;     Scan();   } } void Go() {   for(i = 0; i < x; i++) {     digitalWrite(LeftPin, HIGH);     delayMicroseconds(PLval * 2);     digitalWrite(LeftPin, LOW);     digitalWrite(RightPin, HIGH);     delayMicroseconds(PRval * 2);     digitalWrite(RightPin, LOW);     delay(20);   } } void readPing() {  // Get Distance from Ultrasonic Ranger timecount = 0; val = 0; pinMode(ultraSoundSignal, OUTPUT); // Switch signalpin to output /* Send low-high-low pulse to activate the trigger pulse of the sensor * ------------------------------------------------------------------- */ digitalWrite(ultraSoundSignal, LOW); // Send low pulse delayMicroseconds(2); // Wait for 2 microseconds digitalWrite(ultraSoundSignal, HIGH); // Send high pulse delayMicroseconds(5); // Wait for 5 microseconds digitalWrite(ultraSoundSignal, LOW); // Holdoff /* Listening for echo pulse * ------------------------------------------------------------------- */ pinMode(ultraSoundSignal, INPUT); // Switch signalpin to input val = digitalRead(ultraSoundSignal); // Append signal value to val while(val == LOW) { // Loop until pin reads a high value   val = digitalRead(ultraSoundSignal); } while(val == HIGH) { // Loop until pin reads a high value   val = digitalRead(ultraSoundSignal);   timecount = timecount +1;            // Count echo pulse time } /* Writing out values to the serial port * ------------------------------------------------------------------- */ ultrasoundValue = timecount; // Append echo pulse time to ultrasoundValue //serialWrite('A'); // Example identifier for the sensor //printInteger(ultrasoundValue); //serialWrite(10); //serialWrite(13); /* Lite up LED if any value is passed by the echo pulse * ------------------------------------------------------------------- */ if(timecount > 0){   digitalWrite(ledPin, HIGH); } } void Scan() {   // Scan for the Clearest Path   oldDistance = 30;   task = 0;   for(i = 1; i < 5; i++) {     switch(i) {       case 1:         //Serial.println("Pos. 1");         pwm = 1125;    ///  incr. by 100 from 1085         break;       case 2:         //Serial.println("Pos. 2");         pwm = 850; //// increased by 100 from 850         break;       case 3:         //Serial.println("Pos. 3");         pwm = 400;         break;       case 4:         //Serial.println("Pos. 4");         pwm = 235;         break;     }     for(pulseCount = 0; pulseCount < 20; pulseCount++) {  // Adjust Pan Servo and Read USR       digitalWrite(PingServoPin, HIGH);       delayMicroseconds(pwm * 2);       digitalWrite(PingServoPin, LOW);       readPing();       delay(20);     }     distance = ((float)ultrasoundValue * CmConstant);   // Calculate Distance in Cm     if(distance > oldDistance) {  // If the Newest distance is longer, replace previous reading with it       oldDistance = distance;       task = i;   // Set task equal to Pan Servo Position     }   }   //Serial.print("Task: ");   //Serial.println(task);   //Serial.print("distance: ");   //Serial.println(distance);   //Serial.print("oldDistance: ");   //Serial.println(oldDistance);   distance = 50;  // Prevents Scan from Looping   switch(task) {   // Determine which task should be carried out     case 0:  // Center was clearest       x = 28;       PLval = (850);       PRval = (850);       Go();       break;     case 1:  // 90 degrees Left was Clearest       x = 14;       PLval = (650);       PRval = (650);       Go();       break;     case 2:  // 45 degrees left       x = 7;       PLval = (650);       PRval = (650);       Go();       break;     case 3:  // 45 degrees right       x = 7;       PLval = (850);       PRval = (850);       Go();       break;     case 4:  // 90 degrees right       x = 14;       PLval = (850);       PRval = (850);       Go();       break;   } }    

Question by punkhead58   |  last reply

Connect a Sketch Answered

This is a People counter, well hope to be if working.ha. Lazer across a doorway hitting a LDR. The 4 digit 7 seg display counting up 1 each time a person breaks the beam.  As of now i  have a counting sketch from the Sparkfun example. It is counting up 0 to 999 and at the same time i have an LDR reading to the serial monitor and blinking the LED on pin 13. But they are not "interacting". I am trying to get the beam breakes from the LDR to advance the count by 1 every time it is broken. In the loop function is the mills that was advancing the counting. I have changed it to   displayNumber(counter).  Among other things.But i haven't been successful in having the LDR advance the count. The sketch is still missing some "stuff". What could i change to have the counter advance by 1 every time the lazer beam is broken?    Thanks W /* 6-13-2011 Spark Fun Electronics 2011 Nathan Seidle This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). 4 digit 7 segment display: Datasheet: This is an example of how to drive a 7 segment LED display from an ATmega without the use of current limiting resistors. This technique is very common but requires some knowledge of electronics - you do run the risk of dumping too much current through the segments and burning out parts of the display. If you use the stock code you should be ok, but be careful editing the brightness values. This code should work with all colors (red, blue, yellow, green) but the brightness will vary from one color to the next because the forward voltage drop of each color is different. This code was written and calibrated for the red color. This code will work with most Arduinos but you may want to re-route some of the pins. 7 segments 4 digits 1 colon = 12 pins required for full control */ #define ldrPin A2    // pin used for input (analog)    int digit1 = 11; //PWM Display pin 1 int digit2 = 10; //PWM Display pin 2 int digit3 = 9; //PWM Display pin 6 int digit4 = 6; //PWM Display pin 8 //Pin mapping from Arduino to the ATmega DIP28 if you need it // //int ldrPin = A2; int segA = A1; //Display pin 14 int segB = 3; //Display pin 16 int segC = 4; //Display pin 13 int segD = 5; //Display pin 3 int segE = A0; //Display pin 5 int segF = 7; //Display pin 11 int segG = 8; //Display pin 15 int ldr_pinValue; int counter; int currState; int then; //int ldrpread; //int digit[4]; //int leftover; int LDR = A2;                                //analog pin to which LDR is connected, here we set it to 0 so it means A0 int LDRValue = 0;                    //that’s a variable to store LDR values int light_sensitivity = 500;  //This is the approx value of light surrounding your LDR //int digit_to_show = 0; int ldr_Pin = 0;  // LED status (0 = low, 1 = high) int inVal = 0;    // variable used to store state of input int switchOn = 725;   // value at which we switch LED on int switchOff = 550;  // value at which we switch LED off void setup() {         {     Serial.begin(9600);            //start the serial monitor with 9600 buad     pinMode(13, OUTPUT);     //we mostly use13 because there is already a built in yellow LED in arduino which shows output when 13 pin is enabled   }       pinMode(ldr_Pin, INPUT );    pinMode(segA, OUTPUT);   pinMode(segB, OUTPUT);   pinMode(segC, OUTPUT);   pinMode(segD, OUTPUT);   pinMode(segE, OUTPUT);   pinMode(segF, OUTPUT);   pinMode(segG, OUTPUT);   pinMode(digit1, OUTPUT);   pinMode(digit2, OUTPUT);   pinMode(digit3, OUTPUT);   pinMode(digit4, OUTPUT);     pinMode(13, OUTPUT); } void loop(){ {     LDRValue = analogRead(LDR);          //reads the ldr’s value through LDR which we have set to Analog input 0 “A0″     Serial.println(LDRValue);                  //prints the LDR values to serial monitor     delay(5);                                                //This is the speed by which LDR sends value to arduino     if (LDRValue < light_sensitivity)       {         digitalWrite(13, HIGH);       }     else       {         digitalWrite(13, LOW); {    if (currState() >  300) then         currState = HIGH    } else     currState = LOW //endif if currState != prevState and currState == LOW then // LOW or HIGH depending on the circuit     counter++     prevState = currState endif      //long startTime = millis();   displayNumber(counter);     //while( (millis() - startTime) < 2000) {   //displayNumber(1217);   //}   //delay(1000);    } //Given a number, we display 10:22 //After running through the 4 numbers, the display is left turned off //Display brightness //Each digit is on for a certain amount of microseconds //Then it is off until we have reached a total of 20ms for the function call //Let's assume each digit is on for 1000us //Each digit is on for 1ms, there are 4 digits, so the display is off for 16ms. //That's a ratio of 1ms to 16ms or 6.25% on time (PWM). //Let's define a variable called brightness that varies from: //5000 blindingly bright (15.7mA current draw per digit) //2000 shockingly bright (11.4mA current draw per digit) //1000 pretty bright (5.9mA) //500 normal (3mA) //200 dim but readable (1.4mA) //50 dim but readable (0.56mA) //5 dim but readable (0.31mA) //1 dim but readable in dark (0.28mA) void displayNumber(int toDisplay) { #define DISPLAY_BRIGHTNESS  500 #define DIGIT_ON  HIGH #define DIGIT_OFF  LOW   long beginTime = millis();   for(int digit = 4 ; digit > 0 ; digit--) {     //Turn on a digit for a short amount of time     switch(digit) {     case 1:       digitalWrite(digit1, DIGIT_ON);       break;     case 2:       digitalWrite(digit2, DIGIT_ON);       break;     case 3:       digitalWrite(digit3, DIGIT_ON);       break;     case 4:       digitalWrite(digit4, DIGIT_ON);       break;     }     //Turn on the right segments for this digit     lightNumber(toDisplay % 10);     toDisplay /= 10;     delayMicroseconds(DISPLAY_BRIGHTNESS);     //Display digit for fraction of a second (1us to 5000us, 500 is pretty good)     //Turn off all segments     lightNumber(10);     //Turn off all digits     digitalWrite(digit1, DIGIT_OFF);     digitalWrite(digit2, DIGIT_OFF);     digitalWrite(digit3, DIGIT_OFF);     digitalWrite(digit4, DIGIT_OFF);   }   while( (millis() - beginTime) < 10) ;   //Wait for 20ms to pass before we paint the display again } //Given a number, turns on those segments //If number == 10, then turn off number void lightNumber(int numberToDisplay) { #define SEGMENT_ON  LOW #define SEGMENT_OFF HIGH   switch (numberToDisplay){   case 0:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_OFF);     break;   case 1:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 2:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 3:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 4:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 5:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 6:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 7:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 8:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 9:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 10:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   } }

Question by WWC   |  last reply