Beginner Components? - Page 1
Forum section: electronics / beginners

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 19, 2015, 01:28:30 am
content: I'm new to electronics and have been teaching myself as I go but I keep discovering new components that have really essential functionality (like comparators or digital potentiometers) and was wondering if anybody would be willing to list off anything really basic (along with a cheap part number I can experiment with) that you would think is a must for beginners to learn.I've only really heard of/ experimented with:relaysmotion sensorsswitch'stransistorspotentiometersdigital potentiometersresistorscapacitorsdiodesmicrocontrollerLED's and Lazer DiodesPhotoresistorShift RegistersMultimeterServo and toy motorsUltrasonic TransducerRFIDOp Amp555ThermistorBarometric Pressure Sensor--------------------------ADDENDUM--------------------------Incase anybody in the future might find this post of any use... if you're a beginner like me and are looking for cheap parts to experiment with or discover, this site has been pretty usefulhttp://www.taydaelectronics.com/

author: xrunner
author_rank: Super Contributor
timestamp: February 19, 2015, 01:55:27 am
content: I think you've got the basic stuff covered.

author: LaurentR
author_rank: Frequent Contributor
timestamp: February 19, 2015, 01:57:44 am
content: The two "Make: Electronics" books are pretty decent for very basic electronics stuff.They also have 2 matched packs of components to do the circuits in the book. You might want to look at the books themselves (depending on where you're at right now) and the kits (or at least the list of components in the kits).This is the link to the whole thing. Linkes to the books and the kits are included:http://www.makershed.com/products/make-electronics-the-complete-collectionJameco (in the US) has similar (unbranded) kits:http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2129115_-1http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2129123_-1Again you may want to look at the inventory in these kits.They also have a bunch of assortments of parts and interesting kits, all reasonably priced - worth browsing through their catalog.If you want to read about components, the fist two volumes of "Encyclopedia of Electronic Components" by Charles Platt are easy reads. You'll find more in the (fairly) definitive and poorly named "Practical Electronics for Inventors" by Paul Scherz.

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: February 19, 2015, 03:09:34 am
content: Quote from: LaurentR on February 19, 2015, 01:57:44 amI support this view. The book "Practical electronics for inventors" by Paul Scherz and Simon Monk is a good book for beginners, despite many misprints that remain through editions. It contains a quite complete list of basic parts (section 7.5.21 of chapter 7 : hands on Electronics). The table is barely readable in the kindle edition, but you should prefer the printed version of the book which is only 22.6$ (at amazon for example) and well printed.

author: Simon
author_rank: Unknown
timestamp: February 19, 2015, 06:49:21 am
content: is this a joke ?

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: February 19, 2015, 08:32:39 pm
content: Quote from: Simon on February 19, 2015, 06:49:21 amWhat do you mean ? Be more specific please.

author: Seppy
author_rank: Unknown
timestamp: February 20, 2015, 01:23:00 am
content: Perhaps have a look into:zenersinductorsLDO'sMOSFETSJust as a sidenote, don't be afraid of surface mount components, in many cases they are easier to use and almost always cheaper than their through hole counterparts.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 08:10:08 pm
content: Lol, I have been avoiding surface mounted components, but that's because I don't have a regular place to solder things into place at the moment... actually that's something I've been wondering about... sure you save space with surface mounted components, but if components where built more like legos where you could just pull them in and out whenever there was a need... there would be a lot less waste and it would remove a barrier to entry for beginners... are there any other justifications besides space for not just having slots for the components to plug into (I've seen fuses that are mounted like this such as in cars, but why not capacitors, transformers, resistors, etc.)

author: Simon
author_rank: Unknown
timestamp: February 22, 2015, 08:17:51 pm
content: Quote from: JacobEdward on February 22, 2015, 08:10:08 pmI'm afraid it's down to our usual friend of cost and profits. You would still need to solder something wouldn't you? There are many reasons to use surface mount over through-hole, firstly as you suggest space and secondly shorter leads work better at high frequencies so you will never find something that works for example in a satellite receiver made with through-hole components it just won't work.Through-hole components are also a righteous pain in the arsehole to assemble onto boards, it is quite a laborious and manual operation. There may be machines that can do it but I would expect it much more complicated than surface mount. Surface mount components are fitted with pick and place machines which can place many components in a second. Because they do not have leads that have to go through holes and simply sit on solder pads on the board the whole assembly process is quicker and cheaper to automate. The boards are coated in the correct places with solder paste, the components are placed on the board with pick and place machines and then the whole thing goes through an oven often all three of these operations done on one assembly line in one take this is something that is more difficult to achieve with surface mount. These days militarisation is generally key and many parts are not even produced in through-hole because large-scale manufacturers do not want them so us mere mortals have to resort to various break out boards.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 08:22:48 pm
content: Fucking militarism... we really gotta get off of that...Anyways, besides motors, what's a good inductor part for general use or experimenting with (same with zener and LDO)? I have a bunch of bipolar transistors, is it really necessary to use MOSFETs?Is it a pain to solder a surface mount manually?

author: Simon
author_rank: Unknown
timestamp: February 22, 2015, 08:24:19 pm
content: You use the parts you need, the question is more, what are you trying to do ?

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 08:27:54 pm
content: Well, at the moment I'm just trying to prove a bunch of the concepts empirically and then I was going to start building basically everything I could think of... btw, aren't there through hole adapter cartridges or something? That would make sense if there's a demand and people who don't want to manually solder things in the development phase are looking for an easier way to interface with these things...

author: Simon
author_rank: Unknown
timestamp: February 22, 2015, 08:31:11 pm
content: You want a breadboard, the problem with breadboards is that components end up going all over the place and you have long wires so they are not any good over a certain frequency, Don't try building a discrete smps on one

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 08:37:30 pm
content: I've got a breadboard, but the surface mounts would still need a cartridge to interface with the breadboard, right?Btw, do you know any good cheap part numbers for inductors, LDO's or zener diodes?

author: Simon
author_rank: Unknown
timestamp: February 22, 2015, 08:40:58 pm
content: where do you normally buy parts ?, see what they have. Inductors will be very specific of what you want to do, your best bet is to find a project to work on and buy the parts you need for it.

author: WattsUp
author_rank: Regular Contributor
timestamp: February 22, 2015, 08:44:42 pm
content: I will get hate for this but on eBay I've seen a set of 200 different inductors for a couple of quid. As a beginner buying sets of different values will insure that you have basic parts to hand (mostly). I would also say grab some 74xx or similar logic, it's really interesting to build up a 1 bit adder for the first time. Even better buy a crap load of BJTs and learn how to make some simples gates with them. BTW getting SMD adapters are an inefficient way of prototyping. Either stick to THT for learning and designing, and move on to SMD for production, or discover the art of dead bug wiring if a part is unavailable.Ben

author: Simon
author_rank: Unknown
timestamp: February 22, 2015, 08:46:14 pm
content: Well there are good and bad on ebay, I'm one of the good guysSome parts just don't exist in through hole

author: WattsUp
author_rank: Regular Contributor
timestamp: February 22, 2015, 08:51:33 pm
content: From what I've seen on the forum, there is a general consensus that components on eBay are all bad and doomed to fail. I for one always buy from eBay, as it's the only way I can get stuff. In 3 years, not one part has failed me. I actually think i have bought an ATmega kit thing from you (with crystal, caps and socket?).

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 08:52:39 pm
content: I normally buy them off of ebay since I'm not the richest person in the world lol... btw, what does 74xx, BJT, BTW, SMD and THT stand for?What else would be a good beginner project that would illustrate the concept of induction, or anything you think would be fundamental (also if you could link to the projects you just mentioned that would be awesome)? I'm already on a project trying to triple the voltage from a microcontroller with capacitors and diodes (though I've been getting some weird results)... I've done a basic hookup with a motor and a switch where I've switch the polarity to reverse the direction of the spin (though my op amps and transistors are still in the mail so I haven't been able to do too much so far)...I would like to build my own motor driver circuit if you could give a few pointers on that, I already have a microcontroller so I'm not sure why I would need to use a separate module since my microcontroller already has PWM and DAC pins...

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 08:57:09 pm
content: Quote from: WattsUp on February 22, 2015, 08:51:33 pmI actually had the first LED I pulled out of a pack of 100 be a dud (the next LED worked) lol

author: WattsUp
author_rank: Regular Contributor
timestamp: February 22, 2015, 09:02:01 pm
content: Sorry, i found the abbreviations confusing at first as well.74xx is a type of logic chip. You will usually see something like 74hc595 (shift register), where the hc is the type (high speed CMOS? Can't remember tbh) and the 595 is the actual part. Often you will see the same number with different letters like LS.BJT is a bipolar junction transistor, AKA a normal NPN or PNP transistorSMD stands for Surface Mount DeviceTHT is Through Hole Technology (I should have put THD for continuity but that also stands for something else so I never use itAnd BTW stands for by the way!On your motor driver question, the reason you will normally have an external driver (often a H bridge) is because your micro can't provide enough current through its input/output pins. The motor driver will probably just be some MOSFETS that switch the heavy currents (think of them like relays for this instance).Ben

author: WattsUp
author_rank: Regular Contributor
timestamp: February 22, 2015, 09:09:12 pm
content: If you google phrases like "Transistor Logic Gates" or "Transistor Computer/Adder" you'll find some decent results. Unfortunately, I can't remember the website I found but I'll look for you. Something you should definitely look at are 555 timer circuits. If you understand the basics, you will be amazed at what you can do with them. Dave used one to mod his Mantis to have an adjustable light.About eBay, I understand it can be a lottery, but for people like me who can't afford, or just don't have the option, to use vendors like Digikey, it's a necessary evil. Unfortunately, I am in a position where regular orders are not possible, so I have to buy big packs of parts and hope they will be OK for a future project.BenEDIT: I found this site useful, but Google around and see what works for you -http://www.waitingforfriday.com/index.php/4-Bit_Computer

author: Simon
author_rank: Unknown
timestamp: February 22, 2015, 09:09:54 pm
content: Quote from: WattsUp on February 22, 2015, 08:51:33 pmThere is the legitimate question of provenance on ebay. For hobby stuff it's generally good enough and I've had plenty of companies buy from me on ebay with no complaints. my ATmega328 chips come from main wholesale dealers in the Uk or europe, I just buy in big enough quantities to get the price down to sell on for a reasonable price. If an ATMega328 is being sold cheaply and it sounds too good to be true then it is. Chinese suppliers either won't supply them or stop answering emails when i ask if they are genuine.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 09:16:19 pm
content: I would have thought a Op Amp would be the solution to a mircocontroller not being able to supply enough Voltage or Current and use transistors to create the H-bridge...While looking into motors, it seems that I'll need more flexibility with frequency than what my microcontroller can give, is there an easy solution to this? The core chip on my microcontroller is about $5 and without any of the special code it can output 72 MHtz (it can barely give 5KHtz as it is right now) so I'm not entirely sure why I would need to spend hundreds of dollars on a variable frequency drive to control AC motors...

author: Simon
author_rank: Unknown
timestamp: February 22, 2015, 09:33:59 pm
content: Quote from: JacobEdward on February 22, 2015, 09:16:19 pmCompletely confused there, what micro controller are you using and what are you trying to achieve ?

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 09:34:24 pm
content: Quote from: WattsUp on February 22, 2015, 09:09:12 pmI've looked into 555 timers before and found this websitehttp://www.555-timer-circuits.com/,do you know anything that might give some basic circuit tutorials for beginners? Also, just to be clear, a 555 isn't absolutely necessary when you have a microcontroller, but it would be something to use if a whole microcontroller wasn't necessary?

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 09:37:25 pm
content: Quote from: Simon on February 22, 2015, 09:33:59 pmI'm a convert from the world of Javascript so I'm using an Espruino microcontroller, the cost of using a language I already know how to program in is that it's substantially slower than typical microcontrollers, but intuitively it seems like there would be a simple work around for this... turn an external component on that will have a PWM of 50MHtz until you tell it to turn off... the reason why this might be necessary is that you would need a higher frequency and voltage in order to control the speed of AC motors...As far as the op amp, I was referring to controlling a DC motor that requires more current than the microcontroller puts out...

author: WattsUp
author_rank: Regular Contributor
timestamp: February 22, 2015, 09:45:46 pm
content: Yes, a microcontroller could do what a 555 timer does, but it is cheaper, simpler and more fun! I will try and answer your previous question from what I understand. Firstly, I think you misunderstand what an op amp does: it amplifies a signal (among other functions). It can't source more current, and you have to feed it a higher voltage than the maximum level of the amplified signal. Secondly, you can make a H bridge I believe, but be careful when working with high currents (keep it fused) and make sure you have the right transistors. Tbh, a pre made IC will only cost you £2 at most though.Motors are not my area of expertise, but I don't think you fully understand how to control one and how your micro controls them. Google around for pre made designs, and build on those for your own requirements. What Simon is saying is that you are not clear with what you are trying to say. Maybe if you ask the question again in a more detailed manner we will be able to help you out a little bit.Ben

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 09:57:58 pm
content: Quote from: WattsUp on February 22, 2015, 09:45:46 pmWhen you say amplifies a signal, what you mean to say is voltage is being added to an output that can still be controlled by the input signal that has a substantially lower voltage (aka if a microcontroller outputs 4.7 V to a OpAmp that amplifies the signal to 12V, the microcontroller can still turn off the 12V by turning off the input to the Op Amp). I was under the impression that if you add Voltage to a signal, you are also adding current, all you have to do is increase the resistance (or wait... reduce the resistance? lol I still need to empirically prove ohms law, I should do that today actually) and you will find the increase in current you're looking for... no?Quote from: WattsUp on February 22, 2015, 09:45:46 pmMy question about increasing the frequency was in reference to controlling AC motors with a microcontroller... when googling around, I found thishttp://en.wikipedia.org/wiki/Variable-frequency_driveand these things cost hundreds of dollars, but the fundamental thing they're manipulating is the frequency and Voltage applied to the load... right? My microcontroller has the ability to change the frequency it is capable of outputting, it's just severely limited because of the extra work it does in order to be programmable in Javascript... the question I was asking is why wouldn't it be possible to connect my microcontroller to a second chip that was also capable of outputting 72MHtz (but didn't have the extra Javascript work) and completely overcome this limitation... those chips are about $5 each, and with relays or whatever else, why couldn't that then be just as good of a solution to controlling the frequency than this other thing that costs hundreds of dollars...

author: Simon
author_rank: Unknown
timestamp: February 22, 2015, 10:10:48 pm
content: JavaScript does not exactly sound like a microcontroller language. I don't know what JavaScript entails as I barely understand C myself however I'm pretty sure you could do some stuff in C. The other thing I think you are missing is that any microcontroller will produce a square wave output where as usually you are controlling a motor with a sine wave. What is usually done is to approximate the sine wave with a varying duty square wave so that the average voltage of the PWM output represents the average sine wave voltages that you would otherwise supply the motor. This is why your variable frequency drives are not cheap, they are not necessarily simple.The other thing is if you are using the PWM capability of your microcontroller once this is set up through whichever language you choose it should run very efficiently as it is a separate hardware peripheral on the microcontroller chip so I'm not sure how the programming language is affecting its top frequency. A bloated programming language may mean that it takes you longer to alter the PWM duty but the frequency should be achievable.An operational amplifier or carry out any amount of operations as the name suggests on an analogue signal. You can use it to multiply or divide a signal or add signals together. Obviously the operational amplifier needs a power supply, the input impedance of an operational amplifier is theoretically infinite in reality it is still so high that you won't have to worry about it if you are controlling it from a microcontroller. Operational amplifiers are not usually designed to provide high current output they are mainly voltage amplifiers although there are many power amplifier chips which are essentially powerful operational amplifiers. But having said that they may not have the current capability you are looking for.If you are looking to use a H bridge then you probably don't need an operational amplifier. You will need for MOSFETs to end channel and 2 P channel MOSFETs. You can also use for N channel ones but that will be complicating things at this stage. MOSFETs also have very high input impedance so they can easily be driven straight from a microcontroller. You will need to use on the low side (the N channel MOSFETs) logic level MOSFETs as these can be fully switched on with just 5 V as their threshold voltage will be in the region of 1 to 2 V. Each low side MOSFET can also be used it corresponding highside MOSFET although you don't get the fastest response by doing this but it's a simple circuit solution. You may need to use MOSFET driver ICs which will be able to switch the MOSFET correctly at high speed although as somebody else has said getting an actual H bridge chip may be easier and cheaper.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 10:49:05 pm
content: Quote from: Simon on February 22, 2015, 10:10:48 pmJavascript is a turing complete language, what that means is there is nothing that any other language can do that Javascript cannot do (it just so happens that Javascript is directly built into the major browsers, can script a server, create offline apps, mobile apps, microcontrollers, etc.)Quote from: Simon on February 22, 2015, 10:10:48 pmThe hassle of learning a whole new language when I already know a language is not worth the effort (especially if there are potential compensations for an increase in Htz). Imagine deciding to learn Japanese or Hungarian because it might save you one or two (relatively insignificant compared to everything that needs to be done) extra steps in filing some business document... it would be different if you'd move to that part of the world, but if you're just going to be doing the same thing you would have been doing anyways... just go with the extra stepQuote from: Simon on February 22, 2015, 10:10:48 pmWouldn't it just be easier to programmatically control when some other voltage source will turn on and off that would be producing the proper signal for the motor? Either way, thanks for that tip, didn't realize there was this difference in wave forms... Also, is this true for DC motors or is it just for AC motors being controlled by a digital device? How is this approximation usually done? Is that just code within the micro or are there components that interpret the correct variations?Quote from: Simon on February 22, 2015, 10:10:48 pmChanging the frequency isn't a problem, but it's definitely not capable of getting up to that 72Mhtz like it claims it can, which is why I keep asking about it being possible to control another chip that does nothing but create these incredibly high frequencies... is that possible?Quote from: Simon on February 22, 2015, 10:10:48 pmI'm not too familiar with impedence so I'll be reading that wikipedia tonight, but I know you said they're not suppose to provide current, but aren't you indirectly providing current when you provide Voltage... doesn't one come from the other through ohm's law?Quote from: Simon on February 22, 2015, 10:10:48 pmI have a bunch of bipolar transistors in the mail and according to their datasheet, they're able toCollector–Emitter Voltage VCEO 40 VdcCollector–Base Voltage VCBO 60 VdcEmitter–Base Voltage VEBO 6.0 Vdcwhich seems like it would be more than enough for any DC motor I'm going to get my hands on any time soon, right?

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 10:56:55 pm
content: Something I'm not too clear on that hopefully you could explain is why voltage regulators are preferable to voltage dividers in conjunction with capacitors... what is a voltage regulator made of or is it just an IC of more basic components? I get the idea of using a voltage regulator in AC to DC conversions, but is there another necessary use case?

author: Zero999
author_rank: Super Contributor
timestamp: February 22, 2015, 11:01:20 pm
content: Quote from: JacobEdward on February 22, 2015, 09:16:19 pmBecause 72MHz is the clock frequency which will be much higher than the maximum PWM frequency the MCU can generate from one of its I/O pins.A variable speed motor drive does a lot. It converts the mains voltage to a stabilised DC bus, provides isolation between the AC side and control and has power factor correction. It will have many other components as well as the MCU: MOSFETs/IGBTs, opt-isolators, op-amps, huge electrolytic capacitors, inductors, radio interference filtering. A good variable frequency drive will also have to meet various standards for everything from electrical safety to efficiency.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 22, 2015, 11:07:45 pm
content: Quote from: Hero999 on February 22, 2015, 11:01:20 pmI would like to build my own variable frequency drive (it seems like a good device to learn fundamental electronics with), do you know any really good tutorials out there with an explicit BOM I can use?

author: rolycat
author_rank: Super Contributor
timestamp: February 23, 2015, 12:23:35 am
content: Quote from: JacobEdward on February 22, 2015, 11:07:45 pmVFDs are primarily designed to drive powerful AC induction motors which operate at mains voltages and often require three-phase supplies. As such, they aren't a good choice for a beginner in electronics.If you are interested in controlling motors electronically, start with a low voltage DC motor and experiment with PWM speed control.Googling terms like "DC motor control tutorial" or "Arduino DC motor control" should give lots of suitable examples.

author: WattsUp
author_rank: Regular Contributor
timestamp: February 23, 2015, 07:41:55 am
content: Quote from: JacobEdward on February 22, 2015, 10:56:55 pmI'm not quite sure what you are asking, but a voltage divider should NOT be used to create a power supply rail. They are intended for very low signal currents. A voltage regulator is basically just a zener reference diode, with an emitter follower and some overheat protection (You can make your own). For AC to DC conversion, you will need a transformer to lower the voltage, and a bridge rectifier and some big ass capacitors to smooth out the supply under load. Capacitors are used with voltage regulators in a similar way, to prevent voltage peaks and dips by storing and releasing energy when it is needed. Hopefully that answered your query.Ben

author: Simon
author_rank: Unknown
timestamp: February 23, 2015, 07:47:29 am
content: The problem seems to be that our OP has no concept of current (AMPS !!!!) until he gets this he will be trying to run loads off signal pins.

author: Zero999
author_rank: Super Contributor
timestamp: February 23, 2015, 04:37:39 pm
content: Quote from: JacobEdward on February 22, 2015, 10:49:05 pmJavascript is also an interpreted language which makes it very slow compared to a compiled language such as C so itsn't suitable for most MCUs.It's possible to run Javascript on an MCU but it's not cheap or efficient.https://tessel.io/

author: iamdarkyoshi
author_rank: Frequent Contributor
timestamp: February 23, 2015, 06:12:05 pm
content: If you want a good play with inductors, build a joule thief and then try to modify it yourself to operate a flourescent tube instead of an LED. it can be done, but tounge angle is important

author: iamdarkyoshi
author_rank: Frequent Contributor
timestamp: February 23, 2015, 06:17:41 pm
content: Quote from: JacobEdward on February 22, 2015, 11:07:45 pmThis was made by me completely out of bordem in my digital electronics class, and could potentially drive a HDD motor. Good ol' 555 timer (of course) and a couple 74ls74's made this and could potentially be cascaded for 4 or more outputs.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 08:02:11 pm
content: Quote from: LaurentR on February 19, 2015, 01:57:44 amI've got the book in front of me but it doesn't actually list any cheap part numbers I can find on ebay to start experimenting with... I'm trying to prove these concepts empirically instead of just reading them in a book so if you know anything that lists off a bunch of cheap part numbers for encoders, inductors, transistors, etc. that would be great.

author: Simon
author_rank: Unknown
timestamp: February 24, 2015, 08:05:57 pm
content: Your going about it the wrong way, there are numerous factors that make up an inductor: inductance, max current, self resonant frequency, resistance and I'm sure more, you can't just buy a few parts and expect to plug them into a circuit, design your circuit, work out what inductor you need and then get it.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 08:06:41 pm
content: Quote from: Hero999 on February 23, 2015, 04:37:39 pmI've found a much cheaper microcontroller that is programmable in Javascript... espruino.com and it's completely open source, so presumably I could eventually buy a $5 development board and load espruino on it (though I'm definitely going to be supporting espruino.com since I think it's an amazing company).Btw, I've been asking this over and over again and still haven't gotten a response... is it possible to just buy another ARM chip and have one microcontroller use it to generate 50MHtz signals (given the second ARM chip wont have anything else assigned to it other than generating these higher frequencies)?

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 08:07:48 pm
content: Quote from: Simon on February 24, 2015, 08:05:57 pmI'm sure, but I'm still going to verify it empirically before I start memorizing crap out of a book... now if you know of a cheap part I can use to experiment with, that would be great.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 08:09:15 pm
content: Quote from: iamdarkyoshi on February 23, 2015, 06:12:05 pmDo you know of a really good tutorial on Joule thief's for beginners? Something that has a basic set of listed parts I can find cheaply and experiment with?

author: Simon
author_rank: Unknown
timestamp: February 24, 2015, 08:11:16 pm
content: Quote from: JacobEdward on February 24, 2015, 08:07:48 pmAny part will do then, just grab something and experiment with it, say 100 uH.We still don't know what signals your trying to produce, if you want 50MHz 50% duty then maybe but if your doing PWM then there is no straight answer. You insist on taking the easy route to program and that gets you no control over your hardware. You can use an 8MHz MCU to control a motor at 10'000 rpm........ you need to learn about the MCU hardware, MCU's are not computers, you can't relay on a virtually limitless processing resource.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 08:14:23 pm
content: Quote from: WattsUp on February 23, 2015, 07:41:55 amThat does help, thanks! Why do they call it a power supply "rail"?I've been curious though, how do diodes work? How is there a substance that can allow electricity to flow in one direction but not the other... I get the idea of a capacitor (I think), but for diodes it's not like these currents are on separate lines... I've read the wikipedia and it didn't really explain how that works.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 08:19:19 pm
content: Quote from: Simon on February 24, 2015, 08:11:16 pmCheap part number I can find on ebay?

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 08:24:49 pm
content: Quote from: Simon on February 24, 2015, 08:11:16 pmCould you explain the difference between PWM and 50MHz with a 50% duty cycle?It's definitely not the easy route to program, it's just I've already invested the time to learn a programming language and I'm not interested in learning another language when I already have a microcontroller that I know how to program... sorry if people don't like that it's possible to do this in languages other than C or assembly, but my microcontroller is fully capable of doing anything any other microcontroller is capable of doing apart from generating a 50Htz signal... which is why I'm asking this question, but after about 5 times I still haven't got a straight forward response...

author: Simon
author_rank: Unknown
timestamp: February 24, 2015, 08:53:47 pm
content: Quote from: JacobEdward on February 24, 2015, 08:24:49 pmWell i'm sorry but unless you do things right they won't work! why the hell are you trying something as complicated as a variable frequency drive when you don't have micro-controller specific programming skills and you don't even know how a diode works even after reading about it. I'm sorry but we can't make you learn and there is no secret. Unless your going to do things properly and in some order then I'm sorry but there is nothing we can do.you claim to know all about programming but don't understand the concept of PWM which is at the basis of controlling real world devices like motors with a digital microcontroller, so I suggest you stop thinking you can do anything in java and learn to program properly in C like everyone else does at this level of development and learn basic circuitry techniques. You seem to be blissfully unware of just how much you don't know (not that I'm an expert either) and yet there is no way to explain anything to you. For gods sake get the simplest beginner book and read it!

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 09:01:02 pm
content: Quote from: Simon on February 24, 2015, 08:53:47 pmSorry, but you don't seem to understand how programming languages work... (check it out:http://www.espruino.com/Reference#software) also, I was asking about the physical internals of how diodes work (not how they're applied and what the macro effects)...Also, you either do not know any good part numbers for cheap inductors, or are being deliberately dense given I've specifically asked you like 4 times now...I was under the impression PWM was duty cycle and htz as explained by sparkfunhttps://learn.sparkfun.com/tutorials/pulse-width-modulationif it's not, could you explain what it is? Otherwise, could you stop commenting on my post?

author: rdl
author_rank: Super Contributor
timestamp: February 24, 2015, 09:05:49 pm
content: Inductors are usually very specific to the purpose of the circuit. Radio hobbyists often just wind their own. If you want a cheap inductor just take a piece of wire and wind it around something in a spiral. You can find instructions in this book.

author: Simon
author_rank: Unknown
timestamp: February 24, 2015, 09:07:50 pm
content: Take you pick:http://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2050601.m570.l1313.TR0.TRC0.H0.Xinductor.TRS0&_nkw=inductor&_sacat=0Or as suggested just grab a length of wire and wind one, jeez let me guess you learnt all about programming on a PC and now that you have found you can program microcontrollers with the same language you think you can take on the world of electronics

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 09:18:21 pm
content: Quote from: Simon on February 24, 2015, 09:07:50 pmNot sure what you have against Javascript, but it might be a good idea to look into, probably improve your productivity actually...Btw, there's this sale on ebay that claims a photoresistor is an inductor... I already have photoresistors, but I wasn't aware they were also inductors (not sure what part is suppose to be a coil, or in the other sale I posted that looks a lot like a resistor too...)http://www.ebay.com/itm/Inductor-Sensor-20Pcs-Photo-Light-Sensitive-Resistor-Photoresistor-5516-GL5516-/201047174773?pt=LH_DefaultDomain_0&hash=item2ecf586e75http://www.ebay.com/itm/5-x-2-2uH-Inductor-Free-Shipping-/250887388813?pt=LH_DefaultDomain_0&hash=item3a6a0dbe8d

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 09:20:04 pm
content: Quote from: Simon on February 24, 2015, 09:07:50 pmBtw, does it make sense that you as a moderator can be so flagrantly rude to someone on a forum but I'd bet the moment someone is even slightly rude to you, they get banned or whatever it is you do to them?

author: Simon
author_rank: Unknown
timestamp: February 24, 2015, 09:22:02 pm
content: Quote from: JacobEdward on February 24, 2015, 09:20:04 pmActually no, you have continually asked the same questions despite being given answers because they were not the answers you wanted. Like any other member my patience has a limit.

author: Simon
author_rank: Unknown
timestamp: February 24, 2015, 09:23:35 pm
content: Quote from: JacobEdward on February 24, 2015, 09:18:21 pmBoth listings are in China probably listed by people who can hardly speak English and do not understand what the listing is about.There is no inductance intended in a photoresistor, obviously like all electronic components it will have some inductance but that is just the way of nature. The second listing was also done by a very competent person who thinks that they are going to sell more inductors if they point out the high-quality antistatic packaging they are using which is totally unnecessary and pointless the packaging inductors.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 09:25:02 pm
content: Quote from: Simon on February 24, 2015, 09:22:02 pmActually, any other member (if the roles were reversed) would have been banned for loosing patience and continuing to add their abusive comments instead of just deciding to do something else...

author: Simon
author_rank: Unknown
timestamp: February 24, 2015, 09:26:42 pm
content: Quote from: JacobEdward on February 24, 2015, 09:25:02 pmOh you have that much experience of this forum do you ? I'd not have banned anyone in this situation for sure and the only other person that actively moderates on here is Dave

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 09:27:53 pm
content: Quote from: Simon on February 24, 2015, 09:26:42 pmSure... either way, try finding something else to do instead of just being abusive

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 09:37:58 pm
content: Quote from: Simon on February 24, 2015, 09:22:02 pmIf you could copy / paste the answer to the question of if it's possible to connect an external ARM chip to a microcontroller and use the other chip as a 50MHtz signal generator (if you want to think of it that way), that would be great.

author: Zero999
author_rank: Super Contributor
timestamp: February 24, 2015, 09:39:07 pm
content: Quote from: JacobEdward on February 24, 2015, 08:24:49 pmJavaScript is a perfectly reasonable way to get into MCUs. Many other people here have started programming MCUs in other languages than C or assembly. BASIC is another common language which is supported by MCUs (remember using that Simon?). At some point you'll probably discover something you can't do in JavaScript and will need to learn C though.Hz is a unit of frequency, which is the repetition rate. The period is the length of time it takes for a waveform to repeat itself and is equal to 1/frequency.Duty cycle is how long the square wave is high vs how long it's low. A square wave with a frequency of 1Hz and a duty cycle of 50% will be high for half second and low for half a second. A square wave with a frequency of 1Hz and a duty cycle of 25% will be high for 0.25s and low for 0.75s. In both cases the period will be 1 second.

author: Simon
author_rank: Unknown
timestamp: February 24, 2015, 09:43:21 pm
content: The correct answer is that you don't have a clue what your doing, if one arm chip running on java can't do it why should any other ? It's not about processing capacity. Have you read the chips datasheet, do you know at what frequency you can clock the counters and what resolution of PWM you want and more importantly what resolution of PWM you need to set.Max frequency = clock frequency / resolution of PWM in bitsSo say you have 8MHz clock with no pre-scaler and you want 8 bits of resolution or 256 PWM levels that means your maximum PWM output is 31.25 KHzDo you understand how MCU counters and PWM output pins work ?

author: Simon
author_rank: Unknown
timestamp: February 24, 2015, 09:49:00 pm
content: Quote from: Hero999 on February 24, 2015, 09:39:07 pmexcept someone seems to think he can work in the abstract layer of a language without any hardware understanding of the MCU hence the types of questions. The same would be valid for someone with C programming skills on a PC expecting to use an MCU with no appreciation for the hardware platform and thinking that does not matter and welcome to the arduino which is where i started in C but soon needing to have more control and understanding of the hardware I moved to native C. sure I've used basic, and how long did that last ? as long as it took me to find out that the IDE I was using was not much good and there was very little support for basic outside of that particular software i used. How much support is there for java on MCU's ?

author: Zero999
author_rank: Super Contributor
timestamp: February 24, 2015, 09:50:42 pm
content: Quote from: JacobEdward on February 24, 2015, 09:37:58 pmThere's no simple answer to that question because you haven't provided enough information.What do you mean by 50MHz signal?Is it a sine wave, triange wave or squarewave?The answer is yes, it is possible to connect another IC to a microcontroller and use it to generate a signal.http://www.analog.com/media/en/technical-documentation/data-sheets/AD9851.pdfhttp://www.analog.com/media/en/technical-documentation/data-sheets/AD9835.pdf

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 10:03:30 pm
content: Quote from: Hero999 on February 24, 2015, 09:39:07 pmJavascript is a turing complete language, there's nothing any other language can do that Javascript cannot do so if C can do it, then Javascript can... that said, what is something you expect I'll find that Javascript can't do? The only thing so far is speed... hence the question (thanks for actually providing an answer to it btw, not sure why that was so hard for Simon) javascript modules forespruino microcontrollerQuote from: Hero999 on February 24, 2015, 09:39:07 pmI'm aware of all of what you just wrote, my question was how does that differ from PWM? I think this was more of Simon being a Jackass than it was about anything fundamentally wrong with what I was asking... I was just referring to it being a square wave since that's what MCU's typically output (though now that you mention it, it would probably be useful to be able to generate a sign wave as well, how would you do that?).

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 10:09:02 pm
content: Quote from: Hero999 on February 24, 2015, 09:50:42 pmIs it possible to block people on this forum? Not particularly interested in reading comments from Simon if he's going to be abusive and deliberately unhelpful

author: WattsUp
author_rank: Regular Contributor
timestamp: February 24, 2015, 10:31:58 pm
content: Sorry to break this up!In regard to your diode question, I am not in any way a professional, but their function is based upon a PN junction. Something about the electron flow? Anyway, try googling (a key part of most of my answer!) PN junctions to find out a bit more, and you will see they have other implementations. AfroTechMods on YouTube did a great, in-depth diode video if you want to learn more.On the topic of programming languages, you will find that JavaScript is an interpreted language, which is slower than a compiled language (as mentioned before). I have nothing against JavaScript and have used it extensively in web development, and fair play for wanting to use something you are comfortable with. However, you have to think about layers of abstractions (maybe look at the MIT Open courses online for more info), which are basically layers. As you add abstractions, the functionality is a higher level, and the task for you becomes simpler. You have to realise that you are further from the hardware when using JavaScript, which means it will run slower and have less control. It is unfair for people to say you have to learn C though, since even C is not quite as fast or low level as Assembly. All I am saying is that for certain tasks, you will find it easier to directly influence the hardware with C; also, you are severely limited to your choices of MCU, which is why professionals will use C or Assembly. You are also limited by what other people have done i.e. someone has to have written the module of code that takes your JavaScript and 'turns it into' machine code.A final thing, PWM is a combination of what Hero999 wrote. It is just a way of analogue like control using digital signals, without having to use a DAC. A PWM signal is made up of these parts, and you will be able to identify them on an oscilloscope. You can get specific ICs for the job, as Hero999 said, but there is no point in using another MCU if it has the same capabilities as yours. Look in the datasheet of your MCU and take a peek at the PWM section. It'll probably be complicated but give it a go.BenP.S. I apologise if some of this is not completely correct, I'm 14 and by no means a professional!

author: Mechanical Menace
author_rank: Super Contributor
timestamp: February 24, 2015, 10:32:24 pm
content: Quote from: JacobEdward on February 24, 2015, 10:03:30 pmIn the sort of processing it can do, the sort of computational problems it can solve, yes. But...QuoteFully access the memory map, use inline asm if needs be, efficiently handle memory usage, use peripherals in any way other than the person who wrote the JavaScript interpreter has thought of.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 10:54:30 pm
content: Quote from: Mechanical Menace on February 24, 2015, 10:32:24 pmIt seems like that argument would also apply to assembly language, though, that get's me thinking about how exactly an assembly language would be written...

author: rolycat
author_rank: Super Contributor
timestamp: February 24, 2015, 10:59:11 pm
content: Quote from: JacobEdward on February 24, 2015, 10:03:30 pmVarying the duty cycle of a square wave is much the same as modulating the width of the pulses - Pulse Width Modulation. The additional factor with PWM is that the duty cycle may change with each successive pulse. This will be the case when using PWM to generate sine waves as described below.QuoteThere are several ways, but probably the simplest way to do it with a standard microcontroller is by low-pass filtering a PWM signal - yet another application for this useful technique. The frequency of the PWM signal needs to be much higher than the frequency of the sine wave.Incidentally, you do need to be careful with terminology when discussing electronics. A 'sign wave' is not the same thing as a sine wave, and there is no such physical quantity as "Htz". Frequency is measured in hertz (Hz).

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 11:01:20 pm
content: Quote from: WattsUp on February 24, 2015, 10:31:58 pmI actually found a good description of how diodes work, thanks!Quote from: WattsUp on February 24, 2015, 10:31:58 pmYea, but that seems to be the only real downside compared to assembly...Quote from: WattsUp on February 24, 2015, 10:31:58 pmHow do you know?Quote from: WattsUp on February 24, 2015, 10:31:58 pmIf it had the same capabilities as mine, but wasn't interpreting Javascript and was only tasked with generating a 50Mhtz 50% duty cycle square wave and nothing else, are you saying that wouldn't work?

author: BlueBill
author_rank: Regular Contributor
timestamp: February 24, 2015, 11:01:59 pm
content: I've no idea why someone would start out with an Espruino. Seems like an odd choice for motor control.Most folks by a wide margin cut their teeth on the Arduino. It has a C like syntax and a simple cross platform free IDE plus an endless amount of info about the thing. Espruino not so much.I'm a PIC programmer myself, some folks might recall me as BlueRoomElectronics when I designed and sold PIC kits.Anyways, having a selection of parts onhand is nice but you still need to learn how to use them. You'll also need equipment, e.g oscilloscope, multimeter, soldering station...The OP seems obstinate in their choice of well... everything. That's not how you learn.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 11:03:04 pm
content: Quote from: rolycat on February 24, 2015, 10:59:11 pmThanks, sorry about the Htz thing lol

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 11:06:49 pm
content: Quote from: BlueBill on February 24, 2015, 11:01:59 pmWell, I've been wanting to program things other than Microcontrollers and Javascript is just about the best language for as wide a variety of tasks that exists... I'm not starting out on Espruino, I started out on Javascript and then converted to Espruino for electrical stuff...As far as being obstinate... to be completely honest, after explaining what I just said about 5 or 6 times, and having you people continually ask why... it sorta seems like the reverse is true... I don't need to learn another language since I have espruino, and if I don't have to, I'm not going to...

author: Mechanical Menace
author_rank: Super Contributor
timestamp: February 24, 2015, 11:22:06 pm
content: Quote from: JacobEdward on February 24, 2015, 10:54:30 pmOh if timing is critical hand coded asm is sometimes the only option. But advantages of C is it's abstract enough to be more human friendly and easily portable while still giving you brilliant access to the hardware. Modern compilers also in most cases give you just as fast a result as asm, and believe it or not in some cases faster results than all but the greatest asm treebird could manage. And in those cases where asm is the only real option you can write just that function in it.Personally I'd also say C is no harder to use than JavaScript either tbh.Quote from: JacobEdward on February 24, 2015, 11:06:49 pmAnd while that lasts fairy fluff. But MCUs are a much different place to where JavaScript was designed to be used, you're not having to may not last as long as you think. You'll probably need to become fluent in C to just follow many an example for MCUs even if you don't outgrow espuriono though.

author: BlueBill
author_rank: Regular Contributor
timestamp: February 24, 2015, 11:28:21 pm
content: My first computer was a COSMAC ELF1802 I build around 1977. I can program in 6502 & PIC assembler, plus BASIC (I blame early PCs as it was included in ROM). I used to program in PASCAL (all but a dead language, but I liked it) and I'm just now getting around to learning C. I even looked at Forth but always avoided C... Till now.In that time I've never seen javascript as a viable Microcontroller language (that ARM3 is more a CPU than MPU). Most cheap & cheerful MPUs have very limited everything (RISC,kHz to MHz speeds, kilobytes of RAM & Flash) but great bit manipulation and high current I/O > 20mA is common and a wide supply range 1.8V - 5.5 isn't uncommon. Your Espruino is $39, where as a typical PIC or AVR MPU sells for less than a cheeseburger. PICs and AVR are sold blank, you can erase, program & debug (with a debugger) them with a cheap programmer. The Espruino is preprogrammed with a javascript interpreter. Similar to how a BASIC Stamp was ~20 years ago.C is a compiled language, efficient and very popular. It's pretty much the go to language for Microcontrollers as it's available for all of them. ANSI C is not that obtuse and has been around forever (and it feels like it). I looked at some of those code examples on the Espurino site, IMHO you'll have no problem with C.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 11:43:37 pm
content: Quote from: Mechanical Menace on February 24, 2015, 11:22:06 pmIt's not about difficulty... it's like saying, go learn Japanese in order to skip these two or three steps on a business document (where those two or three steps are relatively insignificant in comparison to the entire task)... I think most people would say they'd rather just go through the extra two steps... and the same is true in reverse for C for creating a web appQuote from: Mechanical Menace on February 24, 2015, 11:22:06 pmThere's already a lot of support for Javascript based MCU's (I've already successfully interfaced a RFID module via a SPI connection and there are all kinds of modules pre built ready to go...)To be honest, I kinda think the only reason someone like me would ever swap is socially based instead of some technical limitation... we will see though and I'll keep you informed.

author: iamdarkyoshi
author_rank: Frequent Contributor
timestamp: February 24, 2015, 11:55:14 pm
content: Quote from: JacobEdward on February 24, 2015, 08:09:15 pmhttp://www.instructables.com/id/Make-a-Joule-Thief/?ALLSTEPS=Try this one. I made mine using an off the shelf NPN transistor.

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 24, 2015, 11:59:27 pm
content: Quote from: iamdarkyoshi on February 24, 2015, 11:55:14 pmThanks a bunch :-)

