Signal Generator Modules Revisited (

  Рет қаралды 759

Martyn Davies

Martyn Davies

Күн бұрын

I looked at these low-cost signal generators back in 2017. The new ones seem to have some changes to commands you can send on the serial port.
2017 video: • Testing a Frequency Ge...
Part 2: • Testing a Frequency Ge...
Part 3: on making the serial port work: • Frequency Generator Pa...

Пікірлер: 17
@rickneill6924
@rickneill6924 3 жыл бұрын
Once again I wish I had watched this before spending a day unravelling the mysteries of my recently purchased module. I discovered your previous video before this one and at that point decided that I must have a more recent version of the module because commands and responses are different with the latest firmware. It's fair to suggest the original firmware was written in a non-English speaking environment and DOWN/FALL equate to DONE/FAIL (Now it's OK/FAIL). I've added some hopefully helpful comments to your previous video. For the price, these are an amazingly useful device and I currently have the 3 channel version on order from eBay. I intend to use it to control 2 servos to tilt a platform in any direction. I do recommend using level shifting if interfacing to 5 volt logic. It *does* work when bolted straight to a 5 volt device but it might not be good for the long term reliability of the module.
@MartynDavies
@MartynDavies 3 жыл бұрын
Thanks - it actually didn't occur to me that 'down' might be 'done'. I think I said this in one of my videos, but I really wish that they would open-source the software. This module could be even more useful if we were allowed to tweak the software ourselves.
@rickneill6924
@rickneill6924 3 жыл бұрын
@@MartynDavies Re hacking, I found some excellent info at protosupplies.com/product/xy-lpwm-pwm-signal-generator-module
@rickneill6924
@rickneill6924 3 жыл бұрын
@@MartynDavies P.S. You can get a full size copy of the schematic from Protosupplies by 'View image' and chopping '-400x300' out of the URL. This replaces the 400x300 image with the larger version.
@MartynDavies
@MartynDavies 3 жыл бұрын
@@rickneill6924 this is great
@rickneill6924
@rickneill6924 3 жыл бұрын
I ordered and have just received the 3 channel version of these generators. It's frustratingly different from the single channel version which I already have but I think I've got it figured out. The latest one is labelled XY-LPWM3 and looks similar except for an extra 4 buttons. The serial set up is the same: 9600baud,,,etc. 1/ The string "read" will return the current settings in the module. (Not "READ" or "r" - my 1 ch. version is happy with any case) 2/ "F1.0.5" sets the PWM freq to 105kHz (My 1 ch. version needs "f105000" or "F105000") 3/ "D2:021" sets the duty cycle of channel 2 to 21% (Not "D2:21") 4/ "f1.0.5" and "d2:021" don't work. F and D need to be upper case. 5/ The responses are DOWN, FAIL or the settings string. (My 1 ch. version sends OK, FAIL or the settings string) 6/ No CR (carriage return) is sent by the generator and this can mess with reading your input buffer depending on what device you are communicating with. 7/ Use a delay in your code between sending command strings or you'll be like the bartender who slides drinks down to the end of the bar to a customer who can't grab them all fast enough. There is no hardware or software handshaking with these generators.
@MartynDavies
@MartynDavies 3 жыл бұрын
I haven't seen the 3 channel version, although I did make a video about a 2-channel one that had a different type of display. Thanks for the info.
@rickneill6924
@rickneill6924 3 жыл бұрын
​@@MartynDavies Again I'm late to the party. I should have taken a look at your 2 channel PWM video. Did you figure out the serial command anomalies? I'd seen a picture of one but hastily wrote it off when I saw the micro USB port not realising it had a serial port too. Search for XY-LPWM3 in Google and choose 'images'. There are not as many on sale as there are the single channel version.
@MartynDavies
@MartynDavies 3 жыл бұрын
@@rickneill6924 No, I remember the serial interface working intermittently, and wasn't able to get it to accept some commands.
@rickneill6924
@rickneill6924 3 жыл бұрын
It's not rocket science but I realised that the XY-LPWM (on its own) is of little use when it comes to controlling servo motors. Servos are controlled by a 5 volt, 50 Hz PWM signal which ranges between a duty cycle of 5% and 10% to get full range motion of the servo. (In reality servos will work slightly outside the 5 to 10 range too). In other words, with regard to the generator, the choices are 5%, 6%, 7%, 8%, 9% and 10%. That's 6 positions across the full range of a servo and it's far too coarse for most applications. *However*,,,, the generator's PWM output can be used to create a varying DC level which in turn can control a 555 timer IC to produce the PWM range required by servo motors. It might sound complicated but it involves very few components. I'll be pursuing this solution even though dedicated servo controllers for Arduino etc. are easy to find. Likewise, an Arduino pin can be set up to deliver PWM of any flavour but from a teaching point of view, the generator's display of frequency and duty cycle, together with control via serial communication, is very useful.
@rickneill6924
@rickneill6924 3 жыл бұрын
Some additional findings regarding the latest XY-LPWM modules:- "f123" works the same as "F123" - Case is disregarded. The same with duty cycle. "r" just by itself gives the same result as "read" (I also sent the string "rtyuiop" and got the same result as "read" - no FAIL msg!) I have been unable to combine a frequency setting with a duty cycle setting in a single command string. I have seen some information that suggests the 2 settings can be separated with a comma and a space - e.g. "f123, d60". This doesn't work for me. I can only set the f and d values separately. Not only that but I also need to put a small delay in between sending the 2 separate command strings or else I get a FAIL response. Does anyone have any answers for this?
@MartynDavies
@MartynDavies 3 жыл бұрын
Yes I'm sure that I saw 'r' work also. I don't know about combining the commands.
@MartynDavies
@MartynDavies 3 жыл бұрын
Also of interest: I stumbled across this github site (github.com/TG9541/XY-LPWM) where he's reprogramming the processor so that he can run programs in FORTH.
@rickneill6924
@rickneill6924 3 жыл бұрын
@@MartynDavies Yes, I also found this while trawling. It's pitched above my level of knowledge and experience but interesting nonetheless. I have better skills in hardware than in coding but I have a friend who is the other way around so we have a good partnership.
@busdriver6395
@busdriver6395 4 жыл бұрын
Hi my friend i find very intrensting your video with generators.I want to ask you if we can transmit and receive signal from generator by antenna.Thank you.
@MartynDavies
@MartynDavies 4 жыл бұрын
If you wanted to transmit the signal, you would have to use the audio signal to modulate a radio carrier. You can see a simple example of modulation in this video: kzbin.info/www/bejne/rWe5aoGvjdyinqs
@secrettreasure1388
@secrettreasure1388 3 жыл бұрын
''''''''''''' THANKS ,,,,,,,,, SÜPERRRrRRrRRr....!
Ajustable PWM Generator Module
6:16
Ludic Science
Рет қаралды 19 М.
Crystal Radios: No Batteries? No Problem!
25:06
Our Own Devices
Рет қаралды 278 М.
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,6 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 120 МЛН
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 47 МЛН
Flawless PCB design: RF rules of thumb - Part 1
15:45
Hans Rosenberg
Рет қаралды 79 М.
Clock Kit Build (#140)
41:12
Martyn Davies
Рет қаралды 11 М.
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Рет қаралды 208 М.
Sensors - which one to use
17:06
Electronoobs
Рет қаралды 1,4 МЛН
How SMPS works | What Components We Need? Switched Mode Power Supply
16:38
#41 Microwave Funcional Modules
9:39
VK5FE
Рет қаралды 943
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,6 МЛН