Squirrels have fuzzy tails.
0 Members and 1 Guest are viewing this topic.
I know what the picture looks like, i wanted to know if anyone else had done it or if it actually works.the capacitor will still be going up and down in terms of charging and discharging. It won't just stay at one level.Has anyone done it or could someone help me to get a workable output (voltage)?
I've used the 'convert PWM to analogue' technique before for one of my projects. Its less accurate, but for my application (RC switch), it good enough (and easy). I've attached a circuit diagram that will convert the PWM to analogue signal, if you are interested. Hope it helps.PS: I found the circuit diagram sometime ago on the internet and saved it to my disk. I don't remember where I got it, but its definitely not mine.
http://www.societyofrobots.com/robotforum/index.php?topic=7879.0two topics down it was a question from dellagd about something similar...
i think it could be done relatively easily if you read the port and use an if command to say"if high wait 15 milliseconds then measure again" and "if low set port 5b high" but im not really into programming so i know little about it...if you really want to investigate further you can probably post a new topic in software and get more answers there.
if you have something in your code that looks like "analogueread" the mcu will read a value and submit a value back, say if i read a pin on my mcu and it was at 5v the mcu would return a valuebased on that.the electronics side is simple, set up a board with all the necessary parts to run code...something similar to the arduino or $50 robot board would do fine for this...
He wants to convert the signal to an analog voltage before it reaches the MCU.
There are no analog ports, but ports with ADC capability. All ports are digital The little circuit in the tutorial that converts it to analog is really crappy and will not do a good job of converting the signal to analog, so he wants a circuit that can do it better.For AVR microcontrollers, see "Input capture interrupt"http://www.atmel.com/dyn/resources/prod_documents/doc2505.pdf
I tested the schematic with the resistor and capacitor shown in the tutorial and my multimeter was giving me voltage values of between 0.14V and 0.24V but i think this just might be an average of lots of voltage spikes.
so is that a constant voltage or an average of lots of spikes?