author: Simon
author_rank: Unknown
timestamp: February 25, 2015, 07:01:00 am
content: Quote from: JacobEdward on February 24, 2015, 11:43:37 pmAs Hero999 pointed out I started on basic and I hated C, but I found that I could not get help with basic because no one uses it (presumably for a good reason) and the software was limited. A lot of the problem was that there is not much standard in basic for micro controllers whereas everyone uses C and all MCU C is ANSI C based so no matter what software I use, microcontroler family or where I ask things are pretty much standard and anyone can help. Try searching the internet and see how much support there is for basic or java versus C........ I started out determined to stick with Basic because I "didn't get" C I prefered the simplicity of basic as it's easier to read but meh I had to make that "social choice" apparently it's a technical one as well.

author: lapm
author_rank: Frequent Contributor
timestamp: February 25, 2015, 09:27:36 am
content: After reading this thread all i can say is consider something else then javascript. There are reasons why C is so popular, not least of it is its portable if properly written.Yes, you can get microcontroller with javascript support. But that docent make it portable. Can you move that javascript engine between MCU´s in same family but different amounts of memory even? Lets say between Atmega 8 and Atmega328?Also javasript is not codespace efficient. And thats its most likely biggest downfall when it comes to microcontrollers. it docent get compiled into assembly langage like C-does for example. So you waste precious code memory and clock cycles to run separate engine to decode that javascript.yes it might be good for quick hacks, but when you run into issues of full codespace and you still need to add more code and execution speed... Yes, even i do quick hacks time to time just to test something quick...

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 25, 2015, 04:14:19 pm
content: Quote from: lapm on February 25, 2015, 09:27:36 amTo be honest, I'm sorta done with discussing C vs Javascript... this thread wasn't about that, but it seems blatantly obvious that C is as popular as it is because of the echo chamber effect rather than some fundamental advantage to the code... otherwise I would have been given an example of something C can do that Javascript can't instead of just getting these constant assertions that C is better (you will get the same crap in reverse for Javascript oriented forums).Quote from: lapm on February 25, 2015, 09:27:36 amThis "speed" problem has already been acknowledged and ... as it turns out, there are ways to compensate for this... anyways, good luck to you who insist on learning extra unnecessary languages, it's not worth it...

author: WattsUp
author_rank: Regular Contributor
timestamp: February 25, 2015, 04:24:04 pm
content: About your ARM chip question, the only way to use that to generate a signal is to code something in C, as a MCU is inherently useless without code. Unfortunately not the solution you wanted. You could use that as a dedicated IC to generate a signal if you wanted to, though, via a comms protocol and with the necessary code.The reason most people here use C is that they are professionals or at least hobbyists. They know that they may have to use a different MCU for a specific requirements (like IO count or memory), and write code in a way that reflects this. Portability, efficiency and most importantly community support are vital for a dedicated EE, which is why C is used as a standard across platforms like PIC or AVR. I'm not going to tell you to switch, as you seem content to use JS, but just consider why everyone else uses C; listen to some of their points, and just think about what they are trying to tell you. No one is 'telling you off' for using JS, they are just providing valid reasoning for the use of C. One thing I will say is what if you want to control something that no one has done before in JS (which is likely because it is not widely use), so there is no high level command?Ben

author: JacobEdward
author_rank: Regular Contributor
timestamp: February 25, 2015, 04:41:23 pm
content: Quote from: WattsUp on February 25, 2015, 04:24:04 pmEverybody uses C because everybody else uses C... kinda straight forward but it's not a compelling reason for me to learn C

author: BlueBill
author_rank: Regular Contributor
timestamp: February 25, 2015, 04:51:21 pm
content: Quote from: JacobEdward on February 25, 2015, 04:41:23 pmActually it's an industry standard for programming, especially microcontrollers, and you'll find plenty of examples, libraries, projects, forums...Anyway, do whatever you want. About a year ago there was a fellow on another forum trying to use an ARM7 for an emergency light when pretty much the cheapest 6pin MPU would have been overkill. Go figure.

author: WattsUp
author_rank: Regular Contributor
timestamp: February 25, 2015, 05:02:14 pm
content: Look, I'm sorry, but that is one of the biggest selling points of C. If your C code isn't working, a properly worded question on any electronics forum (including this one) then you will likely receive a coherent response. How many people actually use JS on a MCU? 7? JS was designed for a different application, and while it is indeed possible to use it, it is not a practical choice for a beginner, hobbyist or professional. In my above answer I pointed out three points: portability, efficiency and community support. These three alone (and they are not the only ones) should at least give you something to think about. You can't just say:Quote from: JacobEdward on February 25, 2015, 04:41:23 pmwhen I among others have given you plenty of reasons. And anyway, what's so bad about being the same as everyone else when it means you have support for any project, and you do not rely on someone else doing the hard work for you (OK someone has written the compiler but you get the message).I'm not going to say any more about this now as it's getting ridiculous, but if you have any questions about the original topic then I will gladly help as I have throughout this thread.Ben

author: Zero999
author_rank: Super Contributor
timestamp: February 25, 2015, 05:07:05 pm
content: Quote from: JacobEdward on February 24, 2015, 10:03:30 pmBeing Turing complete means fuck all, if it won't allow you to take full advantage of the hardware.Try writing a driver for a piece of hardware for your PC with JavaScript. It won't work. You'll find the hardware abstraction layer gets in the way. The only way is to switch to a compiled language which will allow you to do what you want.You don't *have* to use C if all you want to do is tinker but if you want to do this professionally you'll *need* to learn C.QuoteIt doesn't. PWM means controlling the duty cycle of a squarewave between 0% and 100% to represent an analogue value. If you put any waveform through a low pass filter, you'll get the average value. PWM is useful because by varying the duty cycle you can produce an analogue signal from 0 to the supply voltage of the microcontroller.

author: WattsUp
author_rank: Regular Contributor
timestamp: February 25, 2015, 07:45:27 pm
content: Keep in mind the 600mW limit for power dissipation in the 555

author: JacobEdward
author_rank: Regular Contributor
timestamp: March 10, 2015, 07:16:48 pm
content: Btw, incase anybody in the future might find this post of any use... if you're a beginner like me and are looking for cheap parts to experiment with or discover, this site has been pretty usefulhttp://www.taydaelectronics.com/

