Search the Community
Showing results for tags 'pwm'.
Found 3 results
Part 1: What complicated electronicality goes into your average GoTo mount? Answer: Not as much as you’d think! In fact, that’s it. The above picture comprises the entire guts of an early generation (circa 2000) Celestron Nexstar GoTo Mount that accompanied a 90mm refractor scope. This particular example is a dead one, but it’s enough to show us what’s going on. So what have we got there? Let’s break it down… The Control Board Ooohhh… it’s got chips on it. Must be clever. No. Ultimately there are 3x components here that do the work. On the right are 2x XIC0014 oscillators with a 4mhz crystal each. We can summarise their job as: timing. These keep tabs on timing for signals going to and from each motor. On the left in the middle we have a 74HC240D. This is an octal line driver which takes 8 incoming teensy pulse signals and amplifies them into 8 larger pulse signals. In the lower left corner we have an L293DD. This is a part of interest. This is a 4channel H-Bridge motor driver. The pins on the right hand edge are for the hand controller. The pins on the left hand edge are for the Azimuth motor (left & right horizontal motion). The pins on the top edge are for the Altitude motor (up & down vertical motion). That’s a lot of pins for a motor tho… There’s also a MOSFET up top, which will be involved in regulating the incoming 12v DC down to 5v DC to run the electronics. The Handset board Nothing complicated here. It’s an RJ45 socket, mounted on a board along with the 12v power connector. Black & Red are 12v, which goes up to the handset, and across to the controller. The remaining 4 wires carry TTL signals from the handset to the control board. The Motors (x2) The mount contains 2x motors. These are DC controlled, and rely on 2 wires only. So what are the rest of the wires (6x) for? Feedback! Mounted to the rear of each motor is an optical encoder wheel. The black box at the top has an LED mounted in it, pointing at a light sensor. In between these, the wheel passes. Note the slots. The sensor detects the light being blocked and unblocked by the wheel, and converts these into pulses. So there are 2 wires providing Grnd and 3.3v to the LED. The encoder itself outputs one pulse for each slot. This is our speed signal (by counting pulses over a period of time), and by storing the count they can be used for position also. That’s one wire. It also outputs a direction signal. This is a high or low (on or off) signal. If the output is high, the motor is moving forwards. If the output is low, it’s moving backwards. That’s another wire. The encoder circuit needs power… 5v & grnd. That’s another 2 wires, giving our 6. Gearbox… Each motor mounts to a gearbox. I haven’t a clue of it’s ratio, but from the surface dimples we can see that it contains an input gear, which translates it’s motion through 4 other gears, then to the output gear on the other side… …which in typical fashion is smothered with the stickiest cheap & nasty grease known to man. This drives the transmission wheel, which uses a friction plate to move the relevant part of the actual mount. Again, this is liberally smeared in sticky cheap mank. Summary All the control board does is translate signals from the handset directly into drive commands for the motors. ALL the intelligence is in the handset. A bit of diagnosis tells me that the handset for this mount has been fried, along with the control board, but both motors and encoders are in perfect working order, so how can we resurrect this setup? Seeing as all the control board is is a multi channel H Bridge motor driver and feedback sensor board, we can replace the lot with a Raspberry Pi and a few bits. The Raspberry Pi’s GPIO pins can quite happily output 2 channels of PWM to control the motors themselves, and can easily receive 4 channels worth (2 per motor encoder) of feedback pulses. All we need to do is get power to everything. Conveniently, all the bits needed can be picked up for a grand total of sod all (or less) from most robotics hobby places. I already have a veritable mountain of Raspberry Pi boards so I don’t need to acquire one. These cost me £18 each. To hook up the motors, I’ll need a dual channel Pi motor driver board, so I’ve opted for a DRV8355-based kit which can take a 12v DC power supply to run the motors, and with the addition of a 5v step-down board it can also power the Raspberry Pi itself which in turn can power the encoder boards (which also run at 5v). The Pi also provides a 3.3v output which can power the LEDs on the encoder boards. These two components from the provided links total £12.36 inc shipping. Add the cost of the Pi, and that’s £30.36 for a replacement control board.
For the past couple of months I've been working on a project which I named Arduheater. Arduheater is a full open source intelligent heat strip controller for astronomy usage. Source code is available at: https://github.com/jbrazio/arduheater The main design goals were: Remotely controllable This was a very important part of the design, most heat controllers, specially the DIY ones, rely on the PWM signal for each channel being manually adjusted by means of a potentiometer. This either requires the user to be near the device tweeking it or to set it to a temperature that may be higher than the one really needed thus completely trashing efficiency. Arduheater uses a serial connection so you can use any USB-Serial-TTL dongle to adjust it's settings either you're 2 or 2000 meters away. Efficient energy usage Manual adjusted heater will either require the user to be tweeking it or they will wast more energy than necessary due to the general tendency to use a higher that required setpoint, this is valid for any PWM or bang-bang style controllers. Arduheater uses a temperature sensor (DHT22) to measure basic environmental properties such as temperature and humidity, knowing them both makes the calculation of the dew point possible. Arduheater also has a temperature sensor (NTC) for each heating strip, allowing the micro-controller to have a rough estimation of the temperature the equipment is at; it will be a rough estimation because we are really interested on the lenses surface temperature but we are actually measuring the heat strip temperature, to mitigate this, Arduheater allows the user to set specific offsets per heating strip. Arduheater uses a PID controller to efficiently manage the energy so only the required amount of energy to maintain a temperature setpoint is delivered to the heating strip. This is possible due the usage of a PWM signal while driving the outputs; the delta between the environmental dew point (plus offset, i.e. setpoint) and the heating strip temperature will make the micro-controller output a PID-calculated PWM signal until this delta reaches zero. In practical terms if a 12V heating strip full on consumes 12W of power (1A) it may be possible for it to use only 1W or even less to keep the equipment above dewpoint and the power usage will be automatically updated during the night as conditions vary, so the system will be always using the least amount of power to keep the dew away. Builder friendly Using off-the-shelf components such as the Arduino Nano and easily available parts Arduheater is aimed to be build by anyone with a soldering iron and some patience, no degree in electronics required. Allow up to four independent heat outputs Each of the four outputs have independent controls such as offset, min and max output power and of course the three main properties of the PID controller (Kp, Ki and Kd). Here are some shots of the bench prototype using a power resistor as the heating element and it's serial configuration interface: The "field" prototype on it's box: The heating strips (more build info will be provided further ahead): And of course all of this would not be possible without the usage of the force. ;-) I hope someone may find this project useful. I'll keep this thread updated as soon as I'm able to release the source code, schematics and build instructions.  Dew point is that dreadful threshold at which water condensation starts to happen on the lenses/equipment.  A proportional–integral–derivative controller (PID controller) is a control loop feedback mechanism (controller) commonly used in industrial control systems.
Dew strap controller (PWM) done at last (waited ages for some kit from China). 4 x 10W channels, individually fused, switched & controlled, channel switch LED brightness indicates power output. 12V 5A DC input switched & fused. Compared to the cost of a 'bought' one, I'd need to value my time at less than youth minimum wage, but you can't put a price on smug self-satisfaction :-) Circuit idea shamelessly nicked from http://www.blackwaterskies.co.uk/2013/05/a-cheap-multi-channel-dew-heater.html