-
-
I have bought a couple "C7210" ultrasound emitter / receiver.
The emitter needs a 40khz pulse, and I would like to analyze the echoed signal on the receiver.
I tried to proceed like this:
C9 => Emitter
C5 => Receiver( the second pin of emitter and receiver is to GND ).
// wout is the waveform I want to send to the emitter var wout = new Waveform(256); for (var i=0;i<256;i++) wout.buffer[i] = 128+Math.sin(i*Math.PI/128)*127; // win is the waveform I want to record from the receiver var win = new Waveform(512); win.on("finish", function(buf) { drawBuffer(buf); // ( I have a small lcd on which I draw the waveform ) win.startInput(C5,40000,{repeat:false}); // I want to record the next 512 bytes }); C9.reset(); C5.reset(); // How do I output a 40khz waveform ? analogWrite(C9,0.5,{ freq:40000}); // pwm at 40khz ? wout.startOutput(C9, 4000, { repeat:true }); // modulates the pwm ? // How do I record an analog signal on a pin? win.startInput(C5,40000,{repeat:false});
Also I am not sure if the 3.3V of the esperuino are enough to make the ultrasound emitter.
So far it looks like I've recorded only parasites. Can the espruino generate and record a 40khz signal? Am I missing something?
-
I am quite amazed: the ideal module would be the "GSM2 click", as used by @Hardware_Hacks , but the module costs 45€, more than twice the price of a full-blown gsm phone.
I just fall on this:
http://hackaday.com/2010/10/18/cheap-and-easy-sms-via-gsm-for-your-mcu/It looks possible to do the trick via some USB dongle.
If anyone already had a success this way, please share! -
-
-
-
-
Hi Gordon,
I Have just received my start kit, thank you.
The servomotors and the lights are working very well when I power them via the board ( which itself is powered via USB ), but when I power up them with 4 AA batteries ( which generate about 6V, slighty more than the 4.7V from USB ), they do not respond to controls.Basically the GND of the board is connected to the "-" of the 4 chained AA batteries, the red wire of the servo/lights is connected to the "+" of the 4 chained AA batteries, and the control wire is B5 or C7.
When the red wire is connected to the board's VBAT, everything is fine, but when the red wire is connected to the batteries, the servo and light do not respond.What am I doing wrong?
Can I power up the espruino board while it is usb-connected to my PC?Thanks,
Olivier
It works. I found out how a "pulldown resistor" would solve the noise problem, and a with a bit of testing I was able to generate the 40khz pwm and record it in a 4096 bytes waveform at 20khz.
Here is a photo of the nokia LCD on which I visualize the result.
The Chirp duration was 100ms, during which 4 spikes were recorded.
I will try to record the signal with my raspberrypi, maybe it can handle a higher frequency.
Now one of the issue I have left is the 3.3V. Is there a way - of course with an external source of power - to have the 40khz PWM at twice or thrice the voltage?
With some googling I found circuits such as:
MAX756 or LT1073
The MAX757 spec specifies an "Oper. Freq." of 500kHz. Does this mean that If I provide it with a 40khz PWMed 3.3V from the espruino it will deliver a 40khz square signal at 5.0V ?