author: manu793
author_rank: Newbie
timestamp: May 25, 2019, 02:31:37 pm
content: Always try to learn about basics. There are some links of components are given which are very useful to starts from the basics of components.First, visit to know about Op Amphttps://www.etechnog.com/2019/01/op-amp-circuit-diagram-types-and-applications.htmlKnow about semiconductor memory in digital electronicshttps://www.etechnog.com/2018/11/internal-structure-of-semiconductor-memory.html

author: Arjunan M R
author_rank: Regular Contributor
timestamp: May 25, 2019, 02:39:30 pm
content: Quote from: JacobEdward on February 19, 2015, 01:28:30 amWhy did he include multimeter in it.

author: Arjunan M R
author_rank: Regular Contributor
timestamp: May 25, 2019, 02:43:51 pm
content: If you are a beginner you should not start with µC(microcontroller).If you start with µC you are just learning to code not electronics. I recommend you to put it away for some time and learn all the basics and then start coding.

author: pwlps
author_rank: Frequent Contributor
timestamp: May 26, 2019, 06:07:08 pm
content: Sorry if some members will find annoying to come back to the JS vs C debate but after having read some comments I decided to add my two cents. So the question is: is it still true that real men only use C for MCU programming and everything else is just toys? I think there is now a growing tendency to change this point of view, especially with the new generations of programmers. I don't know JS and won't defend it here, on the other hand I know several MCUs programmable in C# (e.g. SoM modules from GHI Electronics). Some of these clearly target professional market, likewise recent STM Cortex-M MCUs now provide support for the .NET nanoframework. I also know a company selling test&measurement equipment controlled by C#-based firmware. Of course like for JS the CLR virtual machine environment slows down the execution by a big factor, but who cares in case the MCU only has to monitor buttons and drive some slow hardware and a LCD. As speed and memory don't cost much these days I guess the trend to replace C by higher level languages even in embedded systems will prevail in the future because for cutting developer time costs the advantage of higher level languages is obvious. Having a long experience in the use and teaching of both C and C# I can witness how much faster it takes for an average programmer to obtain a bug-free code in C# compared to C. This is a non negligible factor, there is a lot of buggy firmware out there. Though I agree C will stay unchallenged in apps where getting cutting-edge performance by touching the bare silicium is critical.