**** BEGIN LOGGING AT Mon Dec 26 03:00:01 2016 Dec 26 06:41:40 hello Dec 26 06:41:53 uhhhh Dec 26 08:41:03 anybody here use bbb wireless yet? Dec 26 09:03:26 arduino Dec 26 11:32:40 has anyone made ti dlp work with a bbb Dec 26 15:00:44 I'm trying to control a 5V, three-wire fan: http://www.delta.com.tw/product/cp/dcfans/download/pdf/BFB/BFB40x40x10mm.pdf Dec 26 15:01:10 When I plug the voltage wire into the BeagleBone Black's 5V or 3.3V outputs, it spins Dec 26 15:01:24 (at full speed and slower, respectively) Dec 26 15:01:44 But I can't really get it to move using the GPIO or PWM outputs Dec 26 15:01:59 The most I can get it to do is wiggle a bit Dec 26 15:02:22 Does anyone know why this might be? Dec 26 15:05:30 meyermagic, says its two wires from that link Dec 26 15:05:49 Ah, that might be the wrong datasheet. Hold on Dec 26 15:06:13 (I can confirm it has three wires in reality, presumably GND, V, and the timing wire) Dec 26 15:08:33 DigiKey links to the wrong datasheet, it looks like. This is the correct product: https://www.digikey.com/product-detail/en/delta-electronics/BFB0405HHA-AF00/603-1562-ND/2560685 Dec 26 15:10:12 mistawright: Also, if it matters, I'm still using the neat little onboard HTTP server / in-browser programmer thing. Perhaps that has some issues? Dec 26 15:11:06 not necessarily that link links to the same datasheet so that makes sense why i thought it was wrong Dec 26 15:12:26 I can only assume one of those pins would be for pwm for speed control of said fan but there doesnt seem to be enough info to go by. Dec 26 15:12:44 From what I've read about three-wire fan control Dec 26 15:12:51 its not a brushless motor is it? doesnt look like it Dec 26 15:13:04 How it is supposed to work is a hall effect sensor reads every time the fan goes around, and outputs a pulse on the third wire Dec 26 15:13:08 wouldnt think they would use a brushless motor for something like this Dec 26 15:13:21 And you're supposed to modulate the voltage to modulate the fan speed. Dec 26 15:14:24 mistawright: It says "brushless" on it, so probably brushless Dec 26 15:15:41 mistawright: Also, 0.24A. But I doubt power is the issue, since it works when directly plugged into the 5V out Dec 26 15:19:26 meyermagic, do you know if it has a built in speed controller? Dec 26 15:19:29 it sounds like it does Dec 26 15:19:35 so you would have power ground and signal Dec 26 15:20:14 Yes, I believe so, if I understand what you mean correctly Dec 26 15:20:23 signal would take a pwm in which is what modulates the speed Dec 26 15:20:29 Ah Dec 26 15:20:29 I Dec 26 15:20:34 Well Dec 26 15:20:38 You might be right Dec 26 15:20:58 But I was under the impression the signal was for reading the speed, and you modulated the voltage input, hold on Dec 26 15:21:02 Let me test pwm to the third wire Dec 26 15:21:04 what language are you working with? Dec 26 15:21:44 have you exported the pins necessary to use pwm with? what os do you have on your beaglebone black? Dec 26 15:21:52 Right now, just the javascript-like thing in-browser. Once I'm sure I have everything I need, C++. Dec 26 15:23:08 hmmm, I would suggest just going straight with c++ I like using derek molloys libraries. Dec 26 15:23:19 you first need to make sure your pins are in a usable state Dec 26 15:23:38 Alright, I'll grab some LEDs to test with I guess and switch to SSH Dec 26 15:23:42 pwm isnt just usable out of no where. you would need to load the pwm chip etc Dec 26 15:23:55 kk Dec 26 15:24:13 It's a kernel module you have to configure or something like that? OS-level, not beaglebone library? Dec 26 15:24:26 I am using the 4.4 kernel on my beaglebone black with debian jessie and have been having issues getting pwm exported properly etc Dec 26 15:24:33 meyermagic, device tree overlay Dec 26 15:25:52 there have been changes with the way overlays are handled in the kernel, hence my inquiry on version and os you are using Dec 26 15:27:50 BeagleBoard.org BeagleBone Black rev 00C0 S/N 3615BBBK1BD1 running BoneScript 0.5.0, BeagleBoard.org Debian Image 2016-11-06, Dec 26 15:27:50 Linux beaglebone 4.4.30-ti-r64 #1 SMP Fri Nov 4 21:23:33 UTC 2016 armv7l GNU/Linux Dec 26 15:28:50 meyermagic, do you have the config-pin command available? Dec 26 15:29:01 Yes Dec 26 15:29:19 cat /sys/devices/platform/bone_capemgr/slots Dec 26 15:29:33 does that show you have the cape-unversal enabled Dec 26 15:29:47 I believe so Dec 26 15:29:48 4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universaln Dec 26 15:30:01 yeah thats what i have Dec 26 15:30:12 you should be able to use that tool to set your pins up Dec 26 15:30:19 wether it be a gpio input or output or pwm Dec 26 15:31:45 mistawright: Thanks Dec 26 15:32:26 meyermagic, im still mucking around with it so I can't say I have gotten it to the point where I can finish working on this rc car project Dec 26 15:32:50 meyermagic, https://github.com/derekmolloy/exploringBB/tree/master/library Dec 26 15:33:16 i like using this guys libraries for servo motors and dc motors. Dec 26 15:35:11 mistawright: Thanks, I'll check it out Dec 26 15:36:53 mistawright: So, using the config-pin command, if I flip the pin the voltage is connected to to GPIO high, the fan rotates just a tiny bit forward. If I flip it back to GPIO low, it rotates justa tiny bit backwards. Dec 26 15:37:18 which wire? Dec 26 15:37:32 mistawright: And repeatedly running "config-pin P9.14 1" doesn't make it go forward multiple times, only after coming from 0 Dec 26 15:37:42 mistawright: P9.14, the PWM pin Dec 26 15:37:45 sounds like you have the gpio connected to a signal wire Dec 26 15:37:54 config-pin P9.14 pwm Dec 26 15:37:59 sets it to a pwm pin Dec 26 15:38:18 I'd just like to see if I can use GPIO pins to make the fan spin, I'm connecting them to the voltage wire Dec 26 15:38:24 I'll get PWM working afterwards Dec 26 15:38:37 brushless motors dont work that way Dec 26 15:39:03 Which part am I misunderstanding? Dec 26 15:39:13 dc motor has two wires power and ground Dec 26 15:39:21 brushless has three Dec 26 15:39:32 the speed controller is what controls the brushless motor Dec 26 15:40:06 you can connect straight voltage to a dc motor and it will spin. do that to a brushless motor and wont work as expected. will probably twitch Dec 26 15:40:20 so pwm is what you need to worry about Dec 26 15:40:28 When I connect the red wire to 5V out, and the black one to ground Dec 26 15:40:35 And leave the blue wire disconnected Dec 26 15:40:41 The fan will spin continuously Dec 26 15:40:48 interesting Dec 26 15:40:55 If I instead connect the red wire to 3.3V, it'll spin continuously, but slower Dec 26 15:41:06 If I connect it to P9.14 and set it to GPIO high Dec 26 15:41:12 It twitches forward once Dec 26 15:41:15 then maybe what i have run into with brushless motors doesnt apply here Dec 26 15:41:37 Could be, I'm certainly confused Dec 26 15:41:38 im assuming blue to P9.14? Dec 26 15:41:44 So Dec 26 15:41:48 I forget where I read it Dec 26 15:41:54 So it might be wrong Dec 26 15:42:05 But I think the blue wire is for reading the fan speed, not setting it Dec 26 15:42:13 And you just modulate the voltage wire to control the speed Dec 26 15:42:19 Or is that nonsensical? Dec 26 15:43:39 The datasheets certainly don't make it clear, so what I know is just from reading about fans in general Dec 26 15:43:50 not necessarily im no expert on motors Dec 26 15:44:12 could have an encoder that is read from there Dec 26 15:44:55 sounds like it could definitely be for reading rpms Dec 26 15:45:20 if that is the case then modulating voltage on a pin could be they way you speed it up and slow it down Dec 26 15:45:44 That's what I thought initially, but I'm increasingly doubtful Dec 26 15:45:49 the pin that you have the power connected to. have you tried setting it from high to low to see if the fan stops Dec 26 15:46:13 No, I assumed those pins weren't controllable Dec 26 15:46:14 Let me try Dec 26 15:46:21 pwm pin, can modulate power. would be like hooking up an led to a pwm pin Dec 26 15:46:26 not the power per se Dec 26 15:46:46 The power pins are modifyable Dec 26 15:46:59 But I have tried hookup up the voltage to GPIO and PWM pins Dec 26 15:47:02 ground would be connected to ground power from the fan to a gpio pin on the beaglebone Dec 26 15:47:04 Neither makes it spin Dec 26 15:47:19 gpio may not be exported in the state necessary Dec 26 15:47:25 which gpio pin Dec 26 15:48:03 I've been using P9.14 in either GPIO or PWM mode mostly Dec 26 15:48:26 And, listening a bit more carefully Dec 26 15:48:36 Something does happen when I switch it to PWM connected to the fan voltage Dec 26 15:48:42 It emits a high pitch tone Dec 26 15:48:51 Let me see if it changes pitch if I change the frequency Dec 26 15:49:23 then you need to change frequency its for pwm Dec 26 15:49:29 sounds like you are on the right track Dec 26 15:49:48 What makes me worried is just setting the pin to high doesn't make the fan spin Dec 26 15:50:04 I feel like I'm misunderstanding something fundamental Dec 26 15:50:20 Since if I understand correct, setting a GPIO pin to high and connecting it to the voltage wire Dec 26 15:50:28 Should be basically the same as connecting the voltage wire to power Dec 26 15:55:35 exactly Dec 26 15:56:01 So, I can make an LED blink with the PWM pin Dec 26 15:56:15 But connecting the fan voltage to it makes it tick forwards and back Dec 26 15:56:23 So it is only moving on the rising edge, it seems like Dec 26 15:56:24 Yet Dec 26 15:56:40 If I connect the voltage wire to the 3.3V or 5V outputs Dec 26 15:56:43 It moves continuously Dec 26 15:56:51 That doesn't make sense to me Dec 26 15:57:45 And connecting the blue (third) wire to PWM while the red (voltage) wire is connected to the 5V or 3.3V doesn't seem to have any effect Dec 26 15:57:57 So I think it is for reading, or I'm not using it for writing correctly Dec 26 15:58:12 Oh! Dec 26 15:58:15 Oh man! Dec 26 15:58:27 lightbulb moment Dec 26 15:58:29 I moved the voltage wire from 5V to the PWM pin Dec 26 15:58:36 And now it is spinning continuously, just very slowly Dec 26 15:58:40 I don't think the frequency I chose Dec 26 15:58:48 Was giving it long enough to get up to speed Dec 26 15:58:53 overcome standing friction Dec 26 15:59:20 when you mentioned the rpm wire I figured thats what you needed to do Dec 26 15:59:36 thought you had already hooked up that way Dec 26 15:59:52 I had Dec 26 16:00:08 Like I said, it spun continously only when I moved it quickly from 5V to PWM Dec 26 16:00:13 Without giving the fan time to spin down Dec 26 16:00:17 Otherwise it just twitched Dec 26 16:00:41 I still don't understand why GPIO high and 1.0 duty cycle don't make it spin Dec 26 16:00:45 But this is progress Dec 26 16:02:21 datasheet would help you alot Dec 26 16:02:31 Agreed Dec 26 16:02:34 then you would know what state etc pins will need to be in Dec 26 16:02:48 And interestingly Dec 26 16:02:58 If I set the PWM duty cycle to 1.0 (so always on) Dec 26 16:03:06 And switch from the 5V to the PWM pin before the fan spins down Dec 26 16:03:16 It still keeps the fan spinning, just not at full speed Dec 26 16:03:22 Seems like it keeps it from slowing down Dec 26 16:03:26 That's pretty weird Dec 26 16:04:21 So Dec 26 16:04:42 It looks like one part of the problably is that the max voltage the PWM pins can output is 3.3V Dec 26 16:04:51 Which should be fine, since the normal 3.3V output makes the fan spin Dec 26 16:05:06 But that could still mean most rates are too slow to do anything Dec 26 16:05:23 Maybe I need another relay or something Dec 26 16:05:37 To modulate 5V power according to the PWM pin Dec 26 16:08:08 logic level converter Dec 26 16:08:21 is the fan 5v logic only? Dec 26 16:08:53 5V makes it spin fast, 3.3V makes it spin slower Dec 26 16:09:15 But It needs 5V power, and it looks like you are in fact supposed to modulate the power wire Dec 26 16:10:23 I can make it spin up and down according to the PWM rate now, if I spin it up manually with my finger Dec 26 16:10:24 But Dec 26 16:10:39 It is always very slow, much slower than either connected directly to 3.3V or 5V Dec 26 16:10:46 Even when the PWM duty cycle is set to 100% Dec 26 16:12:23 mistawright: Thanks again for the help Dec 26 16:12:33 logic level converter I would think is the culprit but it sounds like voltage and not logic Dec 26 16:13:01 yeah im not much help and Im about to be even less as I disappear to go smoke Dec 26 16:13:44 I have a MOSFET Dec 26 16:13:47 I think that might work Dec 26 16:23:41 Yes! The MOSFET works! Dec 26 16:23:45 I have fan control Dec 26 16:29:45 full range of speed? Dec 26 16:29:50 Yep. Dec 26 16:30:01 are you using pwm for speed now? Dec 26 16:30:29 The p-mosfet lets me switch the 5V (or up to 60V 25A) with the PWM pin Dec 26 16:30:38 You just motivated me to stop bs'ing and start working on my project too Dec 26 16:31:08 mistawright: I'm glad, I just got done with a week of smoking weed and watching TV when I should have been working on projects Dec 26 16:31:23 mistawright: So it is nice to be making real progress Dec 26 16:37:24 meyermagic, lol, guess im still on my week Dec 26 16:37:53 im a sys admin and im busy alot. i get laid too much. so that doesnt help either. I need to buckle down Dec 26 18:52:05 meyermagic: it sounds like (before you introduced the FET) you were using a I/O pin to power a fan... don't do that :P Dec 26 18:52:18 it sounds like an excellent way to fry an I/O with overcurrent Dec 26 18:52:43 and/or destroy it with induced voltage spikes Dec 26 19:08:52 I cannot get to the url http://192.168.7.2 is it hard coded to come up that way ? Dec 26 19:09:34 sorry, it's probably a newby question. Dec 26 19:11:23 is anyone on here? Dec 26 19:15:50 anyone? Dec 26 19:28:04 anyone out there ? Dec 26 19:51:14 anyone on this channel ? Dec 26 20:01:10 is anyone out there ? Dec 26 20:05:08 SETI ping Dec 26 20:16:20 paul___: lol, you've got to have a bit of patience here... people are in different timezones and/or doing other stuff most of the time Dec 26 20:17:09 @zmatt, thank you Dec 26 20:17:21 the usb-network stuff in the default images is set up with that hardcoded IP yes Dec 26 20:17:55 if connected to ethernet I think it should get an IP via dhcp Dec 26 20:17:57 any newby advise if it doesn't owrk ? Dec 26 20:18:09 I get the drive mounted Dec 26 20:18:20 that depends on quite a few things, including which host OS you're using Dec 26 20:18:26 linux ubuntu Dec 26 20:18:48 hmm, I'd expect the usb networking to work out of the box then Dec 26 20:19:02 anything I can check ? Dec 26 20:20:04 try "ip route" in a terminal Dec 26 20:20:26 it just fixed itself !! Dec 26 20:20:30 thank you. Dec 26 20:20:35 I don't know why Dec 26 20:20:35 lol ok Dec 26 20:20:47 it just showed up in my ifconfig Dec 26 20:20:52 and boom, it's there Dec 26 20:21:10 took hours to get there Dec 26 20:21:15 weird Dec 26 20:21:20 thank you very much Dec 26 20:25:00 anyone else having trouble flashing mmc on the BBBW? Dec 26 20:25:11 it's killing me Dec 26 20:25:34 whats BBBW? Dec 26 20:25:36 I don't think it should be any different from the regular BBB ? Dec 26 20:25:40 wireless Dec 26 20:25:41 mistawright: black wireless Dec 26 20:25:55 zmatt, so many more boards now Dec 26 20:26:30 it's like the BBGW, but with less idiocy Dec 26 20:28:31 it also uses that comically huge OSD335x, and schematic design in Eagle (hence looking absolutely horrible, like schematics made in Eagle always seem to do) Dec 26 20:28:58 zmatt, maybe you can help me. I have been trying to figure out how pwm works with the new kernels. I am using a 4.4 kernel and config-pin seems to be working and cape-universaln is loaded. I am able to set for instance P8.13 to pwm mode. Do I need to load the am33xx cape to enable pwm like we used to have? Are there any good guides you can point me to. I have been finding out little by little and can't seem to get good info Dec 26 20:29:00 lol Dec 26 20:29:34 mistawright: I'd guess probably cape-universal already enabled the pwm peripheral hence you only need to export the pins? Dec 26 20:30:10 did you check /sys/class/pwm ? Dec 26 20:30:23 how about working with them from the command line. I looked under /sys/class/pwm i believe and saw what appeared to be 5 pwm chips loaded Dec 26 20:30:39 I have any number of images I can boot from SD just fine, but when I try to flash I get the "night rider" pattern, wait for it to stop, boot, nothing Dec 26 20:30:55 fjdksl888: weird Dec 26 20:31:05 do you have a serial cable? Dec 26 20:31:21 mistawright: yes that's typical cape-universal... everything is enabled Dec 26 20:31:26 ordered but not arrived Dec 26 20:32:05 e.g. all PWM peripherals are already enabled but not muxed to any pins by default (the peripheral doesn't know this though), config-pin merely changes pinmux Dec 26 20:33:27 so you need to locate the appropriate pwm peripheral (note: their sequential numbering cannot be assumed to be stable) and export the right pwm output (0-1 for A/B, or just 0 for single-output pwm peripherals) Dec 26 20:35:16 fjdksl888: difficult to debug without Dec 26 20:35:32 fjdksl888: I don't think I've seen many people here yet with problems like what you're describing Dec 26 20:35:36 if any Dec 26 20:35:55 mistawright: can you pastebin ls -l /sys/class/pwm ? Dec 26 20:36:20 ls /sys/class/pwm/ Dec 26 20:36:20 pwmchip0 pwmchip2 pwmchip4 pwmchip6 pwmchip7 Dec 26 20:36:26 the -l part is kinda important Dec 26 20:36:47 yeah, that's what I figured, I'll just have to wait for the cable Dec 26 20:36:50 thx Dec 26 20:36:53 wow, didnt realize those were symlinks but that would make sense Dec 26 20:37:01 I was gonna say I can't magically guess what each pwm is, but I think I might be able to Dec 26 20:37:32 it seems plausible pwmchip0/2/4 are the three eHRPWM instances? Dec 26 20:37:45 definitely are the other two ecap Dec 26 20:38:35 so, P8.13 is pwm2b, so you'll need pwmchip4 and then export its pwm1 output Dec 26 20:39:27 tip, in your .bashrc add: alias ls='ls --color=auto --file-type' Dec 26 20:39:36 makes it much easier to recognize things :) Dec 26 20:41:35 ha, just added --color myself to the bashrc of a technical role account ;) Dec 26 20:42:17 will do Dec 26 20:42:31 zmatt, http://pastebin.com/FVePfPaB those are my symlinks Dec 26 20:43:11 phschafft: --color=auto is recommended over --color, otherwise you'll end up with color formatting codes in the output even if you send it somewhere other than to a terminal Dec 26 20:44:03 mistawright: yep, so my guess was correct, pwmchip4 is ehrpwm2 Dec 26 20:44:13 zmatt: read the above as 'a --color argument'. Dec 26 20:44:19 phschafft: ok :) Dec 26 20:45:02 mistawright: so head there and play around.. iirc there's a write-only "export" attribute to which you'll want to write 1 (indicating the B output) Dec 26 20:45:16 I'm not to keen typing more than needed. and most of the time people understand me. but I think it's good someone did the clarification in a channel like this, with many people around that are new to the magic of a powerfull shell. Dec 26 20:45:33 zmatt, config-pin doesnt set the pwm as an output? Dec 26 20:47:27 mistawright: it configures the pinmux of that pin, i.e. causes P8.13 to be attached to output B of the ehrpwm2 peripheral Dec 26 20:47:45 ok cool Dec 26 20:48:28 (to be more precise, it sets the values in the pinconf array entry, i.e. the mux, pull, and input-enable settings) Dec 26 20:49:08 exporting a pwm means you're asking for direct userspace control over it Dec 26 20:49:17 (similar to what exporting a gpio does for gpios) Dec 26 20:51:55 so at this point the pins can be worked with kind of like how they were with the 3.8 kernel? I am assuming i set frequency etc at this point for said pin? Dec 26 20:52:14 I have no idea how things worked on a 3.8 kernel, I'm not that deeply into archeology Dec 26 20:52:36 how would i set period etc through sysfs at this point? Dec 26 20:53:10 have you tried exporting the pwm yet? Dec 26 20:53:17 i have Dec 26 20:53:45 anything relevant appeared in sysfs? probably as a subdirectory of the pwmchip Dec 26 20:54:32 (I'm guessing here since I'm too lazy to reboot a beaglebone into a DT where I can check this myself) Dec 26 20:55:00 a pwm1 folder appeared Dec 26 20:55:04 lo and behold Dec 26 20:59:14 i had movement on my servo Dec 26 20:59:21 woo Dec 26 20:59:40 zmatt, thanks for the help. now its just me learning some more about how things are handled now Dec 26 21:00:06 why is there no updated guide on this info. I know things are changing quickly though Dec 26 21:00:22 because noone has written one yet? Dec 26 21:00:46 ¯\_(ツ)_/¯ **** ENDING LOGGING AT Tue Dec 27 03:00:01 